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

LmmLattice Class Reference

#include <LmmLattice.h>

Inheritance diagram for LmmLattice:

Lattice< StandardBrownianNode > List of all members.

Detailed Description

Lattice of the driftless Libor market model with constant volatility surface and constant Libor accrual periods. See book 6.8, 8.1.1 for the details and notation. For more details see the file reference for the file LmmLattice.h.

Definition at line 133 of file LmmLattice.h.

Public Member Functions

int getNumberOfFactors ()
LiborFactorLoadinggetFactorLoading ()
int getSteps ()
Real getTimeStep ()
int getTenor (int s)
Real transitionProbability (int i)
 LmmLattice (int q, LiborFactorLoading *fl, int t, int steps=1, bool verbose=false)
virtual ~LmmLattice ()
void rescaleVols ()
void testFactorization () const
std::ostream & printSelf (std::ostream &os) const
const RealArray1DHvect (int p, StandardBrownianNode *node, int s)
Real L (int j, StandardBrownianNode *node, int s)
Real H_pq (int p, int q, StandardBrownianNode *node, int s)
Real swapRate (int p, int q, StandardBrownianNode *node, int s)
Real forwardSwaptionPayoff (int p, int q, Real kappa, StandardBrownianNode *node, int s)
Real forwardCapletPayoff (int i, Real kappa, StandardBrownianNode *node, int s)
Real forwardBondCallPayoff (BondCall *bc, StandardBrownianNode *node, int s)

Static Public Member Functions

LmmLattice * sample (int r, int n, int p, int nSteps, bool verbose=false)
void test (int r, int n)

Protected Attributes

LiborFactorLoadingfactorLoading
int n
int r
int nSteps
Real delta
Real dt
Real a
RealArray1D sg
RealArray1D log_U0
RealArray1D mu
RealMatrix R


Constructor & Destructor Documentation

LmmLattice::LmmLattice int    q,
LiborFactorLoading   fl,
int    t,
int    steps = 1,
bool    verbose = false
 

Parameters:
q number of factors: must be 2 or 3.
fl factor loading of the underlying LMM, must have CONST_VolSurface.
t lattice is built until Libor reset time T_t.
steps number of equal sized time steps in each Libor accrual interval.
verbose messages during build.

virtual LmmLattice::~LmmLattice   [inline, virtual]
 

Definition at line 197 of file LmmLattice.h.


Member Function Documentation

int LmmLattice::getNumberOfFactors   [inline]
 

The number of factors.

Definition at line 164 of file LmmLattice.h.

LiborFactorLoading* LmmLattice::getFactorLoading   [inline]
 

The factor loading of the underlying LMM.

Definition at line 167 of file LmmLattice.h.

int LmmLattice::getSteps   [inline]
 

The number of time steps per Libor compounding period.

Definition at line 170 of file LmmLattice.h.

Real LmmLattice::getTimeStep   [inline, virtual]
 

The size of the time step.

Implements Lattice< StandardBrownianNode >.

Definition at line 173 of file LmmLattice.h.

References Real.

int LmmLattice::getTenor int    s [inline]
 

Returns largest t such that .

Parameters:
s number of time step.

Definition at line 178 of file LmmLattice.h.

Real LmmLattice::transitionProbability int    i [inline, virtual]
 

Time and state independent transition probability along edge i. Declared final (hence nonvirtual) for speed.

Implements Lattice< StandardBrownianNode >.

Definition at line 183 of file LmmLattice.h.

References Real.

LmmLattice* LmmLattice::sample int    r,
int    n,
int    p,
int    nSteps,
bool    verbose = false
[static]
 

A sample r=2,3 factor lattice in dimension n (number of Libor accrual periods) built up to time T_p with nSteps time steps per accrual period.

Parameters:
verbose details on lattice during build.

void LmmLattice::rescaleVols  
 

Rescales the rows of the rank reduced pseudo square root R of the log(U_j)-correlation matrix C to unity (book, 8.1.2) This preserves the Libor volatilities but makes the approximation less accurate. For example in the case of swaptions the rescaled matrix will overestimate prices while prices will be underestimated without rescaling. Rescaling is irreversible.

void LmmLattice::testFactorization   const
 

Tests the accuracy of the rank r factorization of the correlation matrix.

std::ostream& LmmLattice::printSelf std::ostream &    os const
 

void LmmLattice::test int    r,
int    n
[static]
 

Builds an r=2,3 factor lattice in in dimension n (number of Libor accrual periods) up tp time with 3 time steps per Libor accrual period) and runs the selfTest().

const RealArray1D& LmmLattice::Hvect int    p,
StandardBrownianNode   node,
int    s
 

The vector of accrual factors at the node. Natural indices j=p,...,n.

This is a view of this vector in a static workspace (speed, no memory allocation). If the vector has to be preserved it must be copied before commands execute which overwrite the workspace.

Parameters:
s time step at which the node lives.

Real LmmLattice::L int    j,
StandardBrownianNode   node,
int    s
 

Libor at the node.

Parameters:
s time step at which the node lives.

Real LmmLattice::H_pq int    p,
int    q,
StandardBrownianNode   node,
int    s
 

The forward price of the annuity over the interval [T_p,T_q] at this node.

Parameters:
s time step at which the node lives.

Real LmmLattice::swapRate int    p,
int    q,
StandardBrownianNode   node,
int    s
 

The swaprate for a swap on [T_p,T_q] at the node.

Parameters:
s time step at which the node lives.

Real LmmLattice::forwardSwaptionPayoff int    p,
int    q,
Real    kappa,
StandardBrownianNode   node,
int    s
 

Payoff of a forward swaption with strike rate kappa exercising into a swap on the interval [T_p,T_q] if exercised at this node. Payoff is compounded forward to the horizon T_n.

Real LmmLattice::forwardCapletPayoff int    i,
Real    kappa,
StandardBrownianNode   node,
int    s
 

Forward compounded payoff of caplet(i) with strike rate kappa at this node. Assumes that the node lives at the Libor reset point at which Libor for this caplet is set.

Parameters:
s time step at which the node lives.

Real LmmLattice::forwardBondCallPayoff BondCall   bc,
StandardBrownianNode   node,
int    s
 

Forward payoff of the BondCall bc if exercised at this node.

Parameters:
s time step at which the node lives.


Member Data Documentation

LiborFactorLoading* LmmLattice::factorLoading [protected]
 

Definition at line 138 of file LmmLattice.h.

int LmmLattice::n [protected]
 

Definition at line 140 of file LmmLattice.h.

int LmmLattice::r [protected]
 

Definition at line 140 of file LmmLattice.h.

int LmmLattice::nSteps [protected]
 

Definition at line 140 of file LmmLattice.h.

Real LmmLattice::delta [protected]
 

constant Libor accrual period length.

Definition at line 145 of file LmmLattice.h.

Real LmmLattice::dt [protected]
 

time step.

Definition at line 147 of file LmmLattice.h.

Real LmmLattice::a [protected]
 

ticksize a=sqrt(dt) of a standard Brownian motion over a single time step.

Definition at line 149 of file LmmLattice.h.

RealArray1D LmmLattice::sg [protected]
 

the volatility scaling factors c_j, book, 6.11.1.

Definition at line 151 of file LmmLattice.h.

RealArray1D LmmLattice::log_U0 [protected]
 

the initial values , book 6.8.

Definition at line 153 of file LmmLattice.h.

RealArray1D LmmLattice::mu [protected]
 

drift -sigma_j^2*dt/2 of Y_j=log(U_j) over a single time step.

Definition at line 155 of file LmmLattice.h.

RealMatrix LmmLattice::R [protected]
 

rank r approximate pseudo square root of the log(U_j) covariance matrix.

Definition at line 157 of file LmmLattice.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