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

FFT Pricing engine vanilla options under a Black Scholes process. More...

#include <ql/experimental/variancegamma/fftvanillaengine.hpp>

+ Inheritance diagram for FFTVanillaEngine:
+ Collaboration diagram for FFTVanillaEngine:

Public Member Functions

 FFTVanillaEngine (const ext::shared_ptr< GeneralizedBlackScholesProcess > &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 var_
 

Additional Inherited Members

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

Detailed Description

FFT Pricing engine vanilla options under a Black Scholes process.

Tests:
the correctness of the returned values is tested by comparison with Black Scholes pricing.

Definition at line 39 of file fftvanillaengine.hpp.

Constructor & Destructor Documentation

◆ FFTVanillaEngine()

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

Definition at line 27 of file fftvanillaengine.cpp.

Member Function Documentation

◆ clone()

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

Implements FFTEngine.

Definition at line 33 of file fftvanillaengine.cpp.

◆ precalculateExpiry()

void precalculateExpiry ( Date  d)
overrideprotectedvirtual

Implements FFTEngine.

Definition at line 40 of file fftvanillaengine.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 60 of file fftvanillaengine.cpp.

◆ discountFactor()

Real discountFactor ( Date  d) const
overrideprotectedvirtual

Implements FFTEngine.

Definition at line 72 of file fftvanillaengine.cpp.

◆ dividendYield()

Real dividendYield ( Date  d) const
overrideprotectedvirtual

Implements FFTEngine.

Definition at line 79 of file fftvanillaengine.cpp.

Member Data Documentation

◆ dividendDiscount_

DiscountFactor dividendDiscount_
private

Definition at line 52 of file fftvanillaengine.hpp.

◆ riskFreeDiscount_

DiscountFactor riskFreeDiscount_
private

Definition at line 53 of file fftvanillaengine.hpp.

◆ t_

Time t_
private

Definition at line 54 of file fftvanillaengine.hpp.

◆ var_

Real var_
private

Definition at line 55 of file fftvanillaengine.hpp.