QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
fdhestonrebateengine.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2008 Andreas Gaida
5 Copyright (C) 2008 Ralph Schreyer
6 Copyright (C) 2008 Klaus Spanderen
7
8 This file is part of QuantLib, a free-software/open-source library
9 for financial quantitative analysts and developers - http://quantlib.org/
10
11 QuantLib is free software: you can redistribute it and/or modify it
12 under the terms of the QuantLib license. You should have received a
13 copy of the license along with this program; if not, please email
14 <quantlib-dev@lists.sf.net>. The license is also available online at
15 <http://quantlib.org/license.shtml>.
16
17 This program is distributed in the hope that it will be useful, but WITHOUT
18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 FOR A PARTICULAR PURPOSE. See the license for more details.
20*/
21
26#ifndef quantlib_fd_heston_rebate_engine_hpp
27#define quantlib_fd_heston_rebate_engine_hpp
28
29#include <ql/models/equity/hestonmodel.hpp>
30#include <ql/pricingengines/genericmodelengine.hpp>
31#include <ql/methods/finitedifferences/solvers/fdmhestonsolver.hpp>
32#include <ql/methods/finitedifferences/solvers/fdmbackwardsolver.hpp>
33#include <ql/instruments/dividendbarrieroption.hpp>
34#include <ql/termstructures/volatility/equityfx/localvoltermstructure.hpp>
35
36namespace QuantLib {
37
38 QL_DEPRECATED_DISABLE_WARNING
39
41
43 : public GenericModelEngine<HestonModel,
44 DividendBarrierOption::arguments,
45 DividendBarrierOption::results> {
46 QL_DEPRECATED_ENABLE_WARNING
47 public:
48 explicit FdHestonRebateEngine(
49 const ext::shared_ptr<HestonModel>& model,
50 Size tGrid = 100,
51 Size xGrid = 100,
52 Size vGrid = 50,
53 Size dampingSteps = 0,
54 const FdmSchemeDesc& schemeDesc = FdmSchemeDesc::Hundsdorfer(),
55 ext::shared_ptr<LocalVolTermStructure> leverageFct = {},
56 Real mixingFactor = 1.0);
57
58 explicit FdHestonRebateEngine(
59 const ext::shared_ptr<HestonModel>& model,
60 DividendSchedule dividends,
61 Size tGrid = 100,
62 Size xGrid = 100,
63 Size vGrid = 50,
64 Size dampingSteps = 0,
65 const FdmSchemeDesc& schemeDesc = FdmSchemeDesc::Hundsdorfer(),
66 ext::shared_ptr<LocalVolTermStructure> leverageFct = {},
67 Real mixingFactor = 1.0);
68
69 void calculate() const override;
70
71 private:
76 const ext::shared_ptr<LocalVolTermStructure> leverageFct_;
78 };
79
80}
81
82#endif
Finite-differences Heston barrier-option rebate helper engine.
const ext::shared_ptr< LocalVolTermStructure > leverageFct_
Base class for some pricing engine on a particular model.
QL_REAL Real
real number
Definition: types.hpp:50
std::size_t Size
size of a container
Definition: types.hpp:58
Definition: any.hpp:35
std::vector< ext::shared_ptr< Dividend > > DividendSchedule
static FdmSchemeDesc Hundsdorfer()