Correlation

Overview

functions to construct and use Correlation objects.

Function List

qlCotSwapFromFwdCorrelation ()
qlExponentialCorrelations ()
qlExponentialForwardCorrelation ()
qlHistoricalForwardRatesAnalysis ()
qlHistoricalForwardRatesAnalysisFailedDates ()
qlHistoricalForwardRatesAnalysisFailedDatesErrorMessage ()
qlHistoricalForwardRatesAnalysisFixingPeriods ()
qlHistoricalForwardRatesAnalysisSkippedDates ()
qlHistoricalForwardRatesAnalysisSkippedDatesErrorMessage ()
qlHistoricalRatesAnalysis ()
qlHistoricalRatesAnalysisSkippedDates ()
qlHistoricalRatesAnalysisSkippedDatesErrorMessage ()
qlMarketModelLmLinearExponentialCorrelationModel ()
qlPiecewiseConstantCorrelationCorrelation ()
qlPiecewiseConstantCorrelationNumberOfRates ()
qlPiecewiseConstantCorrelationTimes ()
qlTimeHomogeneousForwardCorrelation ()

Function Documentation

qlCotSwapFromFwdCorrelation

string returnValue
qlCotSwapFromFwdCorrelation(
string ObjectId
string FwdCorr
string CurveState
double Displacement
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class CotSwapFromFwdCorrelation and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
FwdCorrForward rates correlation (i.e. PiecewiseConstantCorrelation object ID).
CurveStatecurveState.
Displacementdisplacement. Default value = 0.0.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlExponentialCorrelations

vector<vector<double> > returnValue
qlExponentialCorrelations(
vector<double> RateTimes
double LongTermCorr
double Beta
double Gamma
double Time
any Trigger)
Description:

Returns the correlation matrix (time dependent long term + beta + gamma exponential functional form).

Supported Platforms:

Excel, Calc

Parameters
RateTimesrate fixing times.
LongTermCorrLong term correlation . Default value = 0.0.
Betaexponential decay factor. Default value = 0.24.
Gammaexponent for time to go. Default value = 0.333.
Timetime t .
Triggerdependency tracking trigger

qlExponentialForwardCorrelation

string returnValue
qlExponentialForwardCorrelation(
string ObjectId
vector<double> RateTimes
double LongTermCorr
double Beta
double Gamma
vector<double> Times
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class ExponentialForwardCorrelation and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
RateTimesrate times.
LongTermCorrLong term correlation .
Betaexponential decay factor.
Gammaexponent for time to go.
Timestimes.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlHistoricalForwardRatesAnalysis

string returnValue
qlHistoricalForwardRatesAnalysis(
string ObjectId
string SequenceStats
long StartDate
long EndDate
string Step
string IborIndex
string InitialGap
string Horizon
vector<string> IborIndexes
vector<string> SwapIndexes
string DayCounter
string TraitsID
string InterpolatorID
double BootstrapAccuracy
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class HistoricalForwardRatesAnalysis and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
SequenceStatsSequence Statistics object ID.
StartDatebeginning of the time series.
EndDateend of the time series.
Steptime series' time step.
IborIndexfloating rate index.
InitialGapinitialGap.
Horizonbootstrap horizon.
IborIndexesIbor indexes.
SwapIndexesSwap indexes.
DayCounteryield curve DayCounter ID. Default value = Actual/365 (Fixed).
TraitsIDDiscount, ZeroYield, or ForwardRate. Default value = Discount.
InterpolatorIDLinear, LogLinear, or CubicSpline. Default value = CubicSpline.
BootstrapAccuracyboostrap accuracy. Default value = 1.0e-12.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlHistoricalForwardRatesAnalysisFailedDates

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

Returns vector of dates for which forward rates could not be calculated.

Supported Platforms:

Excel

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

qlHistoricalForwardRatesAnalysisFailedDatesErrorMessage

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

Returns vector of error messages for dates on which forward rates could not be calculated.

Supported Platforms:

Excel

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

qlHistoricalForwardRatesAnalysisFixingPeriods

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

Returns the forward rates time grid.

Supported Platforms:

Excel

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

qlHistoricalForwardRatesAnalysisSkippedDates

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

Returns vector of historic dates for which some fixing is missing.

Supported Platforms:

Excel

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

qlHistoricalForwardRatesAnalysisSkippedDatesErrorMessage

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

Returns vector of error messages for historic dates with missing fixing.

Supported Platforms:

Excel

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

qlHistoricalRatesAnalysis

string returnValue
qlHistoricalRatesAnalysis(
string ObjectId
string SequenceStats
long StartDate
long EndDate
string Step
vector<string> InterestRateIndexes
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class HistoricalRatesAnalysis and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
SequenceStatsSequence Statistics object ID.
StartDatebeginning of the time series.
EndDateend of the time series.
Steptime series' time step.
InterestRateIndexesinterest rate indexes object IDs.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlHistoricalRatesAnalysisSkippedDates

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

Returns vector of historic dates for which some fixing is missing.

Supported Platforms:

Excel

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

qlHistoricalRatesAnalysisSkippedDatesErrorMessage

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

Returns vector of error messages for historic dates with missing fixing.

Supported Platforms:

Excel

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

qlMarketModelLmLinearExponentialCorrelationModel

string returnValue
qlMarketModelLmLinearExponentialCorrelationModel(
string ObjectId
long Size
double Rho
double Beta
long Factors
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class LmLinearExponentialCorrelationModel and return its id

Supported Platforms:

Excel, C++, Calc

Parameters
ObjectIdid of object to be created
Sizesize.
Rhorho.
Betabeta.
Factorsfactors. Default value = QuantLib::Null<QuantLib::Size>().
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlPiecewiseConstantCorrelationCorrelation

vector<vector<double> > returnValue
qlPiecewiseConstantCorrelationCorrelation(
string ObjectId
long TimeIndex
any Trigger)
Description:

Returns the pseudo-root of the equivalent covariance swap rates matrix.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::PiecewiseConstantCorrelation object
TimeIndextime index.
Triggerdependency tracking trigger

qlPiecewiseConstantCorrelationNumberOfRates

long returnValue
qlPiecewiseConstantCorrelationNumberOfRates(
string ObjectId
any Trigger)
Description:

Piecewise Constant Correlation Number of Rates.

Supported Platforms:

Excel, Calc

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

qlPiecewiseConstantCorrelationTimes

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

Piecewise Constant Correlation Times.

Supported Platforms:

Excel, Calc

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

qlTimeHomogeneousForwardCorrelation

string returnValue
qlTimeHomogeneousForwardCorrelation(
string ObjectId
vector<vector<double> > FwdCorrMatrix
vector<double> RateTimes
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class TimeHomogeneousForwardCorrelation and return its id

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of object to be created
FwdCorrMatrixforward correlation matrix.
RateTimesrate times.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag