Table of Contents

Class YoYInflationTermStructure

Namespace
NanoQL.TermStructures
Assembly
NanoQL.dll

The base class of year-on-year inflation term structures.

public abstract class YoYInflationTermStructure : InflationTermStructure
Inheritance
YoYInflationTermStructure
Derived
Inherited Members
Extension Methods

Remarks

An extension point. QuantLib's deprecated lagged yoyRate isn't ported; YoyRate(Date, bool) computes what QuantLib's non-lagged form computes through it with a zero lag.

Constructors

YoYInflationTermStructure(Date, Date, double, Frequency, DayCounter, Seasonality?)

Initializes a new instance of the YoYInflationTermStructure class with a fixed reference date.

protected YoYInflationTermStructure(Date referenceDate, Date baseDate, double baseYoYRate, Frequency frequency, DayCounter dayCounter, Seasonality? seasonality = null)

Parameters

referenceDate Date

The reference date.

baseDate Date

The base date.

baseYoYRate double

The year-on-year rate at the base date.

frequency Frequency

The frequency of the index the structure forecasts.

dayCounter DayCounter

The day counter.

seasonality Seasonality

The seasonality, or null for none.

Exceptions

ArgumentNullException

dayCounter is null.

ArgumentException

baseDate is default(Date).

ArgumentOutOfRangeException

frequency isn't a member of its type.

NanoQLException

The seasonality is inconsistent with the structure.

YoYInflationTermStructure(Date, int, Calendar, Date, double, Frequency, DayCounter, Seasonality?)

Initializes a new instance of the YoYInflationTermStructure class whose reference date was computed from settlement days and the evaluation date.

protected YoYInflationTermStructure(Date referenceDate, int settlementDays, Calendar calendar, Date baseDate, double baseYoYRate, Frequency frequency, DayCounter dayCounter, Seasonality? seasonality = null)

Parameters

referenceDate Date

The reference date, computed from the evaluation date.

settlementDays int

The business days the reference date was computed with.

calendar Calendar

The calendar the business days were counted on.

baseDate Date

The base date.

baseYoYRate double

The year-on-year rate at the base date.

frequency Frequency

The frequency of the index the structure forecasts.

dayCounter DayCounter

The day counter.

seasonality Seasonality

The seasonality, or null for none.

Exceptions

ArgumentNullException

calendar or dayCounter is null.

ArgumentException

baseDate is default(Date).

ArgumentOutOfRangeException

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

NanoQLException

The seasonality is inconsistent with the structure.

Methods

YoyRate(Date, bool)

The year-on-year inflation rate for a date, with the seasonality's correction: QuantLib's yoyRate(d, extrapolate). It isn't the year-on-year swap rate, which the instrument gives.

public double YoyRate(Date d, bool extrapolate = false)

Parameters

d Date

The date; the rate is read at the start of its inflation period.

extrapolate bool

Whether to extrapolate past the maximum date.

Returns

double

The rate.

Exceptions

NanoQLException

The period's start is before the base date, or past the maximum date without extrapolation.

YoyRate(double, bool)

The year-on-year inflation rate at a time, with no lag, period or seasonality applied: QuantLib's yoyRate(t, extrapolate).

public double YoyRate(double t, bool extrapolate = false)

Parameters

t double

The time.

extrapolate bool

Whether to extrapolate past the maximum time.

Returns

double

The rate.

Exceptions

NanoQLException

The time is before the base date's, or past the maximum time without extrapolation.

YoyRateImpl(double)

The year-on-year inflation rate at a time, which a derived structure computes.

protected abstract double YoyRateImpl(double t)

Parameters

t double

The time.

Returns

double

The rate.