Table of Contents

Class ConstantEstimator

Namespace
NanoQL.Models
Assembly
NanoQL.dll

The constant-estimator volatility model: at each date past the first size, the dispersion of the size values before it. Volatilities are assumed to be expressed on an annual basis.

public sealed class ConstantEstimator : VolatilityCompositor
Inheritance
ConstantEstimator
Inherited Members

Remarks

Immutable; calibration changes nothing, as QuantLib's is empty. The dispersion is QuantLib's, √(Σu²/n − (Σu)²/(n(n + 1))), whose intent QuantLib doesn't document; it is kept as QuantLib's design.

A documented divergence: a window longer than the series is refused, where QuantLib advances past the series' end.

Constructors

ConstantEstimator(int)

Initializes a new instance of the ConstantEstimator class.

public ConstantEstimator(int size)

Parameters

size int

The number of values each volatility reads.

Exceptions

ArgumentOutOfRangeException

size is negative.

Methods

Calculate(TimeSeries<double>)

The volatilities the model gives on the series.

public override TimeSeries<double> Calculate(TimeSeries<double> volatilitySeries)

Parameters

volatilitySeries TimeSeries<double>

The series.

Returns

TimeSeries<double>

The volatility series.

Exceptions

ArgumentNullException

volatilitySeries is null.

ArgumentException

The series is shorter than the window.

Calibrate(TimeSeries<double>)

The model calibrated to the series.

public override VolatilityCompositor Calibrate(TimeSeries<double> volatilitySeries)

Parameters

volatilitySeries TimeSeries<double>

The series.

Returns

VolatilityCompositor

A new model, or this one where calibration changes nothing.

Exceptions

ArgumentNullException

volatilitySeries is null.