QuantLib
: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
ql
models
equity
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
30
namespace
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
56
class
BatesDetJumpModel
:
public
BatesModel
{
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
67
class
BatesDoubleExpModel
:
public
HestonModel
{
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
80
class
BatesDoubleExpDetJumpModel
:
public
BatesDoubleExpModel
{
81
public
:
82
explicit
BatesDoubleExpDetJumpModel
(
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
QuantLib::BatesDetJumpModel
Definition:
batesmodel.hpp:56
QuantLib::BatesDetJumpModel::thetaLambda
Real thetaLambda() const
Definition:
batesmodel.hpp:63
QuantLib::BatesDetJumpModel::kappaLambda
Real kappaLambda() const
Definition:
batesmodel.hpp:62
QuantLib::BatesDoubleExpDetJumpModel
Definition:
batesmodel.hpp:80
QuantLib::BatesDoubleExpDetJumpModel::thetaLambda
Real thetaLambda() const
Definition:
batesmodel.hpp:88
QuantLib::BatesDoubleExpDetJumpModel::kappaLambda
Real kappaLambda() const
Definition:
batesmodel.hpp:87
QuantLib::BatesDoubleExpModel
Definition:
batesmodel.hpp:67
QuantLib::BatesDoubleExpModel::nuDown
Real nuDown() const
Definition:
batesmodel.hpp:74
QuantLib::BatesDoubleExpModel::lambda
Real lambda() const
Definition:
batesmodel.hpp:76
QuantLib::BatesDoubleExpModel::nuUp
Real nuUp() const
Definition:
batesmodel.hpp:75
QuantLib::BatesDoubleExpModel::p
Real p() const
Definition:
batesmodel.hpp:73
QuantLib::BatesModel
Bates stochastic-volatility model.
Definition:
batesmodel.hpp:43
QuantLib::BatesModel::delta
Real delta() const
Definition:
batesmodel.hpp:48
QuantLib::BatesModel::lambda
Real lambda() const
Definition:
batesmodel.hpp:49
QuantLib::BatesModel::generateArguments
void generateArguments() override
Definition:
batesmodel.cpp:38
QuantLib::BatesModel::nu
Real nu() const
Definition:
batesmodel.hpp:47
QuantLib::CalibratedModel::arguments_
std::vector< Parameter > arguments_
Definition:
model.hpp:126
QuantLib::HestonModel
Heston model for the stochastic volatility of an asset.
Definition:
hestonmodel.hpp:42
QuantLib::HestonModel::process
ext::shared_ptr< HestonProcess > process() const
Definition:
hestonmodel.hpp:58
QuantLib::Real
QL_REAL Real
real number
Definition:
types.hpp:50
QuantLib
Definition:
any.hpp:35
Generated by
Doxygen
1.9.5