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

LiborDerivative Class Reference

#include <Option.h>

Inheritance diagram for LiborDerivative:

Option BermudanSwaption BondCall Caplet Swaption List of all members.

Detailed Description

Class which factors out some common features of all Libor derivatives. PathGenerators for Libor derivatives see to it that only those Libors are computed which are really needed for the option payoff.

To compound the payoff forward from time the of exercise to the horizon we need all Libors . The standing assumption is that the underlying LMM makes one time step per Libor compounding period. This class does not take ownership of the underlying LMM (delete separately).

Definition at line 186 of file Option.h.

Public Member Functions

 LiborDerivative (LiborMarketModel *lmm, int s, bool an, bool lt, bool mc, bool cv)
virtual ~LiborDerivative ()
virtual int getPeriodsToExpiry ()
int getDimension () const
int effectiveDimension () const
LmmLatticegetDefaultLattice ()
virtual Real forwardPayoff (StandardBrownianNode *node, LmmLattice *theLattice, int s)
Real latticeForwardPrice (LmmLattice *theLattice)
Real latticeForwardPrice ()
std::ostream & printSelf (std::ostream &os) const
virtual void testPrice (int nPath)

Protected Attributes

int n
int t

Constructor & Destructor Documentation

LiborDerivative::LiborDerivative LiborMarketModel   lmm,
int    s,
bool    an,
bool    lt,
bool    mc,
bool    cv

lmm underlying LiborMarketModel.
s option expires at .
an analytic pricing formula is implemented.
lt lattice pricing is implemented.
mc Monte Carlo pricing is implemented.
cv control variate is implemented.

virtual LiborDerivative::~LiborDerivative   [inline, virtual]

Definition at line 207 of file Option.h.

Member Function Documentation

virtual int LiborDerivative::getPeriodsToExpiry   [inline, virtual]

Number t of Libor compounding periods to expiry (at T_t).

Reimplemented in Caplet.

Definition at line 211 of file Option.h.

int LiborDerivative::getDimension   const [inline]

Dimension n of the underlying Libor market model.

Definition at line 214 of file Option.h.

int LiborDerivative::effectiveDimension   const

The effective dimension of computing one payoff. This is the number of independent uniform deviates generated to compute one sample of the necessary Libors.

LmmLattice* LiborDerivative::getDefaultLattice  

The default lattice used for pricing: a two factor LmmLattice based on the underlying LMM. Constructed on the heap and must be deallocated by the user. This lattice is built with steps=6 time steps per Libor compounding period unless the constant LATTICE_MAX_STEPS defined in TypedefsMacros.h forces reduction in the number steps. This is adequate up to semiannual compounding. The maximum number of possible time steps depends on the available RAM. We assume 1GB. Otherwise adjust LATTICE_MAX_STEPS by trial and error.

Referenced by latticeForwardPrice().

virtual Real LiborDerivative::forwardPayoff StandardBrownianNode   node,
LmmLattice   theLattice,
int    s

Payoff at a node living at time step s in theLattice. Empty default implementation: aborts with error message.

Reimplemented in BermudanSwaption, Caplet, Swaption, and BondCall.

Real LiborDerivative::latticeForwardPrice LmmLattice   theLattice

Price computed in theLattice.

Real LiborDerivative::latticeForwardPrice   [inline, virtual]

Forward price computed in the default lattice. See getDefaultLattice().

Reimplemented from Option.

Definition at line 249 of file Option.h.

References getDefaultLattice(), and Real.

std::ostream& LiborDerivative::printSelf std::ostream &    os const [virtual]

Message announcing a generic Libor derivative.

Reimplemented from Option.

Reimplemented in BermudanSwaption, Caplet, Swaption, and BondCall.

virtual void LiborDerivative::testPrice int    nPath [virtual]

Tests the analytic price against Lattice, Monte Carlo and Quasi Monte Carlo prices with and without control variates. Reports error relative to the analytic price if this price is defined. Note however that the analytic price itself may be an approximation.

nPath number of payoff samples (usually computed from Libor paths).

Member Data Documentation

LiborMarketModel* LiborDerivative::LMM [protected]

Definition at line 190 of file Option.h.

int LiborDerivative::n [protected]

Definition at line 191 of file Option.h.

int LiborDerivative::t [protected]

Definition at line 192 of file Option.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