MarketModels

Overview

functions to construct and use Market Models related objects.

Function List

qlAbcdVol ()
qlAnnuity ()
qlCmSwapForwardJacobian ()
qlCmSwapZedMatrix ()
qlCoinitialSwapForwardJacobian ()
qlCoinitialSwapZedMatrix ()
qlCotSwapToFwdAdapter ()
qlCoterminalSwapForwardJacobian ()
qlCoterminalSwapZedMatrix ()
qlFlatVol ()
qlFlatVolFactory ()
qlFwdPeriodAdapter ()
qlFwdToCotSwapAdapter ()
qlMarketModelCovariance ()
qlMarketModelDisplacements ()
qlMarketModelInitialRates ()
qlMarketModelNumberOfFactors ()
qlMarketModelNumberOfRates ()
qlMarketModelNumberOfSteps ()
qlMarketModelPseudoRoot ()
qlMarketModelTimeDependentVolatility ()
qlMarketModelTotalCovariance ()
qlPseudoRootFacade ()
qlRateInstVolDifferences ()
qlRateVolDifferences ()
qlSwapDerivative ()

Function Documentation

qlAbcdVol

string returnValue
qlAbcdVol(
string ObjectId
double A
double B
double C
double D
vector<double> Ks
string Correlations
string EvolutionDescription
long Factors
vector<double> InitialRates
vector<double> Displacements
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class AbcdVol and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
Athe a coefficient in the abcd vol parametrization.
Bthe b coefficient in the abcd vol parametrization.
Cthe c coefficient in the abcd vol parametrization.
Dthe d coefficient in the abcd vol parametrization.
KsK_i adjustment factors in the abcd vol parametrization.
CorrelationsPiecewiseConstantCorrelation object ID.
EvolutionDescriptionEvolutionDescription object.
Factorsnumber of factors to be retained in the simulation.
InitialRatesinitial rates.
Displacementsdisplacements.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlAnnuity

double returnValue
qlAnnuity(
string CurveState
long StartIndex
long EndIndex
long NumeraireIndex
any Trigger)
Description:

returns annuity of arbitrary swap-rate.

Supported Platforms:

Excel, Calc

Parameters
CurveStateCurveState object ID.
StartIndexstart index.
EndIndexend index.
NumeraireIndexnumeraire index. Default value = 0.
Triggerdependency tracking trigger

qlCmSwapForwardJacobian

vector<vector<double> > returnValue
qlCmSwapForwardJacobian(
string CurveState
long SpanningForwards
any Trigger)
Description:

Returns the jacobian between constant maturity swap rates and forward rates.

Supported Platforms:

Excel, Calc

Parameters
CurveStateCurveState object ID.
SpanningForwardsnumber of forwards underlying the CMS.
Triggerdependency tracking trigger

qlCmSwapZedMatrix

vector<vector<double> > returnValue
qlCmSwapZedMatrix(
string CurveState
long SpanningForwards
double Displacement
any Trigger)
Description:

Returns the Z matrix to switch base from forward to constant maturity swap rates.

Supported Platforms:

Excel, Calc

Parameters
CurveStateCurveState object ID.
SpanningForwardsnumber of forwards underlying the CMS.
Displacementdisplacement. Default value = 0.0.
Triggerdependency tracking trigger

qlCoinitialSwapForwardJacobian

vector<vector<double> > returnValue
qlCoinitialSwapForwardJacobian(
string CurveState
any Trigger)
Description:

Returns the jacobian between coinitial swap rates and forward rates.

Supported Platforms:

Excel, Calc

Parameters
CurveStateCurveState object ID.
Triggerdependency tracking trigger

qlCoinitialSwapZedMatrix

vector<vector<double> > returnValue
qlCoinitialSwapZedMatrix(
string CurveState
double Displacement
any Trigger)
Description:

Returns the Z matrix to switch base from forward to coinitial swap rates.

Supported Platforms:

Excel, Calc

Parameters
CurveStateCurveState object ID.
Displacementdisplacement. Default value = 0.0.
Triggerdependency tracking trigger

qlCotSwapToFwdAdapter

string returnValue
qlCotSwapToFwdAdapter(
string ObjectId
string CoterminalModel
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class CotSwapToFwdAdapter and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
CoterminalModelCoTerminal Swap Market Model ID.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlCoterminalSwapForwardJacobian

vector<vector<double> > returnValue
qlCoterminalSwapForwardJacobian(
string CurveState
any Trigger)
Description:

Returns the jacobian between coterminal swap rates and forward rates.

Supported Platforms:

Excel, Calc

Parameters
CurveStateCurveState object ID.
Triggerdependency tracking trigger

qlCoterminalSwapZedMatrix

vector<vector<double> > returnValue
qlCoterminalSwapZedMatrix(
string CurveState
double Displacement
any Trigger)
Description:

Returns the Z matrix to switch base from forward to coterminal swap rates.

Supported Platforms:

Excel, Calc

Parameters
CurveStateCurveState object ID.
Displacementdisplacement. Default value = 0.0.
Triggerdependency tracking trigger

qlFlatVol

string returnValue
qlFlatVol(
string ObjectId
vector<double> Volatilities
string Correlations
string EvolutionDescription
long Factors
vector<double> InitialRates
vector<double> Displacements
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class FlatVol and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
Volatilitiesvolatilities.
CorrelationsPiecewiseConstantCorrelation object ID.
EvolutionDescriptionEvolutionDescription object.
Factorsnumber of factors to be retained in the simulation.
InitialRatesinitial rates.
Displacementsdisplacements.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlFlatVolFactory

string returnValue
qlFlatVolFactory(
string ObjectId
double LongTermCorr
double Beta
vector<double> Times
vector<double> Volatilities
string YieldCurve
double Displacement
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class FlatVolFactory and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
LongTermCorrLong term correlation L in rho=L+(1-L)*exp(-beta*abs(Ti-Tj)).
Betabeta in rho=L+(1-L)*exp(-beta*abs(Ti-Tj)).
Timestimes.
Volatilitiesvolatilities.
YieldCurvediscounting yield term structure object ID.
Displacementdisplacement. Default value = 0.0.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlFwdPeriodAdapter

string returnValue
qlFwdPeriodAdapter(
string ObjectId
string LargeModel
long Period
long Offset
vector<double> Displacements
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class FwdPeriodAdapter and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
LargeModellarge MarketModel ID.
Periodtarget period (e.g. 2 if going from semiannual LMM to annual LMM).
Offsetrate index offset, in order to pin down swaption coterminal to the last rate time.
Displacementsdisplacements.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlFwdToCotSwapAdapter

string returnValue
qlFwdToCotSwapAdapter(
string ObjectId
string ForwardModel
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class FwdToCotSwapAdapter and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
ForwardModelForward Rate Market Model ID.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlMarketModelCovariance

vector<vector<double> > returnValue
qlMarketModelCovariance(
string ObjectId
long Index
any Trigger)
Description:

Returns the covariance matrix for the i-th step.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::MarketModel object
Indexevolution step index.
Triggerdependency tracking trigger

qlMarketModelDisplacements

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

rates' displacemets for the MarketModel object.

Supported Platforms:

Excel, Calc

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

qlMarketModelInitialRates

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

initial rates for the MarketModel object.

Supported Platforms:

Excel, Calc

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

qlMarketModelNumberOfFactors

long returnValue
qlMarketModelNumberOfFactors(
string ObjectId
any Trigger)
Description:

number of factors for the MarketModel object.

Supported Platforms:

Excel, Calc

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

qlMarketModelNumberOfRates

long returnValue
qlMarketModelNumberOfRates(
string ObjectId
any Trigger)
Description:

number of rates for the MarketModel object.

Supported Platforms:

Excel, Calc

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

qlMarketModelNumberOfSteps

long returnValue
qlMarketModelNumberOfSteps(
string ObjectId
any Trigger)
Description:

number of steps for the MarketModel object.

Supported Platforms:

Excel, Calc

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

qlMarketModelPseudoRoot

vector<vector<double> > returnValue
qlMarketModelPseudoRoot(
string ObjectId
long Index
any Trigger)
Description:

Returns the pseudo root for the i-th step.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::MarketModel object
Indexevolution step index.
Triggerdependency tracking trigger

qlMarketModelTimeDependentVolatility

vector<double> returnValue
qlMarketModelTimeDependentVolatility(
string ObjectId
long Index
any Trigger)
Description:

Returns the time dependent vol for rate i.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::MarketModel object
Indexrate index.
Triggerdependency tracking trigger

qlMarketModelTotalCovariance

vector<vector<double> > returnValue
qlMarketModelTotalCovariance(
string ObjectId
long Index
any Trigger)
Description:

Returns the covariance matrix from start up to the i-th step.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::MarketModel object
Indexevolution step index.
Triggerdependency tracking trigger

qlPseudoRootFacade

string returnValue
qlPseudoRootFacade(
string ObjectId
string Calibrator
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class PseudoRootFacade and return its id

Supported Platforms:

Excel, C++, Calc

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

qlRateInstVolDifferences

vector<double> returnValue
qlRateInstVolDifferences(
string MarketModel1
string MarketModel2
long Index
any Trigger)
Description:

Compute the differences between volatilities at each evolution step.

Supported Platforms:

Excel, Calc

Parameters
MarketModel1First Market Model.
MarketModel2Second Market Model.
IndexForward Rate index.
Triggerdependency tracking trigger

qlRateVolDifferences

vector<double> returnValue
qlRateVolDifferences(
string MarketModel1
string MarketModel2
any Trigger)
Description:

Compute the differences between all implied forwards volatilities.

Supported Platforms:

Excel, Calc

Parameters
MarketModel1First Market Model.
MarketModel2Second Market Model.
Triggerdependency tracking trigger

qlSwapDerivative

double returnValue
qlSwapDerivative(
string CurveState
long StartIndex
long EndIndex
long FwdRateIndex
any Trigger)
Description:

returns derivative of swap-rate to underlying forward rate.

Supported Platforms:

Excel, Calc

Parameters
CurveStateCurveState object ID.
StartIndexstart index.
EndIndexend index.
FwdRateIndexforward rate index. Default value = 0.
Triggerdependency tracking trigger