Table of Contents

Class YoYInflationUnitDisplacedBlackCapFloorEngine

Namespace
NanoQL.PricingEngines
Assembly
NanoQL.dll

The unit-displaced Black-formula year-on-year inflation cap/floor engine: the strike and the forward displaced by 1.

public static class YoYInflationUnitDisplacedBlackCapFloorEngine
Inheritance
YoYInflationUnitDisplacedBlackCapFloorEngine
Inherited Members

Remarks

A static class: Calculate runs QuantLib's four steps (playbook §2.1) and returns the instrument's results, with QuantLib's additional results, read by Result<T>(string), each per optionlet and an ImmutableArray<T> of double: optionletsPrice, optionletsAtmForward (0 for an optionlet paid on or before the nominal curve's reference date) and optionletsStdDev, which a collar's results don't hold, as QuantLib's don't. QuantLib's setVolatility has no form: a call takes the volatility.

Each optionlet's forward is its coupon's own fixing: the published fixing once it is out, the forecast before, where QuantLib's reads the index's curve at the fixing date, a documented divergence. The index needs its year-on-year curve only where a forecast is needed, and refuses with QuantLib's empty-handle text there.

Methods

Calculate(YoYInflationCapFloor, EvaluationContext, YoYInflationIndex, YoYOptionletVolatilitySurface, YieldTermStructure)

Prices a year-on-year cap, floor or collar.

public static InstrumentResults Calculate(YoYInflationCapFloor capFloor, EvaluationContext context, YoYInflationIndex index, YoYOptionletVolatilitySurface volatility, YieldTermStructure nominalTermStructure)

Parameters

capFloor YoYInflationCapFloor

The instrument.

context EvaluationContext

The evaluation context.

index YoYInflationIndex

The year-on-year index the forwards are observed on.

volatility YoYOptionletVolatilitySurface

The optionlet volatility, lognormal in 1 plus the rate.

nominalTermStructure YieldTermStructure

The nominal curve the optionlets are discounted on.

Returns

InstrumentResults

The results: the expired results when the instrument has expired.

Exceptions

ArgumentNullException

An argument is null.

NanoQLException

A cash flow isn't a year-on-year inflation coupon, a forward can't be fixed or forecast, or the volatility refuses a fixing date or a strike.

ArgumentException

The formula refuses its inputs.