QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
LevyFlightDistribution Class Reference

Levy Flight distribution. More...

#include <ql/experimental/math/levyflightdistribution.hpp>

Public Member Functions

Constructors
 LevyFlightDistribution (Real xm=1.0, Real alpha=1.0)
 LevyFlightDistribution (const param_type &parm)
 Constructs a LevyFlightDistribution from its parameters.

Inspectors

Real xm () const
 Returns the xm parameter of the distribution.
Real alpha () const
 Returns the alpha parameter of the distribution.
Real min BOOST_PREVENT_MACRO_SUBSTITUTION () const
 Returns the smallest value that the distribution can produce.
Real max BOOST_PREVENT_MACRO_SUBSTITUTION () const
 Returns the largest value that the distribution can produce.
param_type param () const
 Returns the parameters of the distribution.
void param (const param_type &parm)
 Sets the parameters of the distribution.
void reset ()
Real operator() (Real x) const
 Returns the value of the pdf for x.
template<class Engine>
Real operator() (Engine &eng) const
template<class Engine>
Real operator() (Engine &eng, const param_type &parm) const

Detailed Description

Levy Flight distribution.

The levy flight distribution is a random distribution with the following form:

\[p(x) = \frac{\alpha x_m^{\alpha}}{x^{\alpha+1}} \]

with support over \( x \in [x_m, \infty) \) and the parameter \( \alpha > 0 \).

Levy Flight is normally defined as \( x_m = 1 \) and \( 0 < \alpha < 2 \), which is where \( p(x) \) has an infinite variance. However, the more general version, known as Pareto Type I, is well defined for \( \alpha > 2 \), so the current implementation does not restrict \( \alpha \) to be smaller than 2.

Constructor & Destructor Documentation

◆ LevyFlightDistribution()

LevyFlightDistribution ( Real xm = 1.0,
Real alpha = 1.0 )
explicit

Constructs a LevyFlightDistribution with a given xm and alpha Requires: alpha > 0

Member Function Documentation

◆ reset()

void reset ( )

Effects: Subsequent uses of the distribution do not depend on values produced by any engine prior to invoking reset.

◆ operator()() [1/2]

template<class Engine>
Real operator() ( Engine & eng) const

Returns a random variate distributed according to the levy flight distribution.

◆ operator()() [2/2]

template<class Engine>
Real operator() ( Engine & eng,
const param_type & parm ) const

Returns a random variate distributed according to the levy flight with parameters specified by parm