QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
fdhestonrebateengine.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) 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
22/*! \file fdhestonrebateengine.hpp
23 \brief Finite-differences Heston barrier-option rebate helper engine
24*/
25
26#ifndef quantlib_fd_heston_rebate_engine_hpp
27#define quantlib_fd_heston_rebate_engine_hpp
28
35
36namespace QuantLib {
37
38 //! Finite-differences Heston barrier-option rebate helper engine
39 /*! \ingroup barrierengines */
41 : public GenericModelEngine<HestonModel,
42 BarrierOption::arguments,
43 BarrierOption::results> {
44 public:
45 explicit FdHestonRebateEngine(
46 const ext::shared_ptr<HestonModel>& model,
47 Size tGrid = 100,
48 Size xGrid = 100,
49 Size vGrid = 50,
50 Size dampingSteps = 0,
51 const FdmSchemeDesc& schemeDesc = FdmSchemeDesc::Hundsdorfer(),
52 ext::shared_ptr<LocalVolTermStructure> leverageFct = {},
53 Real mixingFactor = 1.0);
54
55 explicit FdHestonRebateEngine(
56 const ext::shared_ptr<HestonModel>& model,
57 DividendSchedule dividends,
58 Size tGrid = 100,
59 Size xGrid = 100,
60 Size vGrid = 50,
61 Size dampingSteps = 0,
62 const FdmSchemeDesc& schemeDesc = FdmSchemeDesc::Hundsdorfer(),
63 ext::shared_ptr<LocalVolTermStructure> leverageFct = {},
64 Real mixingFactor = 1.0);
65
66 void calculate() const override;
67
68 private:
72 const ext::shared_ptr<LocalVolTermStructure> leverageFct_;
74 };
75
76}
77
78#endif
Barrier option on a single asset.
Finite-differences Heston barrier-option rebate helper engine.
const ext::shared_ptr< LocalVolTermStructure > leverageFct_
Base class for some pricing engine on a particular model.
Generic option engine based on a model.
QL_REAL Real
real number
Definition: types.hpp:50
std::size_t Size
size of a container
Definition: types.hpp:58
Heston model for the stochastic volatility of an asset.
Local volatility term structure base class.
Definition: any.hpp:35
std::vector< ext::shared_ptr< Dividend > > DividendSchedule
static FdmSchemeDesc Hundsdorfer()