QuantLib_TreeLattice man page
TreeLattice< Impl > — Tree-based lattice-method base class.
Inherits Lattice, and CuriouslyRecurringTemplate< Impl >.
Inherited by TreeLattice1D< Impl >, and TreeLattice2D< Impl, T >.
Public Member Functions
TreeLattice (const TimeGrid &timeGrid, Size n)
const Array & statePrices (Size i) const
void stepback (Size i, const Array &values, Array &newValues) const
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
std::vector< Array > statePrices_
class QuantLib::TreeLattice< Impl >" Tree-based lattice-method base class.
This class defines a lattice method that is able to rollback (with discount) a discretized asset object. It will 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;
and may implement the following:
public: void stepback(Size i, const Array& values, Array& newValues) const;
Member Function Documentation
void rollback (DiscretizedAsset &, Time to) const [virtual]
Roll back an asset until the given time, performing any needed adjustment.
void partialRollback (DiscretizedAsset &, Time to) const [virtual]
Roll back an asset until the given time, but do not perform the final adjustment.
In version 0.3.7 and earlier, this method was called rollAlmostBack method and performed pre-adjustment. This is no longer true; when migrating your code, you'll have to replace calls such as:
with the two statements:
Generated automatically by Doxygen for QuantLib from the source code.
The man pages computeStatePrices(3), statePrices(3), statePrices_(3) and TreeLattice(3) are aliases of QuantLib_TreeLattice(3).