QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
AnalyticPTDHestonEngine Class Reference

analytic piecewise constant time dependent Heston-model engine More...

#include <analyticptdhestonengine.hpp>

+ Inheritance diagram for AnalyticPTDHestonEngine:
+ Collaboration diagram for AnalyticPTDHestonEngine:

Public Types

enum  ComplexLogFormula { Gatheral , AndersenPiterbarg }
 
typedef AnalyticHestonEngine::Integration Integration
 
- Public Types inherited from Observer
typedef set_type::iterator iterator
 

Public Member Functions

 AnalyticPTDHestonEngine (const ext::shared_ptr< PiecewiseTimeDependentHestonModel > &model, Real relTolerance, Size maxEvaluations)
 
 AnalyticPTDHestonEngine (const ext::shared_ptr< PiecewiseTimeDependentHestonModel > &model, Size integrationOrder=144)
 
 AnalyticPTDHestonEngine (const ext::shared_ptr< PiecewiseTimeDependentHestonModel > &model, ComplexLogFormula cpxLog, const Integration &itg, Real andersenPiterbargEpsilon=1e-8)
 
void calculate () const override
 
Size numberOfEvaluations () const
 
std::complex< RealchF (const std::complex< Real > &z, Time t) const
 
std::complex< ReallnChF (const std::complex< Real > &z, Time t) const
 
- Public Member Functions inherited from GenericModelEngine< PiecewiseTimeDependentHestonModel, VanillaOption::arguments, VanillaOption::results >
 GenericModelEngine (Handle< PiecewiseTimeDependentHestonModel > model=Handle< PiecewiseTimeDependentHestonModel >())
 
 GenericModelEngine (const ext::shared_ptr< PiecewiseTimeDependentHestonModel > &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

Size evaluations_
 
const ComplexLogFormula cpxLog_
 
const ext::shared_ptr< Integrationintegration_
 
const Real andersenPiterbargEpsilon_
 

Additional Inherited Members

- Protected Attributes inherited from GenericModelEngine< PiecewiseTimeDependentHestonModel, VanillaOption::arguments, VanillaOption::results >
Handle< PiecewiseTimeDependentHestonModelmodel_
 
- Protected Attributes inherited from GenericEngine< ArgumentsType, ResultsType >
ArgumentsType arguments_
 
ResultsType results_
 

Detailed Description

analytic piecewise constant time dependent Heston-model engine

References:

Heston, Steven L., 1993. A Closed-Form Solution for Options with Stochastic Volatility with Applications to Bond and Currency Options. The review of Financial Studies, Volume 6, Issue 2, 327-343.

J. Gatheral, The Volatility Surface: A Practitioner's Guide, Wiley Finance

A. Elices, Models with time-dependent parameters using transform methods: application to Heston’s model, http://arxiv.org/pdf/0708.2020

Definition at line 52 of file analyticptdhestonengine.hpp.

Member Typedef Documentation

◆ Integration

Definition at line 58 of file analyticptdhestonengine.hpp.

Member Enumeration Documentation

◆ ComplexLogFormula

Enumerator
Gatheral 
AndersenPiterbarg 

Definition at line 57 of file analyticptdhestonengine.hpp.

Constructor & Destructor Documentation

◆ AnalyticPTDHestonEngine() [1/3]

AnalyticPTDHestonEngine ( const ext::shared_ptr< PiecewiseTimeDependentHestonModel > &  model,
Real  relTolerance,
Size  maxEvaluations 
)

Definition at line 224 of file analyticptdhestonengine.cpp.

◆ AnalyticPTDHestonEngine() [2/3]

AnalyticPTDHestonEngine ( const ext::shared_ptr< PiecewiseTimeDependentHestonModel > &  model,
Size  integrationOrder = 144 
)
explicit

Definition at line 211 of file analyticptdhestonengine.cpp.

◆ AnalyticPTDHestonEngine() [3/3]

AnalyticPTDHestonEngine ( const ext::shared_ptr< PiecewiseTimeDependentHestonModel > &  model,
ComplexLogFormula  cpxLog,
const Integration itg,
Real  andersenPiterbargEpsilon = 1e-8 
)

Definition at line 237 of file analyticptdhestonengine.cpp.

Member Function Documentation

◆ calculate()

void calculate ( ) const
overridevirtual

Implements PricingEngine.

Definition at line 252 of file analyticptdhestonengine.cpp.

+ Here is the call graph for this function:

◆ numberOfEvaluations()

Size numberOfEvaluations ( ) const

Definition at line 408 of file analyticptdhestonengine.cpp.

◆ chF()

std::complex< Real > chF ( const std::complex< Real > &  z,
Time  t 
) const

Definition at line 206 of file analyticptdhestonengine.cpp.

◆ lnChF()

std::complex< Real > lnChF ( const std::complex< Real > &  z,
Time  t 
) const

Definition at line 155 of file analyticptdhestonengine.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ evaluations_

Size evaluations_
mutableprivate

Definition at line 94 of file analyticptdhestonengine.hpp.

◆ cpxLog_

const ComplexLogFormula cpxLog_
private

Definition at line 95 of file analyticptdhestonengine.hpp.

◆ integration_

const ext::shared_ptr<Integration> integration_
private

Definition at line 96 of file analyticptdhestonengine.hpp.

◆ andersenPiterbargEpsilon_

const Real andersenPiterbargEpsilon_
private

Definition at line 97 of file analyticptdhestonengine.hpp.