QuantLib
: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
ql
models
equity
gjrgarchmodel.hpp
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
Copyright (C) 2008 Yee Man Chan
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_gjrgarch_model_hpp
25
#define quantlib_gjrgarch_model_hpp
26
27
#include <ql/models/model.hpp>
28
#include <ql/processes/gjrgarchprocess.hpp>
29
30
namespace
QuantLib
{
31
33
42
class
GJRGARCHModel
:
public
CalibratedModel
{
43
public
:
44
GJRGARCHModel
(
const
ext::shared_ptr<GJRGARCHProcess>&
process
);
45
46
// variance mean reversion level multiplied by
47
// the proportion not accounted by alpha, beta and gamma
48
Real
omega
()
const
{
return
arguments_
[0](0.0); }
49
// proportion attributed to the impact of all innovations
50
Real
alpha
()
const
{
return
arguments_
[1](0.0); }
51
// proportion attributed to the impact of previous variance
52
Real
beta
()
const
{
return
arguments_
[2](0.0); }
53
// proportion attributed to the impact of negative innovations
54
Real
gamma
()
const
{
return
arguments_
[3](0.0); }
55
// market price of risk
56
Real
lambda
()
const
{
return
arguments_
[4](0.0); }
57
// spot variance
58
Real
v0
()
const
{
return
arguments_
[5](0.0); }
59
60
// underlying process
61
ext::shared_ptr<GJRGARCHProcess>
process
()
const
{
return
process_
; }
62
63
class
VolatilityConstraint;
64
protected
:
65
void
generateArguments
()
override
;
66
ext::shared_ptr<GJRGARCHProcess>
process_
;
67
};
68
}
69
70
71
#endif
72
QuantLib::CalibratedModel
Calibrated model class.
Definition:
model.hpp:86
QuantLib::CalibratedModel::arguments_
std::vector< Parameter > arguments_
Definition:
model.hpp:126
QuantLib::GJRGARCHModel
GJR-GARCH model for the stochastic volatility of an asset.
Definition:
gjrgarchmodel.hpp:42
QuantLib::GJRGARCHModel::omega
Real omega() const
Definition:
gjrgarchmodel.hpp:48
QuantLib::GJRGARCHModel::lambda
Real lambda() const
Definition:
gjrgarchmodel.hpp:56
QuantLib::GJRGARCHModel::generateArguments
void generateArguments() override
Definition:
gjrgarchmodel.cpp:67
QuantLib::GJRGARCHModel::process
ext::shared_ptr< GJRGARCHProcess > process() const
Definition:
gjrgarchmodel.hpp:61
QuantLib::GJRGARCHModel::v0
Real v0() const
Definition:
gjrgarchmodel.hpp:58
QuantLib::GJRGARCHModel::process_
ext::shared_ptr< GJRGARCHProcess > process_
Definition:
gjrgarchmodel.hpp:66
QuantLib::GJRGARCHModel::gamma
Real gamma() const
Definition:
gjrgarchmodel.hpp:54
QuantLib::GJRGARCHModel::beta
Real beta() const
Definition:
gjrgarchmodel.hpp:52
QuantLib::GJRGARCHModel::alpha
Real alpha() const
Definition:
gjrgarchmodel.hpp:50
QuantLib::Real
QL_REAL Real
real number
Definition:
types.hpp:50
QuantLib
Definition:
any.hpp:35
Generated by
Doxygen
1.9.5