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

Simple binomial lattice approximating the Black-Scholes model. More...

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

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

Public Member Functions

 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...
 
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
 

Protected Attributes

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_
 

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
 

Detailed Description

template<class T>
class QuantLib::BlackScholesLattice< T >

Simple binomial lattice approximating the Black-Scholes model.

Definition at line 36 of file bsmlattice.hpp.

Constructor & Destructor Documentation

◆ BlackScholesLattice()

BlackScholesLattice ( const ext::shared_ptr< T > &  tree,
Rate  riskFreeRate,
Time  end,
Size  steps 
)

Definition at line 72 of file bsmlattice.hpp.

Member Function Documentation

◆ riskFreeRate()

Rate riskFreeRate ( ) const

Definition at line 43 of file bsmlattice.hpp.

◆ dt()

Time dt ( ) const

Definition at line 44 of file bsmlattice.hpp.

◆ size()

Size size ( Size  i) const

Definition at line 45 of file bsmlattice.hpp.

◆ discount()

DiscountFactor discount ( Size  ,
Size   
) const

Definition at line 46 of file bsmlattice.hpp.

◆ stepback()

void stepback ( Size  i,
const Array values,
Array newValues 
) const

Definition at line 83 of file bsmlattice.hpp.

◆ underlying()

Real underlying ( Size  i,
Size  index 
) const

Definition at line 51 of file bsmlattice.hpp.

◆ descendant()

Size descendant ( Size  i,
Size  index,
Size  branch 
) const

Definition at line 54 of file bsmlattice.hpp.

◆ probability()

Real probability ( Size  i,
Size  index,
Size  branch 
) const

Definition at line 57 of file bsmlattice.hpp.

Member Data Documentation

◆ tree_

ext::shared_ptr<T> tree_
protected

Definition at line 61 of file bsmlattice.hpp.

◆ riskFreeRate_

Rate riskFreeRate_
protected

Definition at line 62 of file bsmlattice.hpp.

◆ dt_

Time dt_
protected

Definition at line 63 of file bsmlattice.hpp.

◆ discount_

DiscountFactor discount_
protected

Definition at line 64 of file bsmlattice.hpp.

◆ pd_

Real pd_
protected

Definition at line 65 of file bsmlattice.hpp.

◆ pu_

Real pu_
protected

Definition at line 65 of file bsmlattice.hpp.