Class SquareRootProcess
The square-root process, governed by dx = a(b − x_t) dt + σ√x_t dW_t.
public sealed class SquareRootProcess : StochasticProcess1D
- Inheritance
-
SquareRootProcess
- Inherited Members
Remarks
The diffusion at a negative state is 0, the root of the state floored at 0, as HestonProcess's
partial truncation takes its variance's: a divergence, QuantLib's σ√x being NaN there, so that an Euler path, which
can step below 0, turns NaN for good (Divergences/SquareRootProcessTruncationTests.cs). The drift reads the
state as it is, as the partial truncation's does.
Constructors
SquareRootProcess(double, double, double, double, StochasticProcess1DDiscretization?)
Initializes a new instance of the SquareRootProcess class.
public SquareRootProcess(double b, double a, double sigma, double x0 = 0, StochasticProcess1DDiscretization? d = null)
Parameters
bdoubleThe mean level, b.
adoubleThe speed of mean reversion, a.
sigmadoubleThe volatility, σ.
x0doubleThe initial value.
dStochasticProcess1DDiscretizationThe discretization; null for Euler's, QuantLib's default.
Properties
A
Gets the speed of mean reversion, a.
public double A { get; }
Property Value
B
Gets the mean level, b.
public double B { get; }
Property Value
Sigma
Gets the volatility, σ.
public double Sigma { get; }
Property Value
X0
Gets the initial value of the state variable.
public override double X0 { get; }
Property Value
Methods
Diffusion(double, double)
The diffusion part of the equation, σ(t, x_t).
public override double Diffusion(double t, double x)
Parameters
Returns
- double
The diffusion.
Drift(double, double)
The drift part of the equation, μ(t, x_t).
public override double Drift(double t, double x)
Parameters
Returns
- double
The drift.