QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
FFTEngine Class Referenceabstract

Base class for FFT pricing engines for European vanilla options. More...

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

Inheritance diagram for FFTEngine:

Public Member Functions

 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

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

Protected Attributes

ext::shared_ptr< StochasticProcess1Dprocess_
Real lambda_

Detailed Description

Base class for FFT pricing engines for European vanilla options.

The FFT engine calculates the values of all options with the same expiry at the same time. For that reason it is very inefficient to price options individually. When using this engine you should collect all the options you wish to price in a list and call the engine's precalculate method before calling the NPV method of the option.

References: Carr, P. and D. B. Madan (1998), "Option Valuation using the fast Fourier transform," Journal of Computational Finance, 2, 61-73.