QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
batesmodel.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2005 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
24#ifndef quantlib_bates_model_hpp
25#define quantlib_bates_model_hpp
26
27#include <ql/processes/batesprocess.hpp>
28#include <ql/models/equity/hestonmodel.hpp>
29
30namespace QuantLib {
31
33
43 class BatesModel : public HestonModel {
44 public:
45 explicit BatesModel(const ext::shared_ptr<BatesProcess> & process);
46
47 Real nu() const { return arguments_[5](0.0); }
48 Real delta() const { return arguments_[6](0.0); }
49 Real lambda() const { return arguments_[7](0.0); }
50
51 protected:
52 void generateArguments() override;
53 };
54
55
57 public:
58 explicit BatesDetJumpModel(
59 const ext::shared_ptr<BatesProcess> & process,
60 Real kappaLambda = 1.0, Real thetaLambda = 0.1);
61
62 Real kappaLambda() const { return arguments_[8](0.0); }
63 Real thetaLambda() const { return arguments_[9](0.0); }
64 };
65
66
68 public:
69 explicit BatesDoubleExpModel(
70 const ext::shared_ptr<HestonProcess> & process,
71 Real lambda = 0.1, Real nuUp = 0.1, Real nuDown = 0.1, Real p = 0.5);
72
73 Real p() const { return arguments_[5](0.0); }
74 Real nuDown() const { return arguments_[6](0.0); }
75 Real nuUp() const { return arguments_[7](0.0); }
76 Real lambda() const { return arguments_[8](0.0); }
77 };
78
79
81 public:
83 const ext::shared_ptr<HestonProcess> & process,
84 Real lambda = 0.1, Real nuUp = 0.1, Real nuDown = 0.1,
85 Real p = 0.5, Real kappaLambda = 1.0, Real thetaLambda = 0.1);
86
87 Real kappaLambda() const { return arguments_[9](0.0); }
88 Real thetaLambda() const { return arguments_[10](0.0); }
89 };
90
91}
92
93
94#endif
95
Bates stochastic-volatility model.
Definition: batesmodel.hpp:43
Real delta() const
Definition: batesmodel.hpp:48
Real lambda() const
Definition: batesmodel.hpp:49
void generateArguments() override
Definition: batesmodel.cpp:38
std::vector< Parameter > arguments_
Definition: model.hpp:126
Heston model for the stochastic volatility of an asset.
Definition: hestonmodel.hpp:42
ext::shared_ptr< HestonProcess > process() const
Definition: hestonmodel.hpp:58
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35