QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Lattice (tree, finite-differences) base class More...
#include <numericalmethod.hpp>
Public Member Functions | |
Lattice (TimeGrid timeGrid) | |
virtual | ~Lattice ()=default |
Inspectors | |
const TimeGrid & | timeGrid () const |
Numerical method interface | |
These methods are to be used by discretized assets and must be overridden by developers implementing numerical methods. Users are advised to use the corresponding methods of DiscretizedAsset instead. | |
TimeGrid | t_ |
virtual void | initialize (DiscretizedAsset &, Time time) const =0 |
initialize an asset at the given time. More... | |
virtual void | rollback (DiscretizedAsset &, Time to) const =0 |
virtual void | partialRollback (DiscretizedAsset &, Time to) const =0 |
virtual Real | presentValue (DiscretizedAsset &) const =0 |
computes the present value of an asset. More... | |
virtual Array | grid (Time) const =0 |
Lattice (tree, finite-differences) base class
Definition at line 37 of file numericalmethod.hpp.
Definition at line 39 of file numericalmethod.hpp.
|
virtualdefault |
const TimeGrid & timeGrid | ( | ) | const |
|
pure virtual |
initialize an asset at the given time.
Implemented in TreeLattice< Impl >, TreeLattice< BlackScholesLattice< T > >, TreeLattice< OneFactorModel::ShortRateTree >, and TreeLattice< TwoFactorModel::ShortRateTree >.
|
pure virtual |
Roll back an asset until the given time, performing any needed adjustment.
Implemented in TreeLattice< Impl >, TreeLattice< BlackScholesLattice< T > >, TreeLattice< OneFactorModel::ShortRateTree >, TreeLattice< TwoFactorModel::ShortRateTree >, and TsiveriotisFernandesLattice< T >.
|
pure virtual |
Roll back an asset until the given time, but do not perform the final adjustment.
with the two statements:
Implemented in TreeLattice< Impl >, TreeLattice< BlackScholesLattice< T > >, TreeLattice< OneFactorModel::ShortRateTree >, TreeLattice< TwoFactorModel::ShortRateTree >, and TsiveriotisFernandesLattice< T >.
|
pure virtual |
computes the present value of an asset.
Implemented in TreeLattice< Impl >, TreeLattice< BlackScholesLattice< T > >, TreeLattice< OneFactorModel::ShortRateTree >, and TreeLattice< TwoFactorModel::ShortRateTree >.
|
protected |
Definition at line 95 of file numericalmethod.hpp.