Swaption Volatility Term Structures

Overview

functions to construct and use SwaptionVolatilityStructure objects.

Function List

qlConstantSwaptionVolatility ()
qlDenseSabrParameters ()
qlMarketVolCube ()
qlRelinkableHandleSwaptionVolatilityStructure ()
qlSmileSectionByCube ()
qlSmileSectionByCube2 ()
qlSparseSabrParameters ()
qlSpreadedSwaptionVolatility ()
qlSwaptionVTSBlackVariance ()
qlSwaptionVTSBlackVariance2 ()
qlSwaptionVTSBusinessDayConvention ()
qlSwaptionVTSMatrix ()
qlSwaptionVTSMatrixLocate ()
qlSwaptionVTSMatrixOptionDates ()
qlSwaptionVTSMatrixOptionTenors ()
qlSwaptionVTSMatrixSwapTenors ()
qlSwaptionVTSMaxSwapTenor ()
qlSwaptionVTSOptionDateFromTenor ()
qlSwaptionVTSSwapLength ()
qlSwaptionVTSSwapLength2 ()
qlSwaptionVTSVolatility ()
qlSwaptionVTSVolatility2 ()
qlSwaptionVTSatmStrike ()
qlSwaptionVTSatmStrike2 ()
qlSwaptionVolCube1 ()
qlSwaptionVolCube2 ()
qlVolCubeAtmCalibrated ()

Function Documentation

qlConstantSwaptionVolatility

string returnValue
qlConstantSwaptionVolatility(
string ObjectId
long NDays
string Calendar
string BusinessDayConvention
string Volatility
string DayCounter
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class ConstantSwaptionVolatility and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
NDaysnumber of days to advance from EvaluationDate: it fixes the date at which the variance = 0.0. Default value = 0.
Calendarholiday calendar (e.g. TARGET) used for calculating the exercise dates from the expiries.
BusinessDayConventionBusiness day convention used for calculating the exercise dates from the expiries.
Volatilitycap/floor constant volatility Quote.
DayCounterDayCounter ID. Default value = Actual/365 (Fixed).
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlDenseSabrParameters

vector<vector<any> > returnValue
qlDenseSabrParameters(
string ObjectId
any Trigger)
Description:

returns results of Sabr calibration for the given SwaptionVolCube1 object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::SwaptionVolCube1 object
Triggerdependency tracking trigger

qlMarketVolCube

vector<vector<any> > returnValue
qlMarketVolCube(
string ObjectId
any Trigger)
Description:

returns the market volatility cube for the given SwaptionVolCube1 object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::SwaptionVolCube1 object
Triggerdependency tracking trigger

qlRelinkableHandleSwaptionVolatilityStructure

string returnValue
qlRelinkableHandleSwaptionVolatilityStructure(
string ObjectId
string CurrentLink
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class RelinkableHandleImpl<QuantLibAddin::SwaptionVolatilityStructure, QuantLib::SwaptionVolatilityStructure> and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
CurrentLinkSwaptionVolatilityStructure object ID. If omitted, nothing is linked by the RelinkableHandle. Default value = .
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlSmileSectionByCube

string returnValue
qlSmileSectionByCube(
string ObjectId
string VolCube
long OptionDate
string SwapTenor
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class SmileSectionByCube and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
VolCubeSwaption volatility cube object ID.
OptionDatesmile's expiry as date.
SwapTenorsmile's underlying swap length.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlSmileSectionByCube2

string returnValue
qlSmileSectionByCube2(
string ObjectId
string VolCube
string OptionDate
string SwapTenor
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class SmileSectionByCube and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
VolCubeSwaption volatility cube object ID.
OptionDatesmile's expiry as period.
SwapTenorsmile's underlying swap length.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlSparseSabrParameters

vector<vector<any> > returnValue
qlSparseSabrParameters(
string ObjectId
any Trigger)
Description:

returns results of Sabr calibration for the given SwaptionVolCube1 object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::SwaptionVolCube1 object
Triggerdependency tracking trigger

qlSpreadedSwaptionVolatility

string returnValue
qlSpreadedSwaptionVolatility(
string ObjectId
string BaseVolStructure
string Spread
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class SpreadedSwaptionVolatility and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
BaseVolStructureBase SwaptionVolatilityStructure object ID.
Spreadspread.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlSwaptionVTSBlackVariance

vector<double> returnValue
qlSwaptionVTSBlackVariance(
string ObjectId
vector<long> OptionDate
string SwapTenor
double Strike
bool AllowExtrapolation
any Trigger)
Description:

Returns variance from the given SwaptionVolatilityStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityStructure object
OptionDateswaption expiry date.
SwapTenorunderlying swap tenor.
Strikeswaption strike vector.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlSwaptionVTSBlackVariance2

vector<double> returnValue
qlSwaptionVTSBlackVariance2(
string ObjectId
vector<string> OptionTenor
string SwapTenor
double Strike
bool AllowExtrapolation
any Trigger)
Description:

Returns variance from the given SwaptionVolatilityStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityStructure object
OptionTenorswaption option tenor.
SwapTenorunderlying swap tenor.
Strikeswaption strike vector.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlSwaptionVTSBusinessDayConvention

string returnValue
qlSwaptionVTSBusinessDayConvention(
string ObjectId
any Trigger)
Description:

Returns the business day convention used for option date calculation by the given SwaptionVolatilityStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityStructure object
Triggerdependency tracking trigger

qlSwaptionVTSMatrix

string returnValue
qlSwaptionVTSMatrix(
string ObjectId
string Calendar
string BusinessDayConvention
vector<string> OptionTenors
vector<string> SwapTenors
vector<vector<string> > Volatilities
string DayCounter
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class SwaptionVolatilityMatrix and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
Calendarholiday calendar (e.g. TARGET) used for calculating the exercise dates from the expiries.
BusinessDayConventionBusiness day convention used for calculating the exercise dates from the expiries.
OptionTenorsswaption expiries as periods.
SwapTenorsunderlying swap lengths.
Volatilitiesvol quotes.
DayCounterDayCounter ID. Default value = Actual/365 (Fixed).
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlSwaptionVTSMatrixLocate

vector<long> returnValue
qlSwaptionVTSMatrixLocate(
string ObjectId
long OptionDate
string SwapTenor
any Trigger)
Description:

Returns the lower indexes of surrounding volatility matrix corners for the given SwaptionVolatilityMatrix object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::SwaptionVolatilityMatrix object
OptionDateswaption expiry date.
SwapTenorUnderlying swap length as period (e.g. 5Y).
Triggerdependency tracking trigger

qlSwaptionVTSMatrixOptionDates

vector<long> returnValue
qlSwaptionVTSMatrixOptionDates(
string ObjectId
any Trigger)
Description:

Returns the vector of swaption exercise dates for the given SwaptionVolatilityDiscrete object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityDiscrete object
Triggerdependency tracking trigger

qlSwaptionVTSMatrixOptionTenors

vector<string> returnValue
qlSwaptionVTSMatrixOptionTenors(
string ObjectId
any Trigger)
Description:

Returns the vector of swaption exercise tenors for the given SwaptionVolatilityDiscrete object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityDiscrete object
Triggerdependency tracking trigger

qlSwaptionVTSMatrixSwapTenors

vector<string> returnValue
qlSwaptionVTSMatrixSwapTenors(
string ObjectId
any Trigger)
Description:

Returns the vector of underlying swap tenors for the given SwaptionVolatilityDiscrete object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityDiscrete object
Triggerdependency tracking trigger

qlSwaptionVTSMaxSwapTenor

string returnValue
qlSwaptionVTSMaxSwapTenor(
string ObjectId
any Trigger)
Description:

Returns the max swap tenor (i.e. length) for which the given SwaptionVolatilityStructure object can return vols.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityStructure object
Triggerdependency tracking trigger

qlSwaptionVTSOptionDateFromTenor

vector<long> returnValue
qlSwaptionVTSOptionDateFromTenor(
string ObjectId
vector<string> OptionTenor
any Trigger)
Description:

Returns the option date corresponding to a given option tenor, taking calendar and business day convention into account, for the given SwaptionVolatilityStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityStructure object
OptionTenorswaption option tenor.
Triggerdependency tracking trigger

qlSwaptionVTSSwapLength

vector<double> returnValue
qlSwaptionVTSSwapLength(
string ObjectId
vector<string> SwapTenor
any Trigger)
Description:

Returns the swap length corresponding to a given swap tenor for the given SwaptionVolatilityStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityStructure object
SwapTenorswap tenor.
Triggerdependency tracking trigger

qlSwaptionVTSSwapLength2

double returnValue
qlSwaptionVTSSwapLength2(
string ObjectId
long SwapStart
long SwapEnd
any Trigger)
Description:

Returns the swap length corresponding to a given swap start/end dates for the given SwaptionVolatilityStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityStructure object
SwapStartswap start date.
SwapEndswap end date.
Triggerdependency tracking trigger

qlSwaptionVTSVolatility

vector<double> returnValue
qlSwaptionVTSVolatility(
string ObjectId
long OptionDate
string SwapTenor
vector<double> Strike
bool AllowExtrapolation
any Trigger)
Description:

Returns volatility from the given SwaptionVolatilityStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityStructure object
OptionDateswaption expiry date.
SwapTenorUnderlying swap length as period (e.g. 5Y).
Strikeswaption strike.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlSwaptionVTSVolatility2

vector<double> returnValue
qlSwaptionVTSVolatility2(
string ObjectId
string OptionTenor
string SwapTenor
vector<double> Strike
bool AllowExtrapolation
any Trigger)
Description:

Returns volatility from the given SwaptionVolatilityStructure object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityStructure object
OptionTenorswaption option tenor.
SwapTenorUnderlying swap length as period (e.g. 5Y).
Strikeswaption strike.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlSwaptionVTSatmStrike

vector<double> returnValue
qlSwaptionVTSatmStrike(
string ObjectId
vector<long> OptionDate
string SwapTenor
any Trigger)
Description:

Returns the at-the-money swaption strike, for a given exercise date and underlying swap length, for the given SwaptionVolatilityCube object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityCube object
OptionDateswaption expiry date.
SwapTenorUnderlying swap length as period (e.g. 5Y).
Triggerdependency tracking trigger

qlSwaptionVTSatmStrike2

vector<double> returnValue
qlSwaptionVTSatmStrike2(
string ObjectId
vector<string> OptionTenor
string SwapTenor
any Trigger)
Description:

Returns the at-the-money swaption strike, for a given option tenor and underlying swap length, for the given SwaptionVolatilityCube object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SwaptionVolatilityCube object
OptionTenorswaption's option tenor.
SwapTenorUnderlying swap length as period (e.g. 5Y).
Triggerdependency tracking trigger

qlSwaptionVolCube1

string returnValue
qlSwaptionVolCube1(
string ObjectId
string AtmVolStructure
vector<string> OptionTenors
vector<string> SwapTenors
vector<double> StrikeSpreads
vector<vector<string> > SpreadVols
string SwapIndexBase
string ShortSwapIndexBase
bool VegaWeightedSmileFit
vector<vector<string> > Guess
vector<bool> IsFixed
bool IsAtmCalibrated
string EndCriteria
double MaxErrorTol
string OptMethod
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class SwaptionVolCube1 and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
AtmVolStructureAt-the-money volatility structure.
OptionTenorssmile cube's expiries as periods.
SwapTenorssmile cube's underlying swap lengths.
StrikeSpreadssmile cube's strike spreads over the ATM strike rate.
SpreadVolsmatrix of spread vol quotes.
SwapIndexBaseBase SwapIndex object ID.
ShortSwapIndexBaseShort base SwapIndex object ID.
VegaWeightedSmileFitif TRUE the smile fit is weighted using options' vega. Default value = true.
Guessmatrix of parameters guess quotes.
IsFixedif TRUE parameter guess is not calibrated.
IsAtmCalibratedif TRUE the cube is calibrated to atm matrix .
EndCriteriaEndCriteria object ID. Default value = .
MaxErrorTolmax error tolerance. Default value = QuantLib::Null<QuantLib::Real>().
OptMethodOptmization method object ID. Default value = .
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlSwaptionVolCube2

string returnValue
qlSwaptionVolCube2(
string ObjectId
string AtmVolStructure
vector<string> OptionTenor
vector<string> SwapTenor
vector<double> StrikeSpreads
vector<vector<string> > SpreadVols
string SwapIndexBase
string ShortSwapIndexBase
bool VegaWeightedSmileFit
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class SwaptionVolCube2 and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
AtmVolStructureAt-the-money volatility structure.
OptionTenorsmile cube's expiries as periods.
SwapTenorsmile cube's underlying swap lengths.
StrikeSpreadssmile cube's strike spreads over the ATM strike rate.
SpreadVolsmatrix of spread vol quotes.
SwapIndexBaseBase SwapIndex object ID.
ShortSwapIndexBaseShort base SwapIndex object ID.
VegaWeightedSmileFitif TRUE the smile fit is weighted using options' vega. Default value = true.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlVolCubeAtmCalibrated

vector<vector<any> > returnValue
qlVolCubeAtmCalibrated(
string ObjectId
any Trigger)
Description:

returns the volatility cube calibrated to ATM matrix for the given SwaptionVolCube1 object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::SwaptionVolCube1 object
Triggerdependency tracking trigger