Table of Contents

Struct YoYInflationTraits

Namespace
NanoQL.TermStructures
Assembly
NanoQL.dll

The year-on-year inflation curve's bootstrap traits: the curve's data are year-on-year rates, from the base date, starting at the curve's base rate.

public readonly struct YoYInflationTraits : IYoYInflationTraits, IBootstrapTraits<YoYInflationTermStructure>
Implements
Inherited Members

Explicit Interface Implementations

GlobalGuess(BootstrapState<YoYInflationTermStructure>, bool)

The guess for the whole curve, every node but the first, and whether it needs to be transformed. Read only when HasGlobalGuess is set; the default throws.

static (Vector Guess, bool NeedsTransform) GlobalGuess(BootstrapState<YoYInflationTermStructure> c, bool validData)

Parameters

c BootstrapState<YoYInflationTermStructure>

The working state of the curve under construction.

validData bool

Whether the curve's data hold a previous state's values.

Returns

(Vector Guess, bool NeedsTransform)

The guess, and whether TransformInverse(double, int, BootstrapState<TTermStructure>) must be applied to it.

Exceptions

NotSupportedException

The traits give no global guess.

Guess(int, BootstrapState<YoYInflationTermStructure>, bool, int)

The guess for a node's value.

static double Guess(int i, BootstrapState<YoYInflationTermStructure> c, bool validData, int firstAliveHelper)

Parameters

i int

The node.

c BootstrapState<YoYInflationTermStructure>

The working state of the curve under construction.

validData bool

Whether the curve's data hold a previous pass's values.

firstAliveHelper int

The index of the first helper alive at the curve's first date.

Returns

double

The guess.

HasGlobalGuess

Gets a value indicating whether the traits give a guess for the whole curve (GlobalGuess(BootstrapState<TTermStructure>, bool)).

static bool HasGlobalGuess { get; }

Returns

bool

InitialDate(BootstrapState<YoYInflationTermStructure>)

The curve's first date: the start of its data.

static Date InitialDate(BootstrapState<YoYInflationTermStructure> c)

Parameters

c BootstrapState<YoYInflationTermStructure>

The working state of the curve under construction.

Returns

Date

The date.

InitialValue(BootstrapState<YoYInflationTermStructure>)

The curve's value at its first date.

static double InitialValue(BootstrapState<YoYInflationTermStructure> c)

Parameters

c BootstrapState<YoYInflationTermStructure>

The working state of the curve under construction.

Returns

double

The value.

MaxDate(ReadOnlySpan<Date>, Date?)

The curve kind's maximum date: QuantLib's maxDate() of the kind's interpolated curve.

static Date MaxDate(ReadOnlySpan<Date> dates, Date? maxDate)

Parameters

dates ReadOnlySpan<Date>

The nodes' dates.

maxDate Date?

The latest date a bootstrap's helpers need, or null for none.

Returns

Date

The maximum date.

Remarks

The latest date the helpers need, or else the last node's.

Exceptions

ArgumentException

maxDate isn't given and dates is empty, where QuantLib reads past its end.

MaxIterations

Gets the upper bound of the bootstrap's convergence loop.

static int MaxIterations { get; }

Returns

int

MaxValueAfter(int, BootstrapState<YoYInflationTermStructure>, bool, int)

The upper bound of a node's value, from the previous values.

static double MaxValueAfter(int i, BootstrapState<YoYInflationTermStructure> c, bool validData, int firstAliveHelper)

Parameters

i int

The node.

c BootstrapState<YoYInflationTermStructure>

The working state of the curve under construction.

validData bool

Whether the curve's data hold a previous pass's values.

firstAliveHelper int

The index of the first helper alive at the curve's first date.

Returns

double

The bound.

MinValueAfter(int, BootstrapState<YoYInflationTermStructure>, bool, int)

The lower bound of a node's value, from the previous values.

static double MinValueAfter(int i, BootstrapState<YoYInflationTermStructure> c, bool validData, int firstAliveHelper)

Parameters

i int

The node.

c BootstrapState<YoYInflationTermStructure>

The working state of the curve under construction.

validData bool

Whether the curve's data hold a previous pass's values.

firstAliveHelper int

The index of the first helper alive at the curve's first date.

Returns

double

The bound.

UpdateGuess(double[], double, int)

Writes a root finder's trial value into the curve's data: QuantLib's updateGuess.

static void UpdateGuess(double[] data, double level, int i)

Parameters

data double[]

The curve's data.

level double
i int

The node.

Exceptions

ArgumentOutOfRangeException

i isn't a point of data, where QuantLib writes past its end.

YoyRateImpl(Interpolation, double)

The curve kind's year-on-year inflation rate at a time, from its nodes' interpolation, extrapolated past the last node: QuantLib's yoyRateImpl of the kind's interpolated curve.

static double YoyRateImpl(Interpolation interpolation, double t)

Parameters

interpolation Interpolation

The interpolation of the nodes' rates.

t double

The time.

Returns

double

The rate.

Remarks

The interpolation's value, extrapolated.