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

Finite-differences Heston Hull-White vanilla option engine. More...

#include <ql/pricingengines/vanilla/fdhestonhullwhitevanillaengine.hpp>

+ Inheritance diagram for FdHestonHullWhiteVanillaEngine:
+ Collaboration diagram for FdHestonHullWhiteVanillaEngine:

Public Member Functions

 FdHestonHullWhiteVanillaEngine (const ext::shared_ptr< HestonModel > &model, ext::shared_ptr< HullWhiteProcess > hwProcess, Real corrEquityShortRate, Size tGrid=50, Size xGrid=100, Size vGrid=40, Size rGrid=20, Size dampingSteps=0, bool controlVariate=true, const FdmSchemeDesc &schemeDesc=FdmSchemeDesc::Hundsdorfer())
 
 FdHestonHullWhiteVanillaEngine (const ext::shared_ptr< HestonModel > &model, ext::shared_ptr< HullWhiteProcess > hwProcess, DividendSchedule dividends, Real corrEquityShortRate, Size tGrid=50, Size xGrid=100, Size vGrid=40, Size rGrid=20, Size dampingSteps=0, bool controlVariate=true, const FdmSchemeDesc &schemeDesc=FdmSchemeDesc::Hundsdorfer())
 
void calculate () const override
 
void update () override
 
void enableMultipleStrikesCaching (const std::vector< Real > &strikes)
 
- Public Member Functions inherited from GenericModelEngine< HestonModel, DividendVanillaOption::arguments, DividendVanillaOption::results >
 GenericModelEngine (Handle< HestonModel > model=Handle< HestonModel >())
 
 GenericModelEngine (const ext::shared_ptr< HestonModel > &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 ()
 

Private Attributes

const ext::shared_ptr< HullWhiteProcesshwProcess_
 
DividendSchedule dividends_
 
bool explicitDividends_
 
const Real corrEquityShortRate_
 
const Size tGrid_
 
const Size xGrid_
 
const Size vGrid_
 
const Size rGrid_
 
const Size dampingSteps_
 
const FdmSchemeDesc schemeDesc_
 
const bool controlVariate_
 
std::vector< Realstrikes_
 
QL_DEPRECATED_DISABLE_WARNING std::vector< std::pair< DividendVanillaOption::arguments, DividendVanillaOption::results > > cachedArgs2results_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Attributes inherited from GenericModelEngine< HestonModel, DividendVanillaOption::arguments, DividendVanillaOption::results >
Handle< HestonModelmodel_
 
- Protected Attributes inherited from GenericEngine< ArgumentsType, ResultsType >
ArgumentsType arguments_
 
ResultsType results_
 

Detailed Description

Finite-differences Heston Hull-White vanilla option engine.

Tests:
the correctness of the returned value is tested by reproducing results available in web/literature and comparison with Black/Heston pricing.

Definition at line 45 of file fdhestonhullwhitevanillaengine.hpp.

Constructor & Destructor Documentation

◆ FdHestonHullWhiteVanillaEngine() [1/2]

QL_DEPRECATED_DISABLE_WARNING FdHestonHullWhiteVanillaEngine ( const ext::shared_ptr< HestonModel > &  model,
ext::shared_ptr< HullWhiteProcess hwProcess,
Real  corrEquityShortRate,
Size  tGrid = 50,
Size  xGrid = 100,
Size  vGrid = 40,
Size  rGrid = 20,
Size  dampingSteps = 0,
bool  controlVariate = true,
const FdmSchemeDesc schemeDesc = FdmSchemeDesc::Hundsdorfer() 
)

Definition at line 38 of file fdhestonhullwhitevanillaengine.cpp.

◆ FdHestonHullWhiteVanillaEngine() [2/2]

FdHestonHullWhiteVanillaEngine ( const ext::shared_ptr< HestonModel > &  model,
ext::shared_ptr< HullWhiteProcess hwProcess,
DividendSchedule  dividends,
Real  corrEquityShortRate,
Size  tGrid = 50,
Size  xGrid = 100,
Size  vGrid = 40,
Size  rGrid = 20,
Size  dampingSteps = 0,
bool  controlVariate = true,
const FdmSchemeDesc schemeDesc = FdmSchemeDesc::Hundsdorfer() 
)

Definition at line 57 of file fdhestonhullwhitevanillaengine.cpp.

Member Function Documentation

◆ calculate()

QL_DEPRECATED_ENABLE_WARNING void calculate ( ) const
overridevirtual

Implements PricingEngine.

Definition at line 79 of file fdhestonhullwhitevanillaengine.cpp.

+ Here is the call graph for this function:

◆ 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 244 of file fdhestonhullwhitevanillaengine.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enableMultipleStrikesCaching()

void enableMultipleStrikesCaching ( const std::vector< Real > &  strikes)

Definition at line 253 of file fdhestonhullwhitevanillaengine.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ hwProcess_

const ext::shared_ptr<HullWhiteProcess> hwProcess_
private

Definition at line 83 of file fdhestonhullwhitevanillaengine.hpp.

◆ dividends_

DividendSchedule dividends_
private

Definition at line 84 of file fdhestonhullwhitevanillaengine.hpp.

◆ explicitDividends_

bool explicitDividends_
private

Definition at line 85 of file fdhestonhullwhitevanillaengine.hpp.

◆ corrEquityShortRate_

const Real corrEquityShortRate_
private

Definition at line 86 of file fdhestonhullwhitevanillaengine.hpp.

◆ tGrid_

const Size tGrid_
private

Definition at line 87 of file fdhestonhullwhitevanillaengine.hpp.

◆ xGrid_

const Size xGrid_
private

Definition at line 87 of file fdhestonhullwhitevanillaengine.hpp.

◆ vGrid_

const Size vGrid_
private

Definition at line 87 of file fdhestonhullwhitevanillaengine.hpp.

◆ rGrid_

const Size rGrid_
private

Definition at line 87 of file fdhestonhullwhitevanillaengine.hpp.

◆ dampingSteps_

const Size dampingSteps_
private

Definition at line 88 of file fdhestonhullwhitevanillaengine.hpp.

◆ schemeDesc_

const FdmSchemeDesc schemeDesc_
private

Definition at line 89 of file fdhestonhullwhitevanillaengine.hpp.

◆ controlVariate_

const bool controlVariate_
private

Definition at line 90 of file fdhestonhullwhitevanillaengine.hpp.

◆ strikes_

std::vector<Real> strikes_
private

Definition at line 92 of file fdhestonhullwhitevanillaengine.hpp.

◆ cachedArgs2results_

QL_DEPRECATED_DISABLE_WARNING std::vector<std::pair<DividendVanillaOption::arguments, DividendVanillaOption::results> > cachedArgs2results_
mutableprivate

Definition at line 96 of file fdhestonhullwhitevanillaengine.hpp.