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
LatticeShortRateModelEngine< Arguments, Results > Class Template Reference

Engine for a short-rate model specialized on a lattice. More...

#include <ql/pricingengines/latticeshortratemodelengine.hpp>

+ Inheritance diagram for LatticeShortRateModelEngine< Arguments, Results >:
+ Collaboration diagram for LatticeShortRateModelEngine< Arguments, Results >:

Public Member Functions

 LatticeShortRateModelEngine (const ext::shared_ptr< ShortRateModel > &model, Size timeSteps)
 
 LatticeShortRateModelEngine (const Handle< ShortRateModel > &model, Size timeSteps)
 
 LatticeShortRateModelEngine (const ext::shared_ptr< ShortRateModel > &model, const TimeGrid &timeGrid)
 
void update () override
 
- Public Member Functions inherited from GenericModelEngine< ShortRateModel, Arguments, Results >
 GenericModelEngine (Handle< ShortRateModel > model=Handle< ShortRateModel >())
 
 GenericModelEngine (const ext::shared_ptr< ShortRateModel > &model)
 
- Public Member Functions inherited from GenericEngine< ArgumentsType, ResultsType >
PricingEngine::argumentsgetArguments () const override
 
const PricingEngine::resultsgetResults () const override
 
void reset () override
 
void update () override
 
- Public Member Functions inherited from PricingEngine
 ~PricingEngine () override=default
 
virtual argumentsgetArguments () const =0
 
virtual const resultsgetResults () const =0
 
virtual void reset ()=0
 
virtual void calculate () const =0
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 

Protected Attributes

TimeGrid timeGrid_
 
Size timeSteps_
 
ext::shared_ptr< Latticelattice_
 
- Protected Attributes inherited from GenericModelEngine< ShortRateModel, Arguments, Results >
Handle< ShortRateModelmodel_
 
- Protected Attributes inherited from GenericEngine< ArgumentsType, ResultsType >
ArgumentsType arguments_
 
ResultsType results_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Detailed Description

template<class Arguments, class Results>
class QuantLib::LatticeShortRateModelEngine< Arguments, Results >

Engine for a short-rate model specialized on a lattice.

Derived engines only need to implement the calculate() method

Definition at line 38 of file latticeshortratemodelengine.hpp.

Constructor & Destructor Documentation

◆ LatticeShortRateModelEngine() [1/3]

LatticeShortRateModelEngine ( const ext::shared_ptr< ShortRateModel > &  model,
Size  timeSteps 
)

Definition at line 59 of file latticeshortratemodelengine.hpp.

◆ LatticeShortRateModelEngine() [2/3]

LatticeShortRateModelEngine ( const Handle< ShortRateModel > &  model,
Size  timeSteps 
)

Definition at line 70 of file latticeshortratemodelengine.hpp.

◆ LatticeShortRateModelEngine() [3/3]

LatticeShortRateModelEngine ( const ext::shared_ptr< ShortRateModel > &  model,
const TimeGrid timeGrid 
)

Definition at line 81 of file latticeshortratemodelengine.hpp.

Member Function Documentation

◆ update()

void update ( )
overridevirtual

This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.

Reimplemented from GenericEngine< ArgumentsType, ResultsType >.

Definition at line 90 of file latticeshortratemodelengine.hpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ timeGrid_

TimeGrid timeGrid_
protected

Definition at line 53 of file latticeshortratemodelengine.hpp.

◆ timeSteps_

Size timeSteps_
protected

Definition at line 54 of file latticeshortratemodelengine.hpp.

◆ lattice_

ext::shared_ptr<Lattice> lattice_
protected

Definition at line 55 of file latticeshortratemodelengine.hpp.