QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
LMMDriftCalculator Class Reference

Drift computation for log-normal Libor market models. More...

#include <ql/models/marketmodels/driftcomputation/lmmdriftcalculator.hpp>

+ Collaboration diagram for LMMDriftCalculator:

Public Member Functions

 LMMDriftCalculator (const Matrix &pseudo, const std::vector< Spread > &displacements, const std::vector< Time > &taus, Size numeraire, Size alive)
 
void compute (const LMMCurveState &cs, std::vector< Real > &drifts) const
 Computes the drifts. More...
 
void compute (const std::vector< Rate > &fwds, std::vector< Real > &drifts) const
 
void computePlain (const LMMCurveState &cs, std::vector< Real > &drifts) const
 
void computePlain (const std::vector< Rate > &fwds, std::vector< Real > &drifts) const
 
void computeReduced (const LMMCurveState &cs, std::vector< Real > &drifts) const
 
void computeReduced (const std::vector< Rate > &fwds, std::vector< Real > &drifts) const
 

Private Attributes

Size numberOfRates_
 
Size numberOfFactors_
 
bool isFullFactor_
 
Size numeraire_
 
Size alive_
 
std::vector< Spreaddisplacements_
 
std::vector< RealoneOverTaus_
 
Matrix C_
 
Matrix pseudo_
 
std::vector< Realtmp_
 
Matrix e_
 
std::vector< Sizedowns_
 
std::vector< Sizeups_
 

Detailed Description

Drift computation for log-normal Libor market models.

Returns the drift \( \mu \Delta t \). See Mark Joshi, Rapid Computation of Drifts in a Reduced Factor Libor Market Model, Wilmott Magazine, May 2003.

Definition at line 40 of file lmmdriftcalculator.hpp.

Constructor & Destructor Documentation

◆ LMMDriftCalculator()

LMMDriftCalculator ( const Matrix pseudo,
const std::vector< Spread > &  displacements,
const std::vector< Time > &  taus,
Size  numeraire,
Size  alive 
)

Definition at line 29 of file lmmdriftcalculator.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ compute() [1/2]

void compute ( const LMMCurveState cs,
std::vector< Real > &  drifts 
) const

Computes the drifts.

Definition at line 67 of file lmmdriftcalculator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ compute() [2/2]

void compute ( const std::vector< Rate > &  fwds,
std::vector< Real > &  drifts 
) const

Definition at line 72 of file lmmdriftcalculator.cpp.

+ Here is the call graph for this function:

◆ computePlain() [1/2]

void computePlain ( const LMMCurveState cs,
std::vector< Real > &  drifts 
) const

Computes the drifts without factor reduction as in eqs. 2, 4 of ref. [1] (uses the covariance matrix directly).

Definition at line 85 of file lmmdriftcalculator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ computePlain() [2/2]

void computePlain ( const std::vector< Rate > &  fwds,
std::vector< Real > &  drifts 
) const

Definition at line 90 of file lmmdriftcalculator.cpp.

+ Here is the call graph for this function:

◆ computeReduced() [1/2]

void computeReduced ( const LMMCurveState cs,
std::vector< Real > &  drifts 
) const

Computes the drifts with factor reduction as in eq. 7 of ref. [1] (uses pseudo square root of the covariance matrix).

Definition at line 112 of file lmmdriftcalculator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ computeReduced() [2/2]

void computeReduced ( const std::vector< Rate > &  fwds,
std::vector< Real > &  drifts 
) const

Definition at line 117 of file lmmdriftcalculator.cpp.

Member Data Documentation

◆ numberOfRates_

Size numberOfRates_
private

Definition at line 68 of file lmmdriftcalculator.hpp.

◆ numberOfFactors_

Size numberOfFactors_
private

Definition at line 68 of file lmmdriftcalculator.hpp.

◆ isFullFactor_

bool isFullFactor_
private

Definition at line 69 of file lmmdriftcalculator.hpp.

◆ numeraire_

Size numeraire_
private

Definition at line 70 of file lmmdriftcalculator.hpp.

◆ alive_

Size alive_
private

Definition at line 70 of file lmmdriftcalculator.hpp.

◆ displacements_

std::vector<Spread> displacements_
private

Definition at line 71 of file lmmdriftcalculator.hpp.

◆ oneOverTaus_

std::vector<Real> oneOverTaus_
private

Definition at line 72 of file lmmdriftcalculator.hpp.

◆ C_

Matrix C_
private

Definition at line 73 of file lmmdriftcalculator.hpp.

◆ pseudo_

Matrix pseudo_
private

Definition at line 73 of file lmmdriftcalculator.hpp.

◆ tmp_

std::vector<Real> tmp_
mutableprivate

Definition at line 75 of file lmmdriftcalculator.hpp.

◆ e_

Matrix e_
mutableprivate

Definition at line 76 of file lmmdriftcalculator.hpp.

◆ downs_

std::vector<Size> downs_
private

Definition at line 77 of file lmmdriftcalculator.hpp.

◆ ups_

std::vector<Size> ups_
private

Definition at line 77 of file lmmdriftcalculator.hpp.