Volatilities

Overview

functions to construct and use volatility objects.

Function List

qlAbcdAtmVolCurve ()
qlAbcdAtmVolCurveA ()
qlAbcdAtmVolCurveB ()
qlAbcdAtmVolCurveC ()
qlAbcdAtmVolCurveD ()
qlAbcdAtmVolCurveK ()
qlAbcdAtmVolCurveKatOptionTenors ()
qlAbcdAtmVolCurveMaxError ()
qlAbcdAtmVolCurveOptionDates ()
qlAbcdAtmVolCurveOptionTenors ()
qlAbcdAtmVolCurveOptionTenorsInInterpolation ()
qlAbcdAtmVolCurveOptionTimes ()
qlAbcdAtmVolCurveRmsError ()
qlAtmCurve ()
qlBlackAtmVolCurveAtmVariance ()
qlBlackAtmVolCurveAtmVariance2 ()
qlBlackAtmVolCurveAtmVariance3 ()
qlBlackAtmVolCurveAtmVol ()
qlBlackAtmVolCurveAtmVol2 ()
qlBlackAtmVolCurveAtmVol3 ()
qlBlackConstantVol ()
qlBlackVarianceSurface ()
qlBlackVolTermStructureBlackForwardVariance ()
qlBlackVolTermStructureBlackForwardVol ()
qlBlackVolTermStructureBlackVariance ()
qlBlackVolTermStructureBlackVol ()
qlSabrVolSurface ()
qlSabrVolatility ()
qlVolatilitySpreads ()
qlVolatilitySpreads2 ()
qlVolatilityTermStructureBusinessDayConvention ()
qlVolatilityTermStructureMaxStrike ()
qlVolatilityTermStructureMinStrike ()
qlVolatilityTermStructureOptionDateFromTenor ()

Function Documentation

qlAbcdAtmVolCurve

string returnValue
qlAbcdAtmVolCurve(
string ObjectId
long SettlementDays
string Calendar
vector<string> OptionTenors
vector<string> VolatilitiesQuotes
vector<bool> InclusionInInterpolation
string Convention
string DayCounter
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class AbcdAtmVolCurve and return its id

Supported Platforms:

Excel

Parameters
ObjectIdid of object to be created
SettlementDayssettlement days.
Calendarholiday calendar (e.g. TARGET).
OptionTenorsoptions tenors.
VolatilitiesQuotesvolatilities quotes.
InclusionInInterpolationinclusion flags. If omitted, all volatilities are interpolated.
Conventionbusiness day convention (e.g. Following).
DayCounterDayCounter ID. Default value = Actual/365 (Fixed).
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlAbcdAtmVolCurveA

double returnValue
qlAbcdAtmVolCurveA(
string ObjectId
any Trigger)
Description:

Returns the a coefficient in the abcd vol parametrization.

Supported Platforms:

Excel

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

qlAbcdAtmVolCurveB

double returnValue
qlAbcdAtmVolCurveB(
string ObjectId
any Trigger)
Description:

Returns the b coefficient in the abcd vol parametrization.

Supported Platforms:

Excel

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

qlAbcdAtmVolCurveC

double returnValue
qlAbcdAtmVolCurveC(
string ObjectId
any Trigger)
Description:

Returns the c coefficient in the abcd vol parametrization.

Supported Platforms:

Excel

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

qlAbcdAtmVolCurveD

double returnValue
qlAbcdAtmVolCurveD(
string ObjectId
any Trigger)
Description:

Returns the d coefficient in the abcd vol parametrization.

Supported Platforms:

Excel

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

qlAbcdAtmVolCurveK

double returnValue
qlAbcdAtmVolCurveK(
string ObjectId
double Time
any Trigger)
Description:

Returns the k adjustments factors needed to match the input Black vols at a given time.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::AbcdAtmVolCurve object
Timetime.
Triggerdependency tracking trigger

qlAbcdAtmVolCurveKatOptionTenors

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

Returns the k adjustments factors needed to match the input Black vols.

Supported Platforms:

Excel

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

qlAbcdAtmVolCurveMaxError

double returnValue
qlAbcdAtmVolCurveMaxError(
string ObjectId
any Trigger)
Description:

Returns the max error between the abcd implied Black vols and the given Black vols vector.

Supported Platforms:

Excel

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

qlAbcdAtmVolCurveOptionDates

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

Returns the options dates of the atm volatility curve.

Supported Platforms:

Excel

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

qlAbcdAtmVolCurveOptionTenors

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

Returns the options tenors of the atm volatility curve.

Supported Platforms:

Excel

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

qlAbcdAtmVolCurveOptionTenorsInInterpolation

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

Returns the options tenors used in the fitting of the atm volatility curve.

Supported Platforms:

Excel

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

qlAbcdAtmVolCurveOptionTimes

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

Returns the options times to maturity of the atm volatility curve.

Supported Platforms:

Excel

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

qlAbcdAtmVolCurveRmsError

double returnValue
qlAbcdAtmVolCurveRmsError(
string ObjectId
any Trigger)
Description:

Returns the root mean squared error between the abcd implied Black vols and the given Black vols vector.

Supported Platforms:

Excel

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

qlAtmCurve

string returnValue
qlAtmCurve(
string ObjectId
any Trigger)
Description:

Returns the Atm volatility curve.

Supported Platforms:

Excel

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

qlBlackAtmVolCurveAtmVariance

double returnValue
qlBlackAtmVolCurveAtmVariance(
string ObjectId
long OptionDate
bool AllowExtrapolation
any Trigger)
Description:

Returns the spot at-the-money (no-smile) variance at a given option date.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::BlackAtmVolCurve object
OptionDateThe date at which the volatility is evaluated.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlBlackAtmVolCurveAtmVariance2

double returnValue
qlBlackAtmVolCurveAtmVariance2(
string ObjectId
string OptionTenor
bool AllowExtrapolation
any Trigger)
Description:

Returns the spot at-the-money (no-smile) variance at a given option tenor.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::BlackAtmVolCurve object
OptionTenorThe tenor at which the volatility is evaluated.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlBlackAtmVolCurveAtmVariance3

double returnValue
qlBlackAtmVolCurveAtmVariance3(
string ObjectId
double OptionTime
bool AllowExtrapolation
any Trigger)
Description:

Returns the spot at-the-money (no-smile) variance at a given option time.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::BlackAtmVolCurve object
OptionTimeThe time at which the volatility is evaluated.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlBlackAtmVolCurveAtmVol

double returnValue
qlBlackAtmVolCurveAtmVol(
string ObjectId
long OptionDate
bool AllowExtrapolation
any Trigger)
Description:

Returns the spot at-the-money (no-smile) volatility at a given option date.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::BlackAtmVolCurve object
OptionDateThe date at which the volatility is evaluated.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlBlackAtmVolCurveAtmVol2

double returnValue
qlBlackAtmVolCurveAtmVol2(
string ObjectId
string OptionTenor
bool AllowExtrapolation
any Trigger)
Description:

Returns the spot at-the-money (no-smile) volatility at a given option tenor.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::BlackAtmVolCurve object
OptionTenorThe time at which the volatility is evaluated.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlBlackAtmVolCurveAtmVol3

double returnValue
qlBlackAtmVolCurveAtmVol3(
string ObjectId
double OptionTime
bool AllowExtrapolation
any Trigger)
Description:

Returns the spot at-the-money (no-smile) volatility at a given option time.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::BlackAtmVolCurve object
OptionTimeThe time at which the volatility is evaluated.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlBlackConstantVol

string returnValue
qlBlackConstantVol(
string ObjectId
long SettlementDate
string Calendar
double Volatility
string DayCounter
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class BlackConstantVol and return its id

Supported Platforms:

Excel, C, Calc, Guile, C++

Parameters
ObjectIdid of object to be created
SettlementDatesettlement date.
Calendarholiday calendar (e.g. TARGET).
Volatilityvolatility.
DayCounterDayCounter ID. Default value = Actual/365 (Fixed).
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlBlackVarianceSurface

string returnValue
qlBlackVarianceSurface(
string ObjectId
long SettlementDate
string Calendar
vector<long> Dates
vector<double> Strikes
vector<vector<double> > Volatilities
string DayCounter
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class BlackVarianceSurface and return its id

Supported Platforms:

Excel

Parameters
ObjectIdid of object to be created
SettlementDatesettlement date.
Calendarholiday calendar (e.g. TARGET).
Datesdates.
Strikesstrikes.
Volatilitiesvolatilities.
DayCounterDayCounter ID. Default value = Actual/365 (Fixed).
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlBlackVolTermStructureBlackForwardVariance

double returnValue
qlBlackVolTermStructureBlackForwardVariance(
string ObjectId
long ForwardDate
long OptionDate
double Strike
bool AllowExtrapolation
any Trigger)
Description:

Returns the black forward (at-the-money) variance at a given option date and strike.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::BlackVolTermStructure object
ForwardDateThe forward date at which the volatility is evaluated.
OptionDateThe date at which the variance is evaluated.
StrikeThe strike at which the variance is evaluated.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlBlackVolTermStructureBlackForwardVol

double returnValue
qlBlackVolTermStructureBlackForwardVol(
string ObjectId
long ForwardDate
long OptionDate
double Strike
bool AllowExtrapolation
any Trigger)
Description:

Returns the black forward (at-the-money) volatility at a given option date and strike.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::BlackVolTermStructure object
ForwardDateThe forward date at which the volatility is evaluated.
OptionDateThe option date at which the volatility is evaluated.
StrikeThe strike at which the volatility is evaluated.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlBlackVolTermStructureBlackVariance

double returnValue
qlBlackVolTermStructureBlackVariance(
string ObjectId
long OptionDate
double Strike
bool AllowExtrapolation
any Trigger)
Description:

Returns the black spot variance at a given option date and strike.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::BlackVolTermStructure object
OptionDateThe date at which the variance is evaluated.
StrikeThe strike at which the variance is evaluated.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlBlackVolTermStructureBlackVol

double returnValue
qlBlackVolTermStructureBlackVol(
string ObjectId
long OptionDate
double Strike
bool AllowExtrapolation
any Trigger)
Description:

Returns the black spot volatility at a given option date and strike.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::BlackVolTermStructure object
OptionDateThe date at which the volatility is evaluated.
StrikeThe strike at which the volatility is evaluated.
AllowExtrapolationExtrapolation Flag (TRUE allows extrapolation). Default value = false.
Triggerdependency tracking trigger

qlSabrVolSurface

string returnValue
qlSabrVolSurface(
string ObjectId
string InterestRateIndex
string BlackAtmVolCurve
vector<string> OptionTenors
vector<double> AtmRateSpreads
vector<vector<string> > VolatilitiesQuotes
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class SabrVolSurface and return its id

Supported Platforms:

Excel

Parameters
ObjectIdid of object to be created
InterestRateIndexinterest rate index object ID.
BlackAtmVolCurvethe atm volatility curve.
OptionTenorsoptions tenors.
AtmRateSpreadsspreads.
VolatilitiesQuotesvolatilities quotes.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlSabrVolatility

double returnValue
qlSabrVolatility(
double Strike
double Forward
double ExpTime
double Alpha
double Beta
double Nu
double Rho
any Trigger)
Description:

Sabr formula for smile volatility.

Supported Platforms:

Excel

Parameters
Strikeoption strike.
Forwardunderlying forward value.
ExpTimeexpiry time (in years).
Alphaalpha.
Betabeta.
Nunu.
Rhorho.
Triggerdependency tracking trigger

qlVolatilitySpreads

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

Returns the volatilities spread at a given date.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SabrVolSurface object
OptionDateThe date at which the volatility is evaluated.
Triggerdependency tracking trigger

qlVolatilitySpreads2

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

Returns the volatilities spread at a given date.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::SabrVolSurface object
OptionTenorThe tenor at which the volatility is evaluated.
Triggerdependency tracking trigger

qlVolatilityTermStructureBusinessDayConvention

string returnValue
qlVolatilityTermStructureBusinessDayConvention(
string ObjectId
any Trigger)
Description:

Returns the business day convention used in tenor to date conversion.

Supported Platforms:

Excel

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

qlVolatilityTermStructureMaxStrike

double returnValue
qlVolatilityTermStructureMaxStrike(
string ObjectId
any Trigger)
Description:

Returns the maximum strike for which the given VolatilityTermStructure can return vols.

Supported Platforms:

Excel

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

qlVolatilityTermStructureMinStrike

double returnValue
qlVolatilityTermStructureMinStrike(
string ObjectId
any Trigger)
Description:

Returns the minimum strike for which the given VolatilityTermStructure can return vols.

Supported Platforms:

Excel

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

qlVolatilityTermStructureOptionDateFromTenor

long returnValue
qlVolatilityTermStructureOptionDateFromTenor(
string ObjectId
string Tenor
any Trigger)
Description:

Returns the option date corrisponding to a given option tenor.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::VolatilityTermStructure object
Tenoroption tenor.
Triggerdependency tracking trigger