FFTEngine Class Reference

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

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

Inheritance diagram for FFTEngine:

List of all members.

Public Member Functions

 FFTEngine (const boost::shared_ptr< StochasticProcess1D > &process, Real logStrikeSpacing)
void calculate () const
void update ()
void precalculate (const std::vector< boost::shared_ptr< Instrument > > &optionList)
virtual std::auto_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 (boost::shared_ptr< StrikedTypePayoff > payoff, boost::shared_ptr< Exercise > exercise) const

Protected Attributes

boost::shared_ptr
< StochasticProcess1D
process_
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.