QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
exponentialfittinghestonengine.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2020 Klaus Spanderen
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy 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
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file exponentialfittinghestonengine.hpp
21 \brief analytic Heston-model engine based on exponential fitting
22*/
23
24#ifndef quantlib_exponential_fitting_heston_engine_hpp
25#define quantlib_exponential_fitting_heston_engine_hpp
26
29
30#include <vector>
31
32namespace QuantLib {
33 class AnalyticHestonEngine;
34
35 //! analytic Heston-model engine based on
36 // exponentially fitted Gauss-Laguerre quadrature
37
38 /*! References:
39 D. Conte, L. Ixaru, B. Paternoster, G. Santomauro, 2014
40 Exponentially-fitted Gauss–Laguerre quadrature rule for
41 integrals over an unbounded interval
42
43 For adaptation details see
44 https://hpcquantlib.wordpress.com/2020/05/17/optimized-heston-model-integration-exponentially-fitted-gauss-laguerre-quadrature-rule/
45 */
46
47
49 : public GenericModelEngine<HestonModel,
50 VanillaOption::arguments,
51 VanillaOption::results> {
52 public:
54
56 const ext::shared_ptr<HestonModel>& model,
57 ControlVariate cv = ControlVariate::OptimalCV,
58 Real scaling = Null<Real>(),
59 Real alpha = -0.5);
60
61 void calculate() const override;
62
63 private:
66 const ext::shared_ptr<AnalyticHestonEngine> analyticEngine_;
67
68 static std::vector<Real> moneyness_;
69 };
70}
71
72#endif
analytic Heston-model engine
const ext::shared_ptr< AnalyticHestonEngine > analyticEngine_
AnalyticHestonEngine::ComplexLogFormula ControlVariate
Base class for some pricing engine on a particular model.
template class providing a null value for a given type.
Definition: null.hpp:76
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35
Real alpha
Definition: sabr.cpp:200
Vanilla option on a single asset.