Table of Contents

Class StrippedOptionlet

Namespace
NanoQL.TermStructures
Assembly
NanoQL.dll

A matrix of optionlet (caplet and floorlet) volatilities, also called forward-forward volatilities, calculated elsewhere, as a StrippedOptionletBase.

public sealed class StrippedOptionlet : StrippedOptionletBase
Inheritance
StrippedOptionlet
Inherited Members

Remarks

QuantLib's quotes are their values: a new volatility is a new object. The fixing times run from the reference date, the settlement days after the context's evaluation date, computed at construction as QuantLib computes them; a later evaluation date is a new object.

The at-the-money rates are the index's fixings on the fixing dates, read from the context at each call, today's forecast, as QuantLib reads them at each call.

Constructors

StrippedOptionlet(int, Calendar, BusinessDayConvention, IborIndex, IEnumerable<Date>, IEnumerable<IEnumerable<double>>, IEnumerable<IEnumerable<double>>, DayCounter, EvaluationContext, VolatilityType, double)

Initializes a new instance of the StrippedOptionlet class with strikes per fixing date.

public StrippedOptionlet(int settlementDays, Calendar calendar, BusinessDayConvention bdc, IborIndex iborIndex, IEnumerable<Date> optionletDates, IEnumerable<IEnumerable<double>> strikes, IEnumerable<IEnumerable<double>> v, DayCounter dc, EvaluationContext context, VolatilityType type = VolatilityType.ShiftedLognormal, double displacement = 0)

Parameters

settlementDays int

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

calendar Calendar

The calendar.

bdc BusinessDayConvention

The business-day convention.

iborIndex IborIndex

The index whose fixings are the at-the-money rates.

optionletDates IEnumerable<Date>

The fixing dates, increasing, the first after the evaluation date.

strikes IEnumerable<IEnumerable<double>>

The strikes: a row per fixing date, each increasing.

v IEnumerable<IEnumerable<double>>

The volatilities: a row per fixing date, a volatility per strike of the row.

dc DayCounter

The day counter of the fixing times.

context EvaluationContext

The evaluation context: its evaluation date sets the reference date.

type VolatilityType

The volatilities' type.

displacement double

The displacement of shifted lognormal volatilities.

Exceptions

ArgumentNullException

A reference argument, or a row of strikes or v, is null.

ArgumentOutOfRangeException

settlementDays is negative, or bdc or type isn't a member of its type.

ArgumentException

The dates, strikes and volatilities are inconsistent (QuantLib's checks).

StrippedOptionlet(int, Calendar, BusinessDayConvention, IborIndex, IEnumerable<Date>, IEnumerable<double>, IEnumerable<IEnumerable<double>>, DayCounter, EvaluationContext, VolatilityType, double)

Initializes a new instance of the StrippedOptionlet class with the same strikes at every fixing date.

public StrippedOptionlet(int settlementDays, Calendar calendar, BusinessDayConvention bdc, IborIndex iborIndex, IEnumerable<Date> optionletDates, IEnumerable<double> strikes, IEnumerable<IEnumerable<double>> v, DayCounter dc, EvaluationContext context, VolatilityType type = VolatilityType.ShiftedLognormal, double displacement = 0)

Parameters

settlementDays int

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

calendar Calendar

The calendar.

bdc BusinessDayConvention

The business-day convention.

iborIndex IborIndex

The index whose fixings are the at-the-money rates.

optionletDates IEnumerable<Date>

The fixing dates, increasing, the first after the evaluation date.

strikes IEnumerable<double>

The strikes, increasing.

v IEnumerable<IEnumerable<double>>

The volatilities: a row per fixing date, a volatility per strike.

dc DayCounter

The day counter of the fixing times.

context EvaluationContext

The evaluation context: its evaluation date sets the reference date.

type VolatilityType

The volatilities' type.

displacement double

The displacement of shifted lognormal volatilities.

Exceptions

ArgumentNullException

A reference argument, or a row of v, is null.

ArgumentOutOfRangeException

settlementDays is negative, or bdc or type isn't a member of its type.

ArgumentException

The dates, strikes and volatilities are inconsistent (QuantLib's checks).

Properties

BusinessDayConvention

Gets the business-day convention.

public override BusinessDayConvention BusinessDayConvention { get; }

Property Value

BusinessDayConvention

Calendar

Gets the calendar, or null, QuantLib's empty calendar.

public override Calendar? Calendar { get; }

Property Value

Calendar

DayCounter

Gets the day counter of the fixing times.

public override DayCounter DayCounter { get; }

Property Value

DayCounter

Displacement

Gets the displacement of shifted lognormal volatilities.

public override double Displacement { get; }

Property Value

double

OptionletFixingDates

Gets the optionlets' fixing dates.

public override ImmutableArray<Date> OptionletFixingDates { get; }

Property Value

ImmutableArray<Date>

OptionletFixingTimes

Gets the optionlets' fixing times.

public override ImmutableArray<double> OptionletFixingTimes { get; }

Property Value

ImmutableArray<double>

OptionletMaturities

Gets the number of optionlet fixing dates.

public override int OptionletMaturities { get; }

Property Value

int

SettlementDays

Gets the settlement days; null where they weren't provided, where QuantLib throws "settlement days not provided for this instance".

public override int? SettlementDays { get; }

Property Value

int?

VolatilityType

Gets the volatilities' type.

public override VolatilityType VolatilityType { get; }

Property Value

VolatilityType

Methods

AtmOptionletRates(EvaluationContext)

The index's fixings on the fixing dates, with today's forecast.

public override ImmutableArray<double> AtmOptionletRates(EvaluationContext context)

Parameters

context EvaluationContext

The evaluation context, whose fixings and forecasts the rates read.

Returns

ImmutableArray<double>

The rates, a new array at each call.

Exceptions

ArgumentNullException

context is null.

NanoQLException

A fixing is missing, or the index can't forecast one.

OptionletStrikes(int)

The strikes at the i-th fixing date.

public override ImmutableArray<double> OptionletStrikes(int i)

Parameters

i int

The fixing date's index.

Returns

ImmutableArray<double>

The strikes.

Exceptions

ArgumentOutOfRangeException

i is negative or not less than the number of fixing dates.

OptionletVolatilities(int)

The volatilities at the i-th fixing date, one per strike.

public override ImmutableArray<double> OptionletVolatilities(int i)

Parameters

i int

The fixing date's index.

Returns

ImmutableArray<double>

The volatilities.

Exceptions

ArgumentOutOfRangeException

i is negative or not less than the number of fixing dates.