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

Binomial lattice approximating the Tsiveriotis-Fernandes model. More...

#include <ql/methods/lattices/tflattice.hpp>

+ Inheritance diagram for TsiveriotisFernandesLattice< T >:
+ Collaboration diagram for TsiveriotisFernandesLattice< T >:

Public Member Functions

 TsiveriotisFernandesLattice (const ext::shared_ptr< T > &tree, Rate riskFreeRate, Time end, Size steps, Spread creditSpread, Volatility volatility, Spread divYield)
 
Spread creditSpread () const
 
- Public Member Functions inherited from BlackScholesLattice< T >
 BlackScholesLattice (const ext::shared_ptr< T > &tree, Rate riskFreeRate, Time end, Size steps)
 
Rate riskFreeRate () const
 
Time dt () const
 
Size size (Size i) const
 
DiscountFactor discount (Size, Size) const
 
void stepback (Size i, const Array &values, Array &newValues) 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
 
- Public Member Functions inherited from TreeLattice1D< BlackScholesLattice< T > >
 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...
 
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
 

Protected Member Functions

void stepback (Size i, const Array &values, const Array &conversionProbability, const Array &spreadAdjustedRate, Array &newValues, Array &newConversionProbability, Array &newSpreadAdjustedRate) const
 
void rollback (DiscretizedAsset &, Time to) const override
 
void partialRollback (DiscretizedAsset &, Time to) 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
 

Private Attributes

Spread creditSpread_
 

Additional Inherited Members

- Protected Attributes inherited from BlackScholesLattice< T >
ext::shared_ptr< T > tree_
 
Rate riskFreeRate_
 
Time dt_
 
DiscountFactor discount_
 
Real pd_
 
Real pu_
 
- Protected Attributes inherited from TreeLattice< Impl >
std::vector< ArraystatePrices_
 
- Protected Attributes inherited from Lattice
TimeGrid t_
 

Detailed Description

template<class T>
class QuantLib::TsiveriotisFernandesLattice< T >

Binomial lattice approximating the Tsiveriotis-Fernandes model.

At this time, this lattice only works with the DiscretizedConvertible class.

Definition at line 39 of file tflattice.hpp.

Constructor & Destructor Documentation

◆ TsiveriotisFernandesLattice()

TsiveriotisFernandesLattice ( const ext::shared_ptr< T > &  tree,
Rate  riskFreeRate,
Time  end,
Size  steps,
Spread  creditSpread,
Volatility  volatility,
Spread  divYield 
)

Definition at line 70 of file tflattice.hpp.

Member Function Documentation

◆ creditSpread()

Spread creditSpread ( ) const

Definition at line 49 of file tflattice.hpp.

◆ stepback()

void stepback ( Size  i,
const Array values,
const Array conversionProbability,
const Array spreadAdjustedRate,
Array newValues,
Array newConversionProbability,
Array newSpreadAdjustedRate 
) const
protected

Definition at line 87 of file tflattice.hpp.

◆ rollback()

void rollback ( DiscretizedAsset ,
Time  to 
) const
overrideprotectedvirtual

Roll back an asset until the given time, performing any needed adjustment.

Reimplemented from TreeLattice< Impl >.

Definition at line 119 of file tflattice.hpp.

+ Here is the call graph for this function:

◆ partialRollback()

void partialRollback ( DiscretizedAsset ,
Time  to 
) const
overrideprotectedvirtual

Roll back an asset until the given time, but do not perform the final adjustment.

Warning:
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:
method->rollAlmostBack(asset,t);

with the two statements:

method->partialRollback(asset,t);
asset->preAdjustValues();

Reimplemented from TreeLattice< Impl >.

Definition at line 127 of file tflattice.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ creditSpread_

Spread creditSpread_
private

Definition at line 63 of file tflattice.hpp.