Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

LiborMarketModel Class Reference

#include <LiborMarketModel.h>

Inheritance diagram for LiborMarketModel:

DriftlessLMM FastPredictorCorrectorLMM LowFactorDriftlessLMM PredictorCorrectorLMM List of all members.

Detailed Description

Libor Market Model based on state variables with Gaussian FactorLoading. See book, Chapter 6. The state variables need not be the Libors themselves. They could in fact be the coterminal swap rates (all swaps terminate at the final date , swap market model). In fact the fastest model uses the forward transported Libors

as state variables since these are local martingales and hence driftless in the forward martingale measure at , see DriftlessLMM.

If the state variables have a state dependent drift they will not follow a log-Gaussian process despite the Gaussian factor loadings. In fact the distribution of the process will most likely be unknown. This motivates the attempts to get rid of the drift term (DriftlessLMM).

Provides interface to Libor path generation and Libors and convenience implementations of a variety of methods such as zero coupon bonds, accumulation factors, swap rates and annuity numeraire. Override these if faster computations are possible in your model.

Author:
Michael J. Meyer

Definition at line 119 of file LiborMarketModel.h.

Public Member Functions

const LiborMarketModelTypegetType () const
int getDimension () const
const RealArray1DgetTenorStructure () const
const RealArray1DgetDeltas () const
const RealArray1DgetInitialLibors () const
const RealArray1DgetInitialXLibors () const
LiborFactorLoadinggetFactorLoading () const
virtual void switchToQMC () const
virtual void switchToMC () const
virtual void restartSobolGenerator () const
Real L_i0 (int i) const
Real X_i0 (int i) const
 LiborMarketModel (LiborFactorLoading *fl, int lmmType=DL)
virtual ~LiborMarketModel ()
virtual Real XL (int j, int t) const=0
virtual const RealVectorXLvect (int t, int p)=0
virtual void newWienerIncrements (int t)
virtual void timeStep (int t, int p)=0
virtual void newPath ()
virtual void newPath (int t, int p)
virtual int effectiveDimension (int t, int s) const
virtual void printWienerIncrements (int s, int t) const
Real vol (int i) const
Real L (int j, int t) const
virtual Real H0 () const
virtual Real H_i0 (int i) const
virtual Real H_it (int i, int t)
virtual Real H_ii (int t)
virtual Real B0 (int i) const
virtual Real B (int i, int t)
virtual Real swRate (int p, int q, int t)
virtual Real swapRate (int p, int q, int t)
virtual Real swapRate (int p, int q) const
virtual Real b_pq (int p, int q, int t)
virtual Real B_pq (int p, int q, int t)
virtual Real B_pq (int p, int q) const
virtual Real H_pq (int p, int q, int t)
virtual Real H_pq (int p, int q) const
virtual Real capletAggregateVolatility (int i) const
virtual Real swaptionAggregateVolatility (int p, int q, int t) const
virtual Real bondAggregateVolatility (Bond *B, int t) const
virtual std::ostream & printSelf (std::ostream &os) const=0

Static Public Member Functions

std::string lmmType (int type)
LiborMarketModel * sample (int n, int lmmType, int volType, int corrType)

Static Public Attributes

const int DL = 0
const int LFDL = 1
const int PC = 2
const int FPC = 3

Protected Attributes

LiborMarketModelType type
int n
RealArray1D delta
RealArray1D T
RealArray1D l
RealArray1D x
LiborFactorLoadingfactorLoading


Constructor & Destructor Documentation

LiborMarketModel::LiborMarketModel LiborFactorLoading   fl,
int    lmmType = DL
 

Constructor

Parameters:
fl volatility and correlation structure, see LiborFactorLoading.
lmmType type of Libor market model: DL, LFDL, PC, FPC.

virtual LiborMarketModel::~LiborMarketModel   [inline, virtual]
 

Definition at line 221 of file LiborMarketModel.h.


Member Function Documentation

const LiborMarketModelType* LiborMarketModel::getType   const [inline]
 

Type object (integer and string type flags).

Definition at line 148 of file LiborMarketModel.h.

std::string LiborMarketModel::lmmType int    type [static]
 

Convert integer type flag to string "DL", "LFDL", "PC", "FPC".

int LiborMarketModel::getDimension   const [inline]
 

The number n of accrual periods.

Definition at line 156 of file LiborMarketModel.h.

const RealArray1D& LiborMarketModel::getTenorStructure   const [inline]
 

The array of continuous times .

Definition at line 160 of file LiborMarketModel.h.

const RealArray1D& LiborMarketModel::getDeltas   const [inline]
 

The array of accrual periods .

Definition at line 165 of file LiborMarketModel.h.

const RealArray1D& LiborMarketModel::getInitialLibors   const [inline]
 

Initial Libors .

Definition at line 169 of file LiborMarketModel.h.

const RealArray1D& LiborMarketModel::getInitialXLibors   const [inline]
 

The array of initial X-Libors .

Definition at line 174 of file LiborMarketModel.h.

LiborFactorLoading* LiborMarketModel::getFactorLoading   const [inline]
 

The FactorLoading of the Libor process

Definition at line 179 of file LiborMarketModel.h.

virtual void LiborMarketModel::switchToQMC   const [inline, virtual]
 

Switch to quasi random dynamics based on low discrepancy sequence. Default: nothing happens.

Definition at line 185 of file LiborMarketModel.h.

virtual void LiborMarketModel::switchToMC   const [inline, virtual]
 

Switches to pseudo random dynamics based on random number generator. Default: nothing happens.

Definition at line 191 of file LiborMarketModel.h.

virtual void LiborMarketModel::restartSobolGenerator   const [inline, virtual]
 

Restarts the underlying Sobol sequence generator. Default: nothing happens.

Definition at line 197 of file LiborMarketModel.h.

Real LiborMarketModel::L_i0 int    i const [inline]
 

.

Definition at line 204 of file LiborMarketModel.h.

References Real.

Real LiborMarketModel::X_i0 int    i const [inline]
 

.

Definition at line 207 of file LiborMarketModel.h.

References Real.

LiborMarketModel* LiborMarketModel::sample int    n,
int    lmmType,
int    volType,
int    corrType
[static]
 

Sample Libor market model, quarterly accrual.

Parameters:
n dimension (number of Libor accrual intervals).
lmmType type of Libor market model: DL, LFDL, PC, FPC.
volType type of volatility surface, VolSurface::CONST, JR, M.
corrType type of correlations, Correlations::CS, JR.

Reimplemented in LowFactorDriftlessLMM.

virtual Real LiborMarketModel::XL int    j,
int    t
const [pure virtual]
 

X-Libor from current path.

Implemented in DriftlessLMM, FastPredictorCorrectorLMM, LowFactorDriftlessLMM, and PredictorCorrectorLMM.

virtual const RealVector& LiborMarketModel::XLvect int    t,
int    p
[pure virtual]
 

The vector from current path.

Implemented in DriftlessLMM, FastPredictorCorrectorLMM, LowFactorDriftlessLMM, and PredictorCorrectorLMM.

virtual void LiborMarketModel::newWienerIncrements int    t [inline, virtual]
 

Write a new set of standard normal increments driving a full Libor path to time t. Empty implementation to accommodate LMMs that are not based on such a mechanism.

All the concrete LMMs implemented here are based on this mechanism and forward the request to a StochasticGenerator

Reimplemented in DriftlessLMM, FastPredictorCorrectorLMM, LowFactorDriftlessLMM, and PredictorCorrectorLMM.

Definition at line 257 of file LiborMarketModel.h.

virtual void LiborMarketModel::timeStep int    t,
int    p
[pure virtual]
 

Time step t->t+1 for Libors or with .

Implemented in DriftlessLMM, FastPredictorCorrectorLMM, LowFactorDriftlessLMM, and PredictorCorrectorLMM.

Referenced by LowFactorDriftlessLMM::timeStep().

virtual void LiborMarketModel::newPath   [virtual]
 

A full Libor path to the horizon. Default implementation using timeStep(int,int).

virtual void LiborMarketModel::newPath int    t,
int    p
[virtual]
 

Path of Libors

ie. the Libors , are computed from discrete time s=0 to discrete time s=t. Default implementation using timeStep(int,int).

Parameters:
t discrete time up to which Libors are computed.
p Libors evolved are .

virtual int LiborMarketModel::effectiveDimension int    t,
int    s
const [inline, virtual]
 

The effective dimension of the simulation, that is, the number of independent deviates of the distribution of the stochastic driver (typically standard normal) needed to compute one path from discrete time t to discrete time s. See StochasticGenerator.

Note: if this is too high (>623 for Mersenne Twister) a random number generator may not be able to ensure equidistribution in this dimension calling into question the mathematical basis for Monte Carlo expectations.

Default implementation, returns zero.

Reimplemented in DriftlessLMM, FastPredictorCorrectorLMM, LowFactorDriftlessLMM, and PredictorCorrectorLMM.

Definition at line 295 of file LiborMarketModel.h.

virtual void LiborMarketModel::printWienerIncrements int    s,
int    t
const [inline, virtual]
 

Diagnostic. Print the the standard normal increments driving the current path. Empty implementation.

Reimplemented in DriftlessLMM, FastPredictorCorrectorLMM, LowFactorDriftlessLMM, and PredictorCorrectorLMM.

Definition at line 301 of file LiborMarketModel.h.

Real LiborMarketModel::vol int    i const
 

Annualized volatility of .

Parameters:
i Libor index.

Reimplemented in DriftlessLMM, and LowFactorDriftlessLMM.

Real LiborMarketModel::L int    j,
int    t
const
 

Libor .

virtual Real LiborMarketModel::H0   const [virtual]
 

, accrual factor with Libors in state at time t=0.

virtual Real LiborMarketModel::H_i0 int    i const [virtual]
 

, accrual factor with Libors in state at time t=0.

Reimplemented in DriftlessLMM, and LowFactorDriftlessLMM.

virtual Real LiborMarketModel::H_it int    i,
int    t
[virtual]
 

Accrual factor . This factor shifts a cashflow from time with Libors in state at time (discrete time t). In other words the shift is carried out at discrete time t. Needs all Libors up to time .

Parameters:
t discrete time (continuous time ).
i cashflow shifted from time to horizon.

Reimplemented in DriftlessLMM, and LowFactorDriftlessLMM.

virtual Real LiborMarketModel::H_ii int    t [virtual]
 

Accrual factor . Cashflow is shifted with Libors in state at time .

Parameters:
t cashflow shifted from time to horizon.

Reimplemented in DriftlessLMM.

virtual Real LiborMarketModel::B0 int    i const [virtual]
 

The zero coupon bond .

Parameters:
i bond matures at time .

Reimplemented in DriftlessLMM, and LowFactorDriftlessLMM.

virtual Real LiborMarketModel::B int    i,
int    t
[virtual]
 

The zero coupon bond with . Assumes that all Libors have been computed up to time (discrete time t).

Parameters:
t bond evaluated at time .
i bond matures at time .

Reimplemented in DriftlessLMM, and LowFactorDriftlessLMM.

virtual Real LiborMarketModel::swRate int    p,
int    q,
int    t
[virtual]
 

The forward swap rate . Needs all Libors up to time .

Straightforward implementation following the definition. Extremely inefficient. Used only to test the correctness of the streamlined implementation.

Parameters:
p,q swap along .
t discrete time.

virtual Real LiborMarketModel::swapRate int    p,
int    q,
int    t
[virtual]
 

The forward swap rate . Needs all Libors up to time .

Parameters:
p,q swap along .
t discrete time.

Reimplemented in DriftlessLMM, and LowFactorDriftlessLMM.

Referenced by LowFactorDriftlessLMM::swapRate().

virtual Real LiborMarketModel::swapRate int    p,
int    q
const [virtual]
 

The forward swap rate at time t=0.

Parameters:
p,q swap along .

virtual Real LiborMarketModel::b_pq int    p,
int    q,
int    t
[virtual]
 

The annuity . Needs all Libors up to time t.

Straightforward implementation following the definition. Extremely inefficient. Used only to test the correctness of the streamlined implementation.

Parameters:
p,q annuity along .
t current (discrete) time.

virtual Real LiborMarketModel::B_pq int    p,
int    q,
int    t
[virtual]
 

The annuity . Needs all Libors up to time t.

Parameters:
p,q annuity along .
t current (discrete) time.

Reimplemented in DriftlessLMM, and LowFactorDriftlessLMM.

Referenced by LowFactorDriftlessLMM::B_pq().

virtual Real LiborMarketModel::B_pq int    p,
int    q
const [virtual]
 

The annuity at time t=0.

Parameters:
p,q annuity along .

virtual Real LiborMarketModel::H_pq int    p,
int    q,
int    t
[virtual]
 

The forward transported annuity . Needs all Libors up to time .

Parameters:
p,q annuity along .
t current (discrete) time.

Reimplemented in DriftlessLMM, and LowFactorDriftlessLMM.

virtual Real LiborMarketModel::H_pq int    p,
int    q
const [virtual]
 

The annuity at time t=0.

Parameters:
p,q annuity along .

virtual Real LiborMarketModel::capletAggregateVolatility int    i const [virtual]
 

The forecast of caplet volatility to expiration. Quantity is needed for Black caplet formula. See book, 6.9.2. Default implementation: error message and abort.

Parameters:
i caplet on .

Reimplemented in DriftlessLMM, FastPredictorCorrectorLMM, LowFactorDriftlessLMM, and PredictorCorrectorLMM.

virtual Real LiborMarketModel::swaptionAggregateVolatility int    p,
int    q,
int    t
const [virtual]
 

The forecast of swap rate volatility to expiration, see book 6.7.

Quantity is needed for approximate analytic swaption price. Default implementation: error message and abort.

Parameters:
p,q swap along on .
t swaption exercise at time .

Reimplemented in DriftlessLMM, FastPredictorCorrectorLMM, LowFactorDriftlessLMM, and PredictorCorrectorLMM.

virtual Real LiborMarketModel::bondAggregateVolatility Bond   B,
int    t
const [virtual]
 

The volatility forecast needed to price the call on the bond . See book, 6.9.2.

Default implementation: error message and abort. This is implemnted only in DriftlessLMM.

Parameters:
B the bond.
t aggregate volatility until time .

Reimplemented in DriftlessLMM, and LowFactorDriftlessLMM.

virtual std::ostream& LiborMarketModel::printSelf std::ostream &    os const [pure virtual]
 

Message and fields.

Implemented in DriftlessLMM, FastPredictorCorrectorLMM, LowFactorDriftlessLMM, and PredictorCorrectorLMM.


Member Data Documentation

LiborMarketModelType LiborMarketModel::type [protected]
 

Definition at line 123 of file LiborMarketModel.h.

int LiborMarketModel::n [protected]
 

Definition at line 126 of file LiborMarketModel.h.

RealArray1D LiborMarketModel::delta [protected]
 

Definition at line 127 of file LiborMarketModel.h.

RealArray1D LiborMarketModel::T [protected]
 

Definition at line 128 of file LiborMarketModel.h.

RealArray1D LiborMarketModel::l [protected]
 

Definition at line 129 of file LiborMarketModel.h.

RealArray1D LiborMarketModel::x [protected]
 

Definition at line 130 of file LiborMarketModel.h.

LiborFactorLoading* LiborMarketModel::factorLoading [protected]
 

Definition at line 133 of file LiborMarketModel.h.

const int LiborMarketModel::DL = 0 [static]
 

Flags for the type of LMM. DL DriftlessLMM, LFDL LowFactorDriftlessLMM PC PredictorCorrectorLMM, FPC FastPredictorCorrectorLMM.

Definition at line 144 of file LiborMarketModel.h.

const int LiborMarketModel::LFDL = 1 [static]
 

Flags for the type of LMM. DL DriftlessLMM, LFDL LowFactorDriftlessLMM PC PredictorCorrectorLMM, FPC FastPredictorCorrectorLMM.

Definition at line 144 of file LiborMarketModel.h.

const int LiborMarketModel::PC = 2 [static]
 

Flags for the type of LMM. DL DriftlessLMM, LFDL LowFactorDriftlessLMM PC PredictorCorrectorLMM, FPC FastPredictorCorrectorLMM.

Definition at line 144 of file LiborMarketModel.h.

const int LiborMarketModel::FPC = 3 [static]
 

Flags for the type of LMM. DL DriftlessLMM, LFDL LowFactorDriftlessLMM PC PredictorCorrectorLMM, FPC FastPredictorCorrectorLMM.

Definition at line 144 of file LiborMarketModel.h.


The documentation for this class was generated from the following file:
Generated on Mon Sep 22 02:16:33 2003 for Libor-Library by doxygen1.3-rc3