Table of Contents

Class SpreadedSwaptionVolatility

Namespace
NanoQL.TermStructures
Assembly
NanoQL.dll

A swaption volatility structure that adds a constant spread to another's volatilities.

public sealed class SpreadedSwaptionVolatility : SwaptionVolatilityStructure
Inheritance
SpreadedSwaptionVolatility
Inherited Members
Extension Methods

Remarks

QuantLib's spread quote is its value: a new spread is a new structure. The base's dates, calendar, conventions, strikes, maximum swap tenor, type and shifts are the structure's, and so is its extrapolation flag, read when the structure is built, as QuantLib reads it. The base's volatilities, shifts and smile sections are read with extrapolation, and a smile section is a SpreadedSmileSection over the base's.

Constructors

SpreadedSwaptionVolatility(SwaptionVolatilityStructure, double)

Initializes a new instance of the SpreadedSwaptionVolatility class.

public SpreadedSwaptionVolatility(SwaptionVolatilityStructure baseVol, double spread)

Parameters

baseVol SwaptionVolatilityStructure

The base structure.

spread double

The spread added to its volatilities.

Exceptions

ArgumentNullException

baseVol is null.

Properties

Calendar

Gets the calendar used for reference and/or option date calculation, if any.

public override Calendar? Calendar { get; }

Property Value

Calendar

DayCounter

Gets the day counter used for date/time conversion.

public override DayCounter DayCounter { get; }

Property Value

DayCounter

MaxDate

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

public override Date MaxDate { get; }

Property Value

Date

MaxSwapTenor

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

public override Period MaxSwapTenor { get; }

Property Value

Period

MaxTime

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

public override double MaxTime { get; }

Property Value

double

SettlementDays

Gets the settlement days used for the reference date calculation; null for a structure built from its reference date, where QuantLib throws "settlement days not provided".

public override int? SettlementDays { get; }

Property Value

int?

VolatilityType

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

public override VolatilityType VolatilityType { get; }

Property Value

VolatilityType

Methods

MaxStrike()

The maximum strike for which the structure returns values.

public override double MaxStrike()

Returns

double

The strike.

MinStrike()

The minimum strike for which the structure returns values.

public override double MinStrike()

Returns

double

The strike.

ShiftImpl(double, double)

The base's shift, with extrapolation.

protected override double ShiftImpl(double optionTime, double swapLength)

Parameters

optionTime double

The option time.

swapLength double

The swap length, in years.

Returns

double

The shift.

SmileSectionImpl(Date, Period)

The base's smile section at the date and swap tenor, spreaded.

protected override SmileSection SmileSectionImpl(Date optionDate, Period swapTenor)

Parameters

optionDate Date

The option date.

swapTenor Period

The swap tenor.

Returns

SmileSection

The smile section.

SmileSectionImpl(double, double)

The base's smile section at the time and swap length, spreaded.

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(Date, Period, double)

The base's volatility plus the spread.

protected override double VolatilityImpl(Date optionDate, Period swapTenor, double strike)

Parameters

optionDate Date

The option date.

swapTenor Period

The swap tenor.

strike double

The strike.

Returns

double

The volatility.

VolatilityImpl(double, double, double)

The base's volatility plus the spread.

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.