Lattice Class Template Reference
[Lattice methods]
#include <ql/Lattices/lattice.hpp>
Inheritance diagram for Lattice:

Detailed Description
template<class Impl>
class QuantLib::Lattice< Impl >
Lattice-method base class.
This class defines a lattice method that is able to rollback (with discount) a discretized asset object. It will usually be based on one or more trees.
Derived classes must implement the following interface:
public: DiscountFactor discount(Size i, Size index) const; Size descendant(Size i, Size index, Size branch) const; Real probability(Size i, Size index, Size branch) const;
public: void stepback(Size i, const Array& values, Array& newValues) const;
Public Member Functions | |
Lattice (const TimeGrid &timeGrid, Size n) | |
const Array & | statePrices (Size i) const |
void | stepback (Size i, const Array &values, Array &newValues) const |
NumericalMethod interface | |
void | initialize (DiscretizedAsset &, Time t) const |
initialize an asset at the given time. | |
void | rollback (DiscretizedAsset &, Time to) const |
void | partialRollback (DiscretizedAsset &, Time to) const |
Real | presentValue (DiscretizedAsset &) const |
Computes the present value of an asset using Arrow-Debrew prices. | |
Protected Member Functions | |
void | computeStatePrices (Size until) const |
Protected Attributes | |
std::vector< Array > | statePrices_ |
Member Function Documentation
|
Roll back an asset until the given time, performing any needed adjustment. Implements NumericalMethod. Reimplemented in TsiveriotisFernandesLattice. |
|
Roll back an asset until the given time, but do not perform the final adjustment.
method->rollAlmostBack(asset,t); method->partialRollback(asset,t); asset->preAdjustValues(); Implements NumericalMethod. Reimplemented in TsiveriotisFernandesLattice. |