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
baseVolSwaptionVolatilityStructureThe base structure.
spreaddoubleThe spread added to its volatilities.
Exceptions
- ArgumentNullException
baseVolis null.
Properties
Calendar
Gets the calendar used for reference and/or option date calculation, if any.
public override Calendar? Calendar { get; }
Property Value
DayCounter
Gets the day counter used for date/time conversion.
public override DayCounter DayCounter { get; }
Property Value
MaxDate
Gets the latest date for which the curve can return values.
public override Date MaxDate { get; }
Property Value
MaxSwapTenor
Gets the largest swap tenor for which the structure returns volatilities.
public override Period MaxSwapTenor { get; }
Property Value
MaxTime
Gets the latest time for which the curve can return values.
public override double MaxTime { get; }
Property Value
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
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
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
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
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
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
optionTimedoubleThe option time.
swapLengthdoubleThe swap length, in years.
strikedoubleThe strike.
Returns
- double
The volatility.