QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
hybridhestonhullwhiteprocess.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) 2007, 2008 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
20/*! \file hybridhestonhullwhiteprocess.hpp
21 \brief hybrid equity (heston model)
22 with stochastic interest rates (hull white model)
23*/
24
25#ifndef quantlib_hybrid_heston_hull_white_process_hpp
26#define quantlib_hybrid_heston_hull_white_process_hpp
27
32
33namespace QuantLib {
34 //! Hybrid Heston Hull-White stochastic process
35 /*! This class implements a three factor Heston Hull-White model
36
37 \bug This class was not tested enough to guarantee
38 its functionality... work in progress
39
40 \ingroup processes
41 */
43 public:
45
47 const ext::shared_ptr<HestonProcess> & hestonProcess,
48 const ext::shared_ptr<HullWhiteForwardProcess> & hullWhiteProcess,
49 Real corrEquityShortRate,
51
52 Size size() const override;
53 Array initialValues() const override;
54 Array drift(Time t, const Array& x) const override;
55 Matrix diffusion(Time t, const Array& x) const override;
56 Array apply(const Array& x0, const Array& dx) const override;
57
58 Array evolve(Time t0, const Array& x0, Time dt, const Array& dw) const override;
59
60 DiscountFactor numeraire(Time t, const Array& x) const;
61
62 const ext::shared_ptr<HestonProcess>& hestonProcess() const;
63 const ext::shared_ptr<HullWhiteForwardProcess>& hullWhiteProcess() const;
64
65 Real eta() const;
66 Time time(const Date& date) const override;
68 void update() override;
69
70 protected:
71 const ext::shared_ptr<HestonProcess> hestonProcess_;
72 const ext::shared_ptr<HullWhiteForwardProcess> hullWhiteProcess_;
73
74 //model is used to calculate P(t,T)
75 const ext::shared_ptr<HullWhite> hullWhiteModel_;
76
80 const Time T_;
82 };
83
84}
85
86
87#endif
1-D array used in linear algebra.
Definition: array.hpp:52
Concrete date class.
Definition: date.hpp:125
Hybrid Heston Hull-White stochastic process.
Array drift(Time t, const Array &x) const override
returns the drift part of the equation, i.e.,
Size size() const override
returns the number of dimensions of the stochastic process
Array evolve(Time t0, const Array &x0, Time dt, const Array &dw) const override
Matrix diffusion(Time t, const Array &x) const override
returns the diffusion part of the equation, i.e.
Time time(const Date &date) const override
const ext::shared_ptr< HullWhiteForwardProcess > & hullWhiteProcess() const
const ext::shared_ptr< HestonProcess > & hestonProcess() const
Array initialValues() const override
returns the initial values of the state variables
const ext::shared_ptr< HullWhite > hullWhiteModel_
DiscountFactor numeraire(Time t, const Array &x) const
Array apply(const Array &x0, const Array &dx) const override
const ext::shared_ptr< HestonProcess > hestonProcess_
const ext::shared_ptr< HullWhiteForwardProcess > hullWhiteProcess_
Matrix used in linear algebra.
Definition: matrix.hpp:41
multi-dimensional stochastic process class.
const DefaultType & t
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
Real DiscountFactor
discount factor between dates
Definition: types.hpp:66
std::size_t Size
size of a container
Definition: types.hpp:58
Heston stochastic process.
Hull & White (HW) model.
Hull-White stochastic processes.
multi model process for hybrid products
Definition: any.hpp:35