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

FFT engine for vanilla options under a Variance Gamma process. More...

#include <fftvariancegammaengine.hpp>

+ Inheritance diagram for FFTVarianceGammaEngine:
+ Collaboration diagram for FFTVarianceGammaEngine:

Public Member Functions

 FFTVarianceGammaEngine (const ext::shared_ptr< VarianceGammaProcess > &process, Real logStrikeSpacing=0.001)
 
std::unique_ptr< FFTEngineclone () const override
 
- Public Member Functions inherited from FFTEngine
 FFTEngine (ext::shared_ptr< StochasticProcess1D > process, Real logStrikeSpacing)
 
void calculate () const override
 
void update () override
 
void precalculate (const std::vector< ext::shared_ptr< Instrument > > &optionList)
 
virtual std::unique_ptr< FFTEngineclone () const =0
 

Protected Member Functions

void precalculateExpiry (Date d) override
 
std::complex< RealcomplexFourierTransform (std::complex< Real > u) const override
 
Real discountFactor (Date d) const override
 
Real dividendYield (Date d) const override
 
- Protected Member Functions inherited from FFTEngine
virtual void precalculateExpiry (Date d)=0
 
virtual std::complex< RealcomplexFourierTransform (std::complex< Real > u) const =0
 
virtual Real discountFactor (Date d) const =0
 
virtual Real dividendYield (Date d) const =0
 
void calculateUncached (const ext::shared_ptr< StrikedTypePayoff > &payoff, const ext::shared_ptr< Exercise > &exercise) const
 

Private Attributes

DiscountFactor dividendDiscount_
 
DiscountFactor riskFreeDiscount_
 
Time t_
 
Real sigma_
 
Real nu_
 
Real theta_
 

Additional Inherited Members

- Protected Attributes inherited from FFTEngine
ext::shared_ptr< StochasticProcess1Dprocess_
 
Real lambda_
 

Detailed Description

FFT engine for vanilla options under a Variance Gamma process.

Tests:
the correctness of the returned values is tested by comparison with known good values and the analytic approach

Definition at line 39 of file fftvariancegammaengine.hpp.

Constructor & Destructor Documentation

◆ FFTVarianceGammaEngine()

FFTVarianceGammaEngine ( const ext::shared_ptr< VarianceGammaProcess > &  process,
Real  logStrikeSpacing = 0.001 
)
explicit

Definition at line 25 of file fftvariancegammaengine.cpp.

Member Function Documentation

◆ clone()

std::unique_ptr< FFTEngine > clone ( ) const
overridevirtual

Implements FFTEngine.

Definition at line 31 of file fftvariancegammaengine.cpp.

◆ precalculateExpiry()

void precalculateExpiry ( Date  d)
overrideprotectedvirtual

Implements FFTEngine.

Definition at line 38 of file fftvariancegammaengine.cpp.

+ Here is the call graph for this function:

◆ complexFourierTransform()

std::complex< Real > complexFourierTransform ( std::complex< Real u) const
overrideprotectedvirtual

Implements FFTEngine.

Definition at line 56 of file fftvariancegammaengine.cpp.

◆ discountFactor()

Real discountFactor ( Date  d) const
overrideprotectedvirtual

Implements FFTEngine.

Definition at line 70 of file fftvariancegammaengine.cpp.

◆ dividendYield()

Real dividendYield ( Date  d) const
overrideprotectedvirtual

Implements FFTEngine.

Definition at line 77 of file fftvariancegammaengine.cpp.

Member Data Documentation

◆ dividendDiscount_

DiscountFactor dividendDiscount_
private

Definition at line 52 of file fftvariancegammaengine.hpp.

◆ riskFreeDiscount_

DiscountFactor riskFreeDiscount_
private

Definition at line 53 of file fftvariancegammaengine.hpp.

◆ t_

Time t_
private

Definition at line 54 of file fftvariancegammaengine.hpp.

◆ sigma_

Real sigma_
private

Definition at line 55 of file fftvariancegammaengine.hpp.

◆ nu_

Real nu_
private

Definition at line 56 of file fftvariancegammaengine.hpp.

◆ theta_

Real theta_
private

Definition at line 57 of file fftvariancegammaengine.hpp.