Table of Contents

Class ExtendedBlackVarianceSurface

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

A Black variance surface on volatilities at dates and strikes: the variance interpolated in time and strike (bilinearly by default) up to the last date, the last date's volatility flat beyond it. QuantLib's extension of BlackVarianceSurface to quoted volatilities.

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

Remarks

Quotes are values (the playbook's Quote row), given strike by strike, each strike's at every date, as QuantLib lays out its quotes; the surface is computed at construction and QuantLib's update() isn't ported. SetInterpolation<TInterpolator>(TInterpolator) returns a copy on the new interpolation, where QuantLib changes the surface. Unlike the landed surface, QuantLib's experimental one doesn't floor the interpolated variance at 0, and its first date must be after the reference date. QuantLib holds a reference to its caller's quotes, which the values replace. QuantLib's acyclic visitor isn't ported.

Constructors

ExtendedBlackVarianceSurface(Date, Calendar?, IEnumerable<Date>, IEnumerable<double>, IEnumerable<double>, DayCounter, ExtendedBlackVarianceSurfaceExtrapolation, ExtendedBlackVarianceSurfaceExtrapolation)

Initializes a new instance of the ExtendedBlackVarianceSurface class.

public ExtendedBlackVarianceSurface(Date referenceDate, Calendar? calendar, IEnumerable<Date> dates, IEnumerable<double> strikes, IEnumerable<double> volatilities, DayCounter dayCounter, ExtendedBlackVarianceSurfaceExtrapolation lowerExtrapolation = ExtendedBlackVarianceSurfaceExtrapolation.InterpolatorDefaultExtrapolation, ExtendedBlackVarianceSurfaceExtrapolation upperExtrapolation = ExtendedBlackVarianceSurfaceExtrapolation.InterpolatorDefaultExtrapolation)

Parameters

referenceDate Date

The reference date.

calendar Calendar

The calendar, or null for QuantLib's empty one.

dates IEnumerable<Date>

The dates, after the reference date and increasing.

strikes IEnumerable<double>

The strikes, increasing.

volatilities IEnumerable<double>

The volatilities, strike by strike, each strike's at every date.

dayCounter DayCounter

The day counter.

lowerExtrapolation ExtendedBlackVarianceSurfaceExtrapolation

How the surface extrapolates below its lowest strike.

upperExtrapolation ExtendedBlackVarianceSurfaceExtrapolation

How the surface extrapolates above its highest strike.

Exceptions

ArgumentNullException

An argument is null.

ArgumentOutOfRangeException

An extrapolation isn't a member of its type.

ArgumentException

A date is default(Date), there are no dates, the sizes differ, the first date isn't after the reference date, the dates aren't increasing, or a strike's variance decreases.

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 surface interpolating its variances with another interpolator.

public ExtendedBlackVarianceSurface SetInterpolation<TInterpolator>(TInterpolator interpolator = default) where TInterpolator : struct, IInterpolator2D

Parameters

interpolator TInterpolator

The interpolator.

Returns

ExtendedBlackVarianceSurface

The copy.

Type Parameters

TInterpolator

The interpolator's type.