QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
fftvanillaengine.hpp
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
24#ifndef quantlib_fft_vanilla_engine_hpp
25#define quantlib_fft_vanilla_engine_hpp
26
27#include <ql/experimental/variancegamma/fftengine.hpp>
28#include <ql/processes/blackscholesprocess.hpp>
29#include <complex>
30
31namespace QuantLib {
32
34
39 class FFTVanillaEngine : public FFTEngine {
40 public:
41 explicit FFTVanillaEngine(
42 const ext::shared_ptr<GeneralizedBlackScholesProcess>&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:
56 };
57
58}
59
60
61#endif
62
Concrete date class.
Definition: date.hpp:125
Base class for FFT pricing engines for European vanilla options.
Definition: fftengine.hpp:48
FFT Pricing engine vanilla options under a Black Scholes process.
void precalculateExpiry(Date d) override
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
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