QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
TwoFactorModel::ShortRateTree Class Reference

Recombining two-dimensional tree discretizing the state variable. More...

#include <ql/models/shortrate/twofactormodel.hpp>

+ Inheritance diagram for TwoFactorModel::ShortRateTree:
+ Collaboration diagram for TwoFactorModel::ShortRateTree:

Public Member Functions

 ShortRateTree (const ext::shared_ptr< TrinomialTree > &tree1, const ext::shared_ptr< TrinomialTree > &tree2, const ext::shared_ptr< ShortRateDynamics > &dynamics)
 Plain tree build-up from short-rate dynamics. More...
 
DiscountFactor discount (Size i, Size index) const
 
- Public Member Functions inherited from TreeLattice2D< TwoFactorModel::ShortRateTree, TrinomialTree >
 TreeLattice2D (const ext::shared_ptr< TrinomialTree > &tree1, ext::shared_ptr< TrinomialTree > 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
 
- 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 ArraystatePrices (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 TimeGridtimeGrid () const
 

Private Attributes

ext::shared_ptr< ShortRateDynamicsdynamics_
 

Additional Inherited Members

- Protected Member Functions inherited from TreeLattice2D< TwoFactorModel::ShortRateTree, TrinomialTree >
Array grid (Time) const override
 
- 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 TreeLattice2D< TwoFactorModel::ShortRateTree, TrinomialTree >
ext::shared_ptr< TrinomialTreetree1_
 
ext::shared_ptr< TrinomialTreetree2_
 
- Protected Attributes inherited from TreeLattice< Impl >
std::vector< ArraystatePrices_
 
- Protected Attributes inherited from Lattice
TimeGrid t_
 

Detailed Description

Recombining two-dimensional tree discretizing the state variable.

Definition at line 107 of file twofactormodel.hpp.

Constructor & Destructor Documentation

◆ ShortRateTree()

ShortRateTree ( const ext::shared_ptr< TrinomialTree > &  tree1,
const ext::shared_ptr< TrinomialTree > &  tree2,
const ext::shared_ptr< ShortRateDynamics > &  dynamics 
)

Plain tree build-up from short-rate dynamics.

Definition at line 42 of file twofactormodel.cpp.

Member Function Documentation

◆ discount()

DiscountFactor discount ( Size  i,
Size  index 
) const

Definition at line 115 of file twofactormodel.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ dynamics_

ext::shared_ptr<ShortRateDynamics> dynamics_
private

Definition at line 127 of file twofactormodel.hpp.