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

BasketLattice Class Reference

#include <BasketLattice.h>

Inheritance diagram for BasketLattice:

Lattice< StandardBrownianNode > List of all members.

Detailed Description

Lattice for a basket of constant volatility assets. No decision on the number of factors. For more details see the file reference BasketLattice.h.

Definition at line 144 of file BasketLattice.h.

Public Member Functions

int getDimension () const
Real getTimeStep ()
RealArray1Dget_log_S0 ()
ConstantFactorLoadinggetFactorLoading ()
Real transitionProbability (int i)
void testFactorization () const
 BasketLattice (int r, ConstantFactorLoading *fl, int T, Real dt, RealArray1D S0)
virtual ~BasketLattice ()
std::ostream & printSelf (std::ostream &os) const

Static Public Member Functions

BasketLattice * sample (int r, int n, int T)
void test (int r, int n, int T)

Protected Attributes

int n_
int T_
int r_
Real dt
Real a
const RealArray1Dsg
RealArray1D log_S0
RealArray1D mu
const RealMatrixR

Constructor & Destructor Documentation

BasketLattice::BasketLattice int    r,
ConstantFactorLoading   fl,
int    T,
Real    dt,
RealArray1D    S0

Use index base zero throughout.

r the number of factors.
fl the factorloading of the assets.
T number of time steps.
dt size of time step.
S0 initial asset prices.
fl the factorloading of the assets.

virtual BasketLattice::~BasketLattice   [inline, virtual]

Definition at line 211 of file BasketLattice.h.

Member Function Documentation

int BasketLattice::getDimension   const [inline]

Number of assets

Definition at line 175 of file BasketLattice.h.

Real BasketLattice::getTimeStep   [inline, virtual]

The size of the time step.

Implements Lattice< StandardBrownianNode >.

Definition at line 178 of file BasketLattice.h.

References Real.

RealArray1D& BasketLattice::get_log_S0   [inline]

The vector of initial asset price logs.

Definition at line 181 of file BasketLattice.h.

ConstantFactorLoading* BasketLattice::getFactorLoading   [inline]

The factor loading of the asset prices.

Definition at line 184 of file BasketLattice.h.

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

Time and state independent transition probability along edge i.

Implements Lattice< StandardBrownianNode >.

Definition at line 187 of file BasketLattice.h.

References Real.

void BasketLattice::testFactorization   const

Computes the relative errors in the trace norm of the approximate rank r factorization rho=RR' of the correlation matrix rho. See book, Appendix A.1.

BasketLattice* BasketLattice::sample int    r,
int    n,
int    T

Sample r factor lattice with n assets and T time steps of size dt=0.1. All asset prices start at S_j(0)=100.0 and all volatilities are 0.3. The correlation of returns are given by .

std::ostream& BasketLattice::printSelf std::ostream &    os const

void BasketLattice::test int    r,
int    n,
int    T

Builds an r factor lattice in in dimension n (number of Libor accrual periods) build with T time steps (one per accrual period) and runs the selfTest().

Member Data Documentation

ConstantFactorLoading* BasketLattice::fl [protected]

Definition at line 148 of file BasketLattice.h.

int BasketLattice::n_ [protected]

number of assets:

Definition at line 151 of file BasketLattice.h.

int BasketLattice::T_ [protected]

number of time steps:

Definition at line 151 of file BasketLattice.h.

int BasketLattice::r_ [protected]

number of factors:

Definition at line 151 of file BasketLattice.h.

Real BasketLattice::dt [protected]

time step.

Definition at line 156 of file BasketLattice.h.

Real BasketLattice::a [protected]

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

Definition at line 158 of file BasketLattice.h.

const RealArray1D& BasketLattice::sg [protected]

the volatilities .

Definition at line 160 of file BasketLattice.h.

RealArray1D BasketLattice::log_S0 [protected]

the initial values .

Definition at line 162 of file BasketLattice.h.

RealArray1D BasketLattice::mu [protected]

drift -sigma_j^2*dt/2 of Y_j over a single time step.

Definition at line 164 of file BasketLattice.h.

const RealMatrix& BasketLattice::R [protected]

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

Definition at line 166 of file BasketLattice.h.

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