Table of Contents

Class ExtendedBlackVarianceCurve

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

A Black variance curve on volatilities at dates: the variance interpolated in time (linearly by default) up to the last date, the last date's volatility flat beyond it. QuantLib's extension of BlackVarianceCurve to quoted volatilities.

[Experimental("NQL0001")]
public sealed class ExtendedBlackVarianceCurve : BlackVarianceTermStructure
Inheritance
ExtendedBlackVarianceCurve
Inherited Members
Extension Methods

Remarks

Quotes are values (the playbook's Quote row), so the curve is computed at construction; QuantLib's update() isn't ported. SetInterpolation<TInterpolator>(TInterpolator) returns a copy on the new interpolation, where QuantLib changes the curve. Unlike the landed curve, QuantLib's experimental one doesn't floor the interpolated variance at 0 nor choose its extrapolation. QuantLib's acyclic visitor isn't ported.

Constructors

ExtendedBlackVarianceCurve(Date, IEnumerable<Date>, IEnumerable<double>, DayCounter, bool)

Initializes a new instance of the ExtendedBlackVarianceCurve class.

public ExtendedBlackVarianceCurve(Date referenceDate, IEnumerable<Date> dates, IEnumerable<double> volatilities, DayCounter dayCounter, bool forceMonotoneVariance = true)

Parameters

referenceDate Date

The reference date.

dates IEnumerable<Date>

The dates, after the reference date and increasing.

volatilities IEnumerable<double>

The volatilities, one per date.

dayCounter DayCounter

The day counter.

forceMonotoneVariance bool

Whether the variances must be non-decreasing.

Exceptions

ArgumentNullException

An argument is null.

ArgumentException

A date is default(Date), there are no dates, the sizes differ ("size mismatch between dates and volatilities"), the first date isn't after the reference date, the dates aren't increasing, or a variance decreases where monotone variances are forced.

Properties

MaxDate

Gets the latest date for which the curve can return values.

public override Date MaxDate { get; }

Property Value

Date

Methods

BlackVarianceImpl(double, double)

The variance at a time and strike, the range already checked; it must extrapolate.

protected override double BlackVarianceImpl(double t, double strike)

Parameters

t double

The time.

strike double

The strike.

Returns

double

The variance.

MaxStrike()

The maximum strike for which the structure returns values.

public override double MaxStrike()

Returns

double

The strike.

MinStrike()

The minimum strike for which the structure returns values.

public override double MinStrike()

Returns

double

The strike.

SetInterpolation<TInterpolator>(TInterpolator)

A copy of the curve interpolating its variances with another interpolator.

public ExtendedBlackVarianceCurve SetInterpolation<TInterpolator>(TInterpolator interpolator = default) where TInterpolator : struct, IInterpolator

Parameters

interpolator TInterpolator

The interpolator.

Returns

ExtendedBlackVarianceCurve

The copy.

Type Parameters

TInterpolator

The interpolator's type.