QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
BinomialBarrierEngine< T, D > Class Template Reference

Pricing engine for barrier options using binomial trees. More...

#include <ql/pricingengines/barrier/binomialbarrierengine.hpp>

Inheritance diagram for BinomialBarrierEngine< T, D >:

Public Member Functions

 BinomialBarrierEngine (ext::shared_ptr< GeneralizedBlackScholesProcess > process, Size timeSteps, Size maxTimeSteps=0)
void calculate () const override
Public Member Functions inherited from GenericEngine< BarrierOption::arguments, BarrierOption::results >
PricingEngine::arguments * getArguments () const override
const PricingEngine::results * getResults () const override
void reset () override
void update () override
Public Member Functions inherited from Observable
 Observable (const Observable &)
Observableoperator= (const Observable &)
 Observable (Observable &&)=delete
Observableoperator= (Observable &&)=delete
void notifyObservers ()
Public Member Functions inherited from Observer
 Observer (const Observer &)
Observeroperator= (const Observer &)
std::pair< iterator, bool > registerWith (const ext::shared_ptr< Observable > &)
void registerWithObservables (const ext::shared_ptr< Observer > &)
Size unregisterWith (const ext::shared_ptr< Observable > &)
void unregisterWithAll ()
virtual void deepUpdate ()

Additional Inherited Members

Public Types inherited from Observer
typedef set_type::iterator iterator
Protected Member Functions inherited from BarrierOption::engine
bool triggered (Real underlying) const
Protected Attributes inherited from GenericEngine< BarrierOption::arguments, BarrierOption::results >
BarrierOption::arguments arguments_
BarrierOption::results results_

Detailed Description

template<class T, class D>
class QuantLib::BinomialBarrierEngine< T, D >

Pricing engine for barrier options using binomial trees.

Note
Timesteps for Cox-Ross-Rubinstein trees are adjusted using Boyle and Lau algorithm. See Journal of Derivatives, 1/1994, "Bumping up against the barrier with the binomial method"
Tests
the correctness of the returned values is tested by checking it against analytic european results.

Constructor & Destructor Documentation

◆ BinomialBarrierEngine()

template<class T, class D>
BinomialBarrierEngine ( ext::shared_ptr< GeneralizedBlackScholesProcess > process,
Size timeSteps,
Size maxTimeSteps = 0 )

The maxTimeSteps parameter is used to limit timeSteps when using Boyle-Lau optimization. If zero (the default) the maximum number of steps is calculated by an heuristic: anything when < 1000, otherwise no more than 5*timeSteps. If maxTimeSteps is equal to timeSteps, Boyle-Lau is disabled. Likewise if the lattice is not CoxRossRubinstein Boyle-Lau is disabled and maxTimeSteps ignored.

Member Function Documentation

◆ calculate()

template<class T, class D>
void calculate ( ) const
overridevirtual

Implements PricingEngine.