Table of Contents

Class TenorSwaptionVTS

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

A normal swaption volatility on a target floating tenor and fixed frequency transformed from one on a base floating tenor and fixed frequency: QuantLib's TenorSwaptionVTS.

[Experimental("NQL0001")]
public sealed class TenorSwaptionVTS : SwaptionVolatilityStructure
Inheritance
TenorSwaptionVTS
Inherited Members
Extension Methods

Remarks

A target swaption's smile is the base smile at a strike mapped through the tenor basis spread, under an affine terminal swap rate model fitted to the base swaption's deterministic flows, scaled by the target swap's annuity against the final swap's. A smile section is built per query, as QuantLib's, from the swaps' fair rates on the discount curve; the swaps are built in the context the structure was built with, which it keeps. The target floating schedule is on the base index's calendar, as QuantLib's.

The swaps run the swap length rounded to whole months (Divergences/TenorSwaptionLengthTests.cs): QuantLib casts the length to whole years before it multiplies by twelve, so an 18-month tenor builds 12-month swaps; on whole years both are QuantLib's. A swap with no coupon on or after the discount curve's reference date leaves its flows empty, which QuantLib then reads the last of, undefined; here it is refused.

Constructors

TenorSwaptionVTS(SwaptionVolatilityStructure, YieldTermStructure, IborIndex, IborIndex, Period, Period, DayCounter, DayCounter, EvaluationContext)

Initializes a new instance of the TenorSwaptionVTS class.

public TenorSwaptionVTS(SwaptionVolatilityStructure baseVTS, YieldTermStructure discountCurve, IborIndex baseIndex, IborIndex targIndex, Period baseFixedFreq, Period targFixedFreq, DayCounter baseFixedDC, DayCounter targFixedDC, EvaluationContext context)

Parameters

baseVTS SwaptionVolatilityStructure

The base swaption volatility.

discountCurve YieldTermStructure

The discount curve.

baseIndex IborIndex

The base floating index.

targIndex IborIndex

The target floating index.

baseFixedFreq Period

The base swaps' fixed-leg tenor.

targFixedFreq Period

The target swaps' fixed-leg tenor.

baseFixedDC DayCounter

The base swaps' fixed-leg day counter.

targFixedDC DayCounter

The target swaps' fixed-leg day counter.

context EvaluationContext

The evaluation context the swaps are built and priced in.

Exceptions

ArgumentNullException

An argument is null.

Properties

BaseFixedDC

Gets the base swaps' fixed-leg day counter.

public DayCounter BaseFixedDC { get; }

Property Value

DayCounter

BaseFixedFreq

Gets the base swaps' fixed-leg tenor.

public Period BaseFixedFreq { get; }

Property Value

Period

BaseIndex

Gets the base floating index.

public IborIndex BaseIndex { get; }

Property Value

IborIndex

BaseVTS

Gets the base swaption volatility.

public SwaptionVolatilityStructure BaseVTS { get; }

Property Value

SwaptionVolatilityStructure

Context

Gets the evaluation context the swaps are built and priced in.

public EvaluationContext Context { get; }

Property Value

EvaluationContext

DiscountCurve

Gets the discount curve.

public YieldTermStructure DiscountCurve { get; }

Property Value

YieldTermStructure

MaxDate

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

public override Date MaxDate { get; }

Property Value

Date

Remarks

The base structure's.

MaxSwapTenor

Gets the largest swap tenor for which the structure returns volatilities.

public override Period MaxSwapTenor { get; }

Property Value

Period

Remarks

The base structure's.

TargFixedDC

Gets the target swaps' fixed-leg day counter.

public DayCounter TargFixedDC { get; }

Property Value

DayCounter

TargFixedFreq

Gets the target swaps' fixed-leg tenor.

public Period TargFixedFreq { get; }

Property Value

Period

TargIndex

Gets the target floating index.

public IborIndex TargIndex { get; }

Property Value

IborIndex

VolatilityType

Gets the type of the volatilities the structure returns; by default shifted lognormal.

public override VolatilityType VolatilityType { get; }

Property Value

VolatilityType

Remarks

Normal.

Methods

MaxStrike()

The maximum strike for which the structure returns values.

public override double MaxStrike()

Returns

double

The strike.

Remarks

The base structure's.

MinStrike()

The minimum strike for which the structure returns values.

public override double MinStrike()

Returns

double

The strike.

Remarks

The base structure's.

SmileSectionImpl(double, double)

The smile section for an option time and a swap length, without range checks.

protected override SmileSection SmileSectionImpl(double optionTime, double swapLength)

Parameters

optionTime double

The option time.

swapLength double

The swap length, in years.

Returns

SmileSection

The smile section.

VolatilityImpl(double, double, double)

The volatility for an option time, a swap length and a strike, without range checks.

protected override double VolatilityImpl(double optionTime, double swapLength, double strike)

Parameters

optionTime double

The option time.

swapLength double

The swap length, in years.

strike double

The strike.

Returns

double

The volatility.