Table of Contents

Class SquareRootProcess

Namespace
NanoQL.Processes
Assembly
NanoQL.dll

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

b double

The mean level, b.

a double

The speed of mean reversion, a.

sigma double

The volatility, σ.

x0 double

The initial value.

d StochasticProcess1DDiscretization

The discretization; null for Euler's, QuantLib's default.

Properties

A

Gets the speed of mean reversion, a.

public double A { get; }

Property Value

double

B

Gets the mean level, b.

public double B { get; }

Property Value

double

Sigma

Gets the volatility, σ.

public double Sigma { get; }

Property Value

double

X0

Gets the initial value of the state variable.

public override double X0 { get; }

Property Value

double

Methods

Diffusion(double, double)

The diffusion part of the equation, σ(t, x_t).

public override double Diffusion(double t, double x)

Parameters

t double

The time.

x double

The state.

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

t double

The time.

x double

The state.

Returns

double

The drift.