QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
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
30namespace QuantLib {
31
33
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
Calibrated model class.
Definition: model.hpp:86
std::vector< Parameter > arguments_
Definition: model.hpp:126
GJR-GARCH model for the stochastic volatility of an asset.
void generateArguments() override
ext::shared_ptr< GJRGARCHProcess > process() const
ext::shared_ptr< GJRGARCHProcess > process_
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35