|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Analytic Heston engine incl. stochastic interest rates. More...
#include <analytichestonhullwhiteengine.hpp>
Inheritance diagram for AnalyticHestonHullWhiteEngine:
Collaboration diagram for AnalyticHestonHullWhiteEngine:Public Member Functions | |
| AnalyticHestonHullWhiteEngine (const ext::shared_ptr< HestonModel > &hestonModel, ext::shared_ptr< HullWhite > hullWhiteModel, Size integrationOrder=144) | |
| AnalyticHestonHullWhiteEngine (const ext::shared_ptr< HestonModel > &model, ext::shared_ptr< HullWhite > hullWhiteModel, Real relTolerance, Size maxEvaluations) | |
| void | update () override |
| void | calculate () const override |
Public Member Functions inherited from AnalyticHestonEngine | |
| AnalyticHestonEngine (const ext::shared_ptr< HestonModel > &model, Real relTolerance, Size maxEvaluations) | |
| AnalyticHestonEngine (const ext::shared_ptr< HestonModel > &model, Size integrationOrder=144) | |
| AnalyticHestonEngine (const ext::shared_ptr< HestonModel > &model, ComplexLogFormula cpxLog, const Integration &itg, Real andersenPiterbargEpsilon=1e-25, Real alpha=-0.5) | |
| void | calculate () const override |
| std::complex< Real > | chF (const std::complex< Real > &z, Time t) const |
| std::complex< Real > | lnChF (const std::complex< Real > &z, Time t) const |
| Size | numberOfEvaluations () const |
| Real | priceVanillaPayoff (const ext::shared_ptr< PlainVanillaPayoff > &payoff, const Date &maturity) const |
| Real | priceVanillaPayoff (const ext::shared_ptr< PlainVanillaPayoff > &payoff, Time maturity) const |
Public Member Functions inherited from GenericModelEngine< HestonModel, VanillaOption::arguments, VanillaOption::results > | |
| GenericModelEngine (Handle< HestonModel > model=Handle< HestonModel >()) | |
| GenericModelEngine (const ext::shared_ptr< HestonModel > &model) | |
Public Member Functions inherited from GenericEngine< ArgumentsType, ResultsType > | |
| PricingEngine::arguments * | getArguments () const override |
| const PricingEngine::results * | getResults () const override |
| void | reset () override |
| void | update () override |
Public Member Functions inherited from PricingEngine | |
| ~PricingEngine () override=default | |
| virtual arguments * | getArguments () const =0 |
| virtual const results * | getResults () const =0 |
| virtual void | reset ()=0 |
| virtual void | calculate () const =0 |
Public Member Functions inherited from Observable | |
| Observable ()=default | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| Observable (Observable &&)=delete | |
| Observable & | operator= (Observable &&)=delete |
| virtual | ~Observable ()=default |
| void | notifyObservers () |
Public Member Functions inherited from Observer | |
| Observer ()=default | |
| Observer (const Observer &) | |
| Observer & | operator= (const Observer &) |
| virtual | ~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 | update ()=0 |
| virtual void | deepUpdate () |
Protected Member Functions | |
| std::complex< Real > | addOnTerm (Real phi, Time t, Size j) const override |
| virtual std::complex< Real > | addOnTerm (Real phi, Time t, Size j) const |
Protected Attributes | |
| const ext::shared_ptr< HullWhite > | hullWhiteModel_ |
Protected Attributes inherited from GenericModelEngine< HestonModel, VanillaOption::arguments, VanillaOption::results > | |
| Handle< HestonModel > | model_ |
Protected Attributes inherited from GenericEngine< ArgumentsType, ResultsType > | |
| ArgumentsType | arguments_ |
| ResultsType | results_ |
Private Member Functions | |
| void | setParameters () |
Private Attributes | |
| Real | m_ |
| Real | a_ |
| Real | sigma_ |
Additional Inherited Members | |
Public Types inherited from AnalyticHestonEngine | |
| enum | ComplexLogFormula { Gatheral , BranchCorrection , AndersenPiterbarg , AndersenPiterbargOptCV , AsymptoticChF , AngledContour , AngledContourNoCV , OptimalCV } |
Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
Static Public Member Functions inherited from AnalyticHestonEngine | |
| static void | doCalculation (Real riskFreeDiscount, Real dividendDiscount, Real spotPrice, Real strikePrice, Real term, Real kappa, Real theta, Real sigma, Real v0, Real rho, const TypePayoff &type, const Integration &integration, ComplexLogFormula cpxLog, const AnalyticHestonEngine *enginePtr, Real &value, Size &evaluations) |
| static ComplexLogFormula | optimalControlVariate (Time t, Real v0, Real kappa, Real theta, Real sigma, Real rho) |
Analytic Heston engine incl. stochastic interest rates.
This class is pricing a european option under the following process
\[ \begin{array}{rcl} dS(t, S) &=& (r-d) S dt +\sqrt{v} S dW_1 \\ dv(t, S) &=& \kappa (\theta - v) dt + \sigma \sqrt{v} dW_2 \\ dr(t) &=& (\theta(t) - a r) dt + \eta dW_3 \\ dW_1 dW_2 &=& \rho dt \\ dW_1 dW_3 &=& 0 \\ dW_2 dW_3 &=& 0 \\ \end{array} \]
References:
Karel in't Hout, Joris Bierkens, Antoine von der Ploeg, Joe in't Panhuis, A Semi closed-from analytic pricing formula for call options in a hybrid Heston-Hull-White Model.
A. Sepp, Pricing European-Style Options under Jump Diffusion Processes with Stochastic Volatility: Applications of Fourier Transform (http://math.ut.ee/~spartak/papers/stochjumpvols.pdf)
Definition at line 65 of file analytichestonhullwhiteengine.hpp.
| AnalyticHestonHullWhiteEngine | ( | const ext::shared_ptr< HestonModel > & | hestonModel, |
| ext::shared_ptr< HullWhite > | hullWhiteModel, | ||
| Size | integrationOrder = 144 |
||
| ) |
Definition at line 26 of file analytichestonhullwhiteengine.cpp.
Here is the call graph for this function:| AnalyticHestonHullWhiteEngine | ( | const ext::shared_ptr< HestonModel > & | model, |
| ext::shared_ptr< HullWhite > | hullWhiteModel, | ||
| Real | relTolerance, | ||
| Size | maxEvaluations | ||
| ) |
Definition at line 38 of file analytichestonhullwhiteengine.cpp.
Here is the call graph for this function:
|
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 52 of file analytichestonhullwhiteengine.cpp.
Here is the call graph for this function:
|
overridevirtual |
Reimplemented from AnalyticHestonEngine.
Definition at line 57 of file analytichestonhullwhiteengine.cpp.
Here is the call graph for this function:Reimplemented from AnalyticHestonEngine.
Definition at line 93 of file analytichestonhullwhiteengine.hpp.
Here is the caller graph for this function:
|
private |
Definition at line 72 of file analytichestonhullwhiteengine.cpp.
Here is the caller graph for this function:
|
protected |
Definition at line 84 of file analytichestonhullwhiteengine.hpp.
|
mutableprivate |
Definition at line 88 of file analytichestonhullwhiteengine.hpp.
|
mutableprivate |
Definition at line 89 of file analytichestonhullwhiteengine.hpp.
|
private |
Definition at line 89 of file analytichestonhullwhiteengine.hpp.