QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
InterpolatedSwaptionVolatilityCube Class Reference

Interpolated Swaption Volatility Cube. More...

#include <ql/termstructures/volatility/swaption/interpolatedswaptionvolatilitycube.hpp>

Inheritance diagram for InterpolatedSwaptionVolatilityCube:

Public Member Functions

 InterpolatedSwaptionVolatilityCube (const Handle< SwaptionVolatilityStructure > &atmVolStructure, const std::vector< Period > &optionTenors, const std::vector< Period > &swapTenors, const std::vector< Spread > &strikeSpreads, const std::vector< std::vector< Handle< Quote > > > &volSpreads, const ext::shared_ptr< SwapIndex > &swapIndexBase, const ext::shared_ptr< SwapIndex > &shortSwapIndexBase, bool vegaWeightedSmileFit)
LazyObject interface
void performCalculations () const override
Public Member Functions inherited from SwaptionVolatilityCube
 SwaptionVolatilityCube (const Handle< SwaptionVolatilityStructure > &atmVolStructure, const std::vector< Period > &optionTenors, const std::vector< Period > &swapTenors, const std::vector< Spread > &strikeSpreads, std::vector< std::vector< Handle< Quote > > > volSpreads, ext::shared_ptr< SwapIndex > swapIndexBase, ext::shared_ptr< SwapIndex > shortSwapIndexBase, bool vegaWeightedSmileFit)
DayCounter dayCounter () const override
 the day counter used for date/time conversion
Date maxDate () const override
 the latest date for which the curve can return values
Time maxTime () const override
 the latest time for which the curve can return values
const DatereferenceDate () const override
 the date at which discount = 1.0 and/or variance = 0.0
Calendar calendar () const override
 the calendar used for reference and/or option date calculation
Natural settlementDays () const override
 the settlementDays used for reference date calculation
Rate minStrike () const override
 the minimum strike for which the term structure can return vols
Rate maxStrike () const override
 the maximum strike for which the term structure can return vols
const PeriodmaxSwapTenor () const override
 the largest length for which the term structure can return vols
Rate atmStrike (const Date &optionDate, const Period &swapTenor) const
Rate atmStrike (const Period &optionTenor, const Period &swapTenor) const
Handle< SwaptionVolatilityStructureatmVol () const
const std::vector< Spread > & strikeSpreads () const
const std::vector< std::vector< Handle< Quote > > > & volSpreads () const
ext::shared_ptr< SwapIndexswapIndexBase () const
ext::shared_ptr< SwapIndexshortSwapIndexBase () const
bool vegaWeightedSmileFit () const
void performCalculations () const override
VolatilityType volatilityType () const override
 volatility type

SwaptionVolatilityCube inspectors

const MatrixvolSpreads (Size i) const
ext::shared_ptr< SmileSectionsmileSectionImpl (const Date &optionDate, const Period &swapTenor) const override
ext::shared_ptr< SmileSectionsmileSectionImpl (Time optionTime, Time swapLength) const override

Additional Inherited Members

void registerWithVolatilitySpread ()
virtual Size requiredNumberOfStrikes () const
Volatility volatilityImpl (Time optionTime, Time swapLength, Rate strike) const override
Volatility volatilityImpl (const Date &optionDate, const Period &swapTenor, Rate strike) const override
Real shiftImpl (Time optionTime, Time swapLength) const override
Handle< SwaptionVolatilityStructureatmVol_
Size nStrikes_
std::vector< SpreadstrikeSpreads_
std::vector< RatelocalStrikes_
std::vector< VolatilitylocalSmile_
std::vector< std::vector< Handle< Quote > > > volSpreads_
ext::shared_ptr< SwapIndexswapIndexBase_
ext::shared_ptr< SwapIndexshortSwapIndexBase_
bool vegaWeightedSmileFit_

Detailed Description

Interpolated Swaption Volatility Cube.

This class implements the Interpolated Swaption Volatility Cube, which is able to interpolate between the volatility spreads provided.

Constructor & Destructor Documentation

◆ InterpolatedSwaptionVolatilityCube()

InterpolatedSwaptionVolatilityCube ( const Handle< SwaptionVolatilityStructure > & atmVolStructure,
const std::vector< Period > & optionTenors,
const std::vector< Period > & swapTenors,
const std::vector< Spread > & strikeSpreads,
const std::vector< std::vector< Handle< Quote > > > & volSpreads,
const ext::shared_ptr< SwapIndex > & swapIndexBase,
const ext::shared_ptr< SwapIndex > & shortSwapIndexBase,
bool vegaWeightedSmileFit )

The swaption vol cube is made up of ordered swaption vol surface layers, each layer referring to a swap index of a given length (in years), all indexes belonging to the same family. In order to identify the family (and its market conventions) an index of whatever length from that family must be passed in as swapIndexBase.

Often for short swap length the swap index family is different, e.g. the EUR case: swap vs 6M Euribor is used for length>1Y, while swap vs 3M Euribor is used for the 1Y length. The shortSwapIndexBase is used to identify this second family.

Member Function Documentation

◆ performCalculations()

void performCalculations ( ) const
overridevirtual

This method must implement any calculations which must be (re)done in order to calculate the desired results.

Implements LazyObject.

◆ smileSectionImpl() [1/2]

ext::shared_ptr< SmileSection > smileSectionImpl ( const Date & optionDate,
const Period & swapTenor ) const
overridevirtual

Reimplemented from SwaptionVolatilityStructure.

◆ smileSectionImpl() [2/2]

ext::shared_ptr< SmileSection > smileSectionImpl ( Time optionTime,
Time swapLength ) const
overridevirtual