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

Pricing engine for European continuous geometric average price Asian. More...

#include <ql/experimental/asian/analytic_cont_geom_av_price_heston.hpp>

+ Inheritance diagram for AnalyticContinuousGeometricAveragePriceAsianHestonEngine:
+ Collaboration diagram for AnalyticContinuousGeometricAveragePriceAsianHestonEngine:

Public Member Functions

 AnalyticContinuousGeometricAveragePriceAsianHestonEngine (ext::shared_ptr< HestonProcess > process, Size summationCutoff=50, Real xiRightLimit=100.0)
 
void calculate () const override
 
std::complex< RealPhi (const std::complex< Real > &s, const std::complex< Real > &w, Real T, Real t=0.0, Size cutoff=50) const
 
- Public Member Functions inherited from GenericEngine< ContinuousAveragingAsianOption::arguments, ContinuousAveragingAsianOption::results >
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 Member Functions

std::complex< Realz1_f (const std::complex< Real > &s, const std::complex< Real > &w, Real T) const
 
std::complex< Realz2_f (const std::complex< Real > &s, const std::complex< Real > &w, Real T) const
 
std::complex< Realz3_f (const std::complex< Real > &s, const std::complex< Real > &w, Real T) const
 
std::complex< Realz4_f (const std::complex< Real > &s, const std::complex< Real > &w) const
 
std::pair< std::complex< Real >, std::complex< Real > > F_F_tilde (const std::complex< Real > &z1, const std::complex< Real > &z2, const std::complex< Real > &z3, const std::complex< Real > &z4, Real tau, Size cutoff=50) const
 
std::complex< Realf (const std::complex< Real > &z1, const std::complex< Real > &z2, const std::complex< Real > &z3, const std::complex< Real > &z4, int n, Real tau) const
 

Private Attributes

Real v0_
 
Real rho_
 
Real kappa_
 
Real theta_
 
Real sigma_
 
Handle< YieldTermStructuredividendYield_
 
Handle< YieldTermStructureriskFreeRate_
 
Handle< Quotes0_
 
ext::shared_ptr< HestonProcessprocess_
 
Real a1_
 
Real a2_
 
Real a3_ = 0.0
 
Real a4_ = 0.0
 
Real a5_ = 0.0
 
std::map< int, std::complex< Real > > fLookupTable_
 
Size summationCutoff_
 
Real xiRightLimit_
 
GaussLegendreIntegration integrator_
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Attributes inherited from GenericEngine< ContinuousAveragingAsianOption::arguments, ContinuousAveragingAsianOption::results >
ContinuousAveragingAsianOption::arguments arguments_
 
ContinuousAveragingAsianOption::results results_
 

Detailed Description

Pricing engine for European continuous geometric average price Asian.

This class implements a continuous geometric average price Asian option with European exercise under the Heston stochastic vol model where spot and variance follow the processes

\[ \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 \\ dW_1 dW_2 &=& \rho dt \\ \end{array} \]

References:

Implements the analytical solution for continuous geometric Asian options developed in "Pricing of geometric Asian options under Heston's stochastic volatility model", B. Kim & I. S. Wee, Quantative Finance 14:10, 1795-1809 (2014)

Tests:
  • the correctness of the returned value is tested by reproducing results in Table 1 and Table 4 of the paper

Definition at line 65 of file analytic_cont_geom_av_price_heston.hpp.

Constructor & Destructor Documentation

◆ AnalyticContinuousGeometricAveragePriceAsianHestonEngine()

AnalyticContinuousGeometricAveragePriceAsianHestonEngine ( ext::shared_ptr< HestonProcess process,
Size  summationCutoff = 50,
Real  xiRightLimit = 100.0 
)
explicit

Definition at line 75 of file analytic_cont_geom_av_price_heston.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ calculate()

void calculate ( ) const
overridevirtual

Implements PricingEngine.

Definition at line 208 of file analytic_cont_geom_av_price_heston.cpp.

+ Here is the call graph for this function:

◆ Phi()

std::complex< Real > Phi ( const std::complex< Real > &  s,
const std::complex< Real > &  w,
Real  T,
Real  t = 0.0,
Size  cutoff = 50 
) const

Definition at line 184 of file analytic_cont_geom_av_price_heston.cpp.

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

◆ z1_f()

std::complex< Real > z1_f ( const std::complex< Real > &  s,
const std::complex< Real > &  w,
Real  T 
) const
private

Definition at line 98 of file analytic_cont_geom_av_price_heston.cpp.

+ Here is the caller graph for this function:

◆ z2_f()

std::complex< Real > z2_f ( const std::complex< Real > &  s,
const std::complex< Real > &  w,
Real  T 
) const
private

Definition at line 103 of file analytic_cont_geom_av_price_heston.cpp.

+ Here is the caller graph for this function:

◆ z3_f()

std::complex< Real > z3_f ( const std::complex< Real > &  s,
const std::complex< Real > &  w,
Real  T 
) const
private

Definition at line 108 of file analytic_cont_geom_av_price_heston.cpp.

+ Here is the caller graph for this function:

◆ z4_f()

std::complex< Real > z4_f ( const std::complex< Real > &  s,
const std::complex< Real > &  w 
) const
private

Definition at line 113 of file analytic_cont_geom_av_price_heston.cpp.

+ Here is the caller graph for this function:

◆ F_F_tilde()

std::pair< std::complex< Real >, std::complex< Real > > F_F_tilde ( const std::complex< Real > &  z1,
const std::complex< Real > &  z2,
const std::complex< Real > &  z3,
const std::complex< Real > &  z4,
Real  tau,
Size  cutoff = 50 
) const
private

Definition at line 162 of file analytic_cont_geom_av_price_heston.cpp.

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

◆ f()

std::complex< Real > f ( const std::complex< Real > &  z1,
const std::complex< Real > &  z2,
const std::complex< Real > &  z3,
const std::complex< Real > &  z4,
int  n,
Real  tau 
) const
private

Definition at line 118 of file analytic_cont_geom_av_price_heston.cpp.

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

Member Data Documentation

◆ v0_

Real v0_
private

Definition at line 82 of file analytic_cont_geom_av_price_heston.hpp.

◆ rho_

Real rho_
private

Definition at line 82 of file analytic_cont_geom_av_price_heston.hpp.

◆ kappa_

Real kappa_
private

Definition at line 82 of file analytic_cont_geom_av_price_heston.hpp.

◆ theta_

Real theta_
private

Definition at line 82 of file analytic_cont_geom_av_price_heston.hpp.

◆ sigma_

Real sigma_
private

Definition at line 82 of file analytic_cont_geom_av_price_heston.hpp.

◆ dividendYield_

Handle<YieldTermStructure> dividendYield_
private

Definition at line 83 of file analytic_cont_geom_av_price_heston.hpp.

◆ riskFreeRate_

Handle<YieldTermStructure> riskFreeRate_
private

Definition at line 84 of file analytic_cont_geom_av_price_heston.hpp.

◆ s0_

Handle<Quote> s0_
private

Definition at line 85 of file analytic_cont_geom_av_price_heston.hpp.

◆ process_

ext::shared_ptr<HestonProcess> process_
private

Definition at line 87 of file analytic_cont_geom_av_price_heston.hpp.

◆ a1_

Real a1_
private

Definition at line 90 of file analytic_cont_geom_av_price_heston.hpp.

◆ a2_

Real a2_
private

Definition at line 90 of file analytic_cont_geom_av_price_heston.hpp.

◆ a3_

Real a3_ = 0.0
mutableprivate

Definition at line 91 of file analytic_cont_geom_av_price_heston.hpp.

◆ a4_

Real a4_ = 0.0
private

Definition at line 91 of file analytic_cont_geom_av_price_heston.hpp.

◆ a5_

Real a5_ = 0.0
private

Definition at line 91 of file analytic_cont_geom_av_price_heston.hpp.

◆ fLookupTable_

std::map<int, std::complex<Real> > fLookupTable_
mutableprivate

Definition at line 94 of file analytic_cont_geom_av_price_heston.hpp.

◆ summationCutoff_

Size summationCutoff_
private

Definition at line 97 of file analytic_cont_geom_av_price_heston.hpp.

◆ xiRightLimit_

Real xiRightLimit_
private

Definition at line 98 of file analytic_cont_geom_av_price_heston.hpp.

◆ integrator_

GaussLegendreIntegration integrator_
private

Definition at line 101 of file analytic_cont_geom_av_price_heston.hpp.