QuantLib
A free/open-source library for quantitative finance
Reference manual - version 1.20
List of all members
TreeSwaptionEngine Class Reference

Numerical lattice engine for swaptions. More...

#include <ql/pricingengines/swaption/treeswaptionengine.hpp>

+ Inheritance diagram for TreeSwaptionEngine:

Constructors

Note
the term structure is only needed when the short-rate model cannot provide one itself.
 TreeSwaptionEngine (const ext::shared_ptr< ShortRateModel > &, Size timeSteps, const Handle< YieldTermStructure > &termStructure=Handle< YieldTermStructure >())
 
 TreeSwaptionEngine (const ext::shared_ptr< ShortRateModel > &, const TimeGrid &timeGrid, const Handle< YieldTermStructure > &termStructure=Handle< YieldTermStructure >())
 
 TreeSwaptionEngine (const Handle< ShortRateModel > &, Size timeSteps, const Handle< YieldTermStructure > &termStructure=Handle< YieldTermStructure >())
 
void calculate () const
 

Additional Inherited Members

- Public Types inherited from Observer
typedef boost::unordered_set< ext::shared_ptr< Observable > > set_type
 
typedef set_type::iterator iterator
 
- Public Member Functions inherited from LatticeShortRateModelEngine< Swaption::arguments, Swaption::results >
 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 ()
 
- Public Member Functions inherited from GenericModelEngine< ShortRateModel, Swaption::arguments, Swaption::results >
 GenericModelEngine (const Handle< ShortRateModel > &model=Handle< ShortRateModel >())
 
 GenericModelEngine (const ext::shared_ptr< ShortRateModel > &model)
 
- Public Member Functions inherited from GenericEngine< Swaption::arguments, Swaption::results >
PricingEngine::arguments * getArguments () const
 
const PricingEngine::results * getResults () const
 
void reset ()
 
- Public Member Functions inherited from PricingEngine
virtual arguments * getArguments () const =0
 
virtual const results * getResults () const =0
 
- Public Member Functions inherited from Observable
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
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 ()
 
- Protected Attributes inherited from LatticeShortRateModelEngine< Swaption::arguments, Swaption::results >
TimeGrid timeGrid_
 
Size timeSteps_
 
ext::shared_ptr< Latticelattice_
 
- Protected Attributes inherited from GenericModelEngine< ShortRateModel, Swaption::arguments, Swaption::results >
Handle< ShortRateModelmodel_
 
- Protected Attributes inherited from GenericEngine< Swaption::arguments, Swaption::results >
Swaption::arguments arguments_
 
Swaption::results results_
 

Detailed Description

Numerical lattice engine for swaptions.

Warning:
This engine is not guaranteed to work if the underlying swap has a start date in the past, i.e., before today's date. When using this engine, prune the initial part of the swap so that it starts at \( t \geq 0 \).
Tests:
calculations are checked against cached results
Examples
BermudanSwaption.cpp.