Table of Contents

Class PiecewiseYoYOptionletVolatilityCurve<TInterpolator, TBootstrap, TTraits>

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

A year-on-year optionlet volatility curve bootstrapped at one strike on optionlet helpers, flat in strike and interpolated in time: QuantLib's PiecewiseYoYOptionletVolatilityCurve.

[Experimental("NQL0001")]
public sealed class PiecewiseYoYOptionletVolatilityCurve<TInterpolator, TBootstrap, TTraits> : YoYOptionletVolatilitySurface, IInterpolatedCurve<TTraits, TInterpolator> where TInterpolator : struct, IInterpolator where TBootstrap : struct, IBootstrap where TTraits : struct, IBootstrapTraits<YoYOptionletVolatilitySurface>

Type Parameters

TInterpolator

The interpolator in time.

TBootstrap

The bootstrap, IterativeBootstrap by QuantLib's default.

TTraits

The traits, YoYInflationVolatilityTraits by QuantLib's default.

Inheritance
PiecewiseYoYOptionletVolatilityCurve<TInterpolator, TBootstrap, TTraits>
Implements
IInterpolatedCurve<TTraits, TInterpolator>
Inherited Members
Extension Methods

Remarks

The curve bootstraps in its factory (Create(int, Calendar, BusinessDayConvention, DayCounter, Period, Frequency, bool, double, double, double, IEnumerable<BootstrapHelper<YoYOptionletVolatilitySurface>>, EvaluationContext, double, TInterpolator, TBootstrap)), over a working state its helpers' bound copies price against, as the piecewise year-on-year inflation curve does; its first node is the base date at the base volatility, the assumption on the unquoted early optionlets. It implements IInterpolatedCurve<TTraits, TInterpolator>, where QuantLib's derives from the interpolated curve, and its nodes come from its dates and data, QuantLib's master's (#2941), where 1.44's nodes are empty. The last date is the reference date plus the last time rounded up to whole years, adjusted, QuantLib's approximation.

Properties

Bootstrap

Gets the bootstrap the curve was built with.

public TBootstrap Bootstrap { get; }

Property Value

TBootstrap

Interpolator

Gets the interpolator the curve was built with.

public TInterpolator Interpolator { get; }

Property Value

TInterpolator

MaxDate

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

public override Date MaxDate { get; }

Property Value

Date

Remarks

The reference date plus the last time rounded up to whole years, as an option tenor; on the working state while the curve is built.

Methods

Create(int, Calendar, BusinessDayConvention, DayCounter, Period, Frequency, bool, double, double, double, IEnumerable<BootstrapHelper<YoYOptionletVolatilitySurface>>, EvaluationContext, double, TInterpolator, TBootstrap)

Builds the curve on the reference date the settlement days give after the evaluation date, and bootstraps it.

public static PiecewiseYoYOptionletVolatilityCurve<TInterpolator, TBootstrap, TTraits> Create(int settlementDays, Calendar cal, BusinessDayConvention bdc, DayCounter dc, Period lag, Frequency frequency, bool indexIsInterpolated, double minStrike, double maxStrike, double baseYoYVolatility, IEnumerable<BootstrapHelper<YoYOptionletVolatilitySurface>> instruments, EvaluationContext context, double accuracy = 1E-12, TInterpolator interpolator = default, TBootstrap bootstrap = default)

Parameters

settlementDays int

The business days from the evaluation date to the reference date.

cal Calendar

The calendar.

bdc BusinessDayConvention

The convention adjusting option dates computed from tenors.

dc DayCounter

The day counter.

lag Period

The observation lag.

frequency Frequency

The index's frequency.

indexIsInterpolated bool

Whether the index is observed with linear interpolation.

minStrike double

The lowest strike the curve gives volatilities for.

maxStrike double

The highest strike the curve gives volatilities for.

baseYoYVolatility double

The volatility at the base date, the first node's.

instruments IEnumerable<BootstrapHelper<YoYOptionletVolatilitySurface>>

The helpers the curve is bootstrapped on.

context EvaluationContext

The evaluation context the helpers are dated and priced in.

accuracy double

The bootstrap's accuracy.

interpolator TInterpolator

The interpolator.

bootstrap TBootstrap

The bootstrap.

Returns

PiecewiseYoYOptionletVolatilityCurve<TInterpolator, TBootstrap, TTraits>

The curve.

Exceptions

ArgumentNullException

An argument is null.

ArgumentException

A helper is null.

ArgumentOutOfRangeException

settlementDays is negative, or an enum argument isn't a member of its type.

NanoQLException

The bootstrap fails.

Data()

The curve's data at its nodes, as its traits read them (discount factors, rates).

public ImmutableArray<double> Data()

Returns

ImmutableArray<double>

The data.

Remarks

On the working state while the curve is built.

Dates()

The dates of the curve's nodes.

public ImmutableArray<Date> Dates()

Returns

ImmutableArray<Date>

The dates.

Remarks

On the working state while the curve is built.

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.

Nodes()

The curve's nodes: each date with the data at it.

public ImmutableArray<KeyValuePair<Date, double>> Nodes()

Returns

ImmutableArray<KeyValuePair<Date, double>>

The nodes.

Remarks

From the dates and data, QuantLib's master's (#2941); on the working state while the curve is built.

Times()

The times of the curve's nodes, from the reference date.

public ImmutableArray<double> Times()

Returns

ImmutableArray<double>

The times.

Remarks

On the working state while the curve is built.

VolatilityImpl(double, double)

The volatility at a time and a strike, which a derived structure computes.

protected override double VolatilityImpl(double length, double strike)

Parameters

length double

The time.

strike double

The strike.

Returns

double

The volatility.

Remarks

The interpolation's value at the time, whatever the strike; on the working state while the curve is built.