QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
fftvariancegammaengine.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4Copyright (C) 2010 Adrian O' Neill
5
6This file is part of QuantLib, a free-software/open-source library
7for financial quantitative analysts and developers - http://quantlib.org/
8
9QuantLib is free software: you can redistribute it and/or modify it
10under the terms of the QuantLib license. You should have received a
11copy of the license along with this program; if not, please email
12<quantlib-dev@lists.sf.net>. The license is also available online at
13<http://quantlib.org/license.shtml>.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file fftvariancegammaengine.hpp
21 \brief \brief FFT engine for vanilla options under a Variance Gamma process
22*/
23
24#ifndef quantlib_fft_variancegamma_engine_hpp
25#define quantlib_fft_variancegamma_engine_hpp
26
29#include <complex>
30
31namespace QuantLib {
32
33 //! FFT engine for vanilla options under a Variance Gamma process
34 /*! \ingroup vanillaengines
35
36 \test the correctness of the returned values is tested by
37 comparison with known good values and the analytic approach
38 */
40 public:
42 const ext::shared_ptr<VarianceGammaProcess>&process,
43 Real logStrikeSpacing = 0.001);
44 std::unique_ptr<FFTEngine> clone() const override;
45 protected:
46 void precalculateExpiry(Date d) override;
47 std::complex<Real> complexFourierTransform(std::complex<Real> u) const override;
48 Real discountFactor(Date d) const override;
49 Real dividendYield(Date d) const override;
50
51 private:
58 };
59
60}
61
62
63#endif
64
Concrete date class.
Definition: date.hpp:125
Base class for FFT pricing engines for European vanilla options.
Definition: fftengine.hpp:48
FFT engine for vanilla options under a Variance Gamma process.
std::complex< Real > complexFourierTransform(std::complex< Real > u) const override
std::unique_ptr< FFTEngine > clone() const override
Real dividendYield(Date d) const override
Real discountFactor(Date d) const override
Date d
base class for FFT option pricing engines
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
Real DiscountFactor
discount factor between dates
Definition: types.hpp:66
Definition: any.hpp:35
Variance Gamma stochastic process.