QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Drift computation for log-normal Libor market models. More...
#include <lmmdriftcalculator.hpp>
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< Spread > | displacements_ |
std::vector< Real > | oneOverTaus_ |
Matrix | C_ |
Matrix | pseudo_ |
std::vector< Real > | tmp_ |
Matrix | e_ |
std::vector< Size > | downs_ |
std::vector< Size > | ups_ |
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.
void compute | ( | const LMMCurveState & | cs, |
std::vector< Real > & | drifts | ||
) | const |
Computes the drifts.
Definition at line 67 of file lmmdriftcalculator.cpp.
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.
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.
Definition at line 117 of file lmmdriftcalculator.cpp.
|
private |
Definition at line 68 of file lmmdriftcalculator.hpp.
|
private |
Definition at line 68 of file lmmdriftcalculator.hpp.
|
private |
Definition at line 69 of file lmmdriftcalculator.hpp.
|
private |
Definition at line 70 of file lmmdriftcalculator.hpp.
|
private |
Definition at line 70 of file lmmdriftcalculator.hpp.
|
private |
Definition at line 71 of file lmmdriftcalculator.hpp.
|
private |
Definition at line 72 of file lmmdriftcalculator.hpp.
|
private |
Definition at line 73 of file lmmdriftcalculator.hpp.
|
private |
Definition at line 73 of file lmmdriftcalculator.hpp.
|
mutableprivate |
Definition at line 75 of file lmmdriftcalculator.hpp.
|
mutableprivate |
Definition at line 76 of file lmmdriftcalculator.hpp.
|
private |
Definition at line 77 of file lmmdriftcalculator.hpp.
|
private |
Definition at line 77 of file lmmdriftcalculator.hpp.