Two-dimensional tree-based lattice. More...
#include <ql/methods/lattices/lattice2d.hpp>
Public Member Functions | |
TreeLattice2D (const ext::shared_ptr< T > &tree1, const ext::shared_ptr< T > &tree2, Real correlation) | |
Size | size (Size i) const |
Size | descendant (Size i, Size index, Size branch) const |
Real | probability (Size i, Size index, Size branch) const |
![]() | |
TreeLattice (const TimeGrid &timeGrid, Size n) | |
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. | |
const Array & | statePrices (Size i) const |
void | stepback (Size i, const Array &values, Array &newValues) const |
![]() | |
Lattice (const TimeGrid &timeGrid) | |
const TimeGrid & | timeGrid () const |
Protected Member Functions | |
Disposable< Array > | grid (Time) const |
![]() | |
void | computeStatePrices (Size until) const |
![]() | |
Impl & | impl () |
const Impl & | impl () const |
Protected Attributes | |
ext::shared_ptr< T > | tree1_ |
ext::shared_ptr< T > | tree2_ |
![]() | |
std::vector< Array > | statePrices_ |
![]() | |
TimeGrid | t_ |
Two-dimensional tree-based lattice.
This lattice is based on two trinomial trees and primarily used for the G2 short-rate model.