QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
|
Recombining trinomial tree discretizing the state variable. More...
#include <ql/models/shortrate/onefactormodel.hpp>
Public Member Functions | |
ShortRateTree (const ext::shared_ptr< TrinomialTree > &tree, ext::shared_ptr< ShortRateDynamics > dynamics, const TimeGrid &timeGrid) | |
Plain tree build-up from short-rate dynamics. More... | |
ShortRateTree (const ext::shared_ptr< TrinomialTree > &tree, ext::shared_ptr< ShortRateDynamics > dynamics, const ext::shared_ptr< TermStructureFittingParameter::NumericalImpl > &phi, const TimeGrid &timeGrid) | |
Tree build-up + numerical fitting to term-structure. More... | |
Size | size (Size i) const |
DiscountFactor | discount (Size i, Size index) const |
Real | underlying (Size i, Size index) const |
Size | descendant (Size i, Size index, Size branch) const |
Real | probability (Size i, Size index, Size branch) const |
void | setSpread (Spread spread) |
Public Member Functions inherited from TreeLattice1D< OneFactorModel::ShortRateTree > | |
TreeLattice1D (const TimeGrid &timeGrid, Size n) | |
Array | grid (Time t) const override |
Real | underlying (Size i, Size index) const |
Public Member Functions inherited from TreeLattice< Impl > | |
TreeLattice (const TimeGrid &timeGrid, Size n) | |
void | initialize (DiscretizedAsset &, Time t) const override |
initialize an asset at the given time. More... | |
void | rollback (DiscretizedAsset &, Time to) const override |
void | partialRollback (DiscretizedAsset &, Time to) const override |
Real | presentValue (DiscretizedAsset &) const override |
Computes the present value of an asset using Arrow-Debrew prices. More... | |
const Array & | statePrices (Size i) const |
void | stepback (Size i, const Array &values, Array &newValues) const |
Public Member Functions inherited from Lattice | |
Lattice (TimeGrid timeGrid) | |
virtual | ~Lattice ()=default |
const TimeGrid & | timeGrid () const |
Private Attributes | |
ext::shared_ptr< TrinomialTree > | tree_ |
ext::shared_ptr< ShortRateDynamics > | dynamics_ |
Spread | spread_ |
Additional Inherited Members | |
Protected Member Functions inherited from TreeLattice< Impl > | |
void | computeStatePrices (Size until) const |
Protected Member Functions inherited from CuriouslyRecurringTemplate< Impl > | |
CuriouslyRecurringTemplate ()=default | |
~CuriouslyRecurringTemplate ()=default | |
Impl & | impl () |
const Impl & | impl () const |
Protected Attributes inherited from TreeLattice< Impl > | |
std::vector< Array > | statePrices_ |
Protected Attributes inherited from Lattice | |
TimeGrid | t_ |
Recombining trinomial tree discretizing the state variable.
Definition at line 75 of file onefactormodel.hpp.
ShortRateTree | ( | const ext::shared_ptr< TrinomialTree > & | tree, |
ext::shared_ptr< ShortRateDynamics > | dynamics, | ||
const TimeGrid & | timeGrid | ||
) |
Plain tree build-up from short-rate dynamics.
Definition at line 80 of file onefactormodel.cpp.
ShortRateTree | ( | const ext::shared_ptr< TrinomialTree > & | tree, |
ext::shared_ptr< ShortRateDynamics > | dynamics, | ||
const ext::shared_ptr< TermStructureFittingParameter::NumericalImpl > & | phi, | ||
const TimeGrid & | timeGrid | ||
) |
Tree build-up + numerical fitting to term-structure.
Definition at line 56 of file onefactormodel.cpp.
Definition at line 88 of file onefactormodel.hpp.
DiscountFactor discount | ( | Size | i, |
Size | index | ||
) | const |
Definition at line 96 of file onefactormodel.hpp.
Definition at line 99 of file onefactormodel.hpp.
Definition at line 102 of file onefactormodel.hpp.
void setSpread | ( | Spread | spread | ) |
Definition at line 105 of file onefactormodel.hpp.
|
private |
Definition at line 110 of file onefactormodel.hpp.
|
private |
Definition at line 111 of file onefactormodel.hpp.
|
private |
Definition at line 113 of file onefactormodel.hpp.