QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Hybrid Heston Hull-White stochastic process. More...
#include <hybridhestonhullwhiteprocess.hpp>
Public Types | |
enum | Discretization { Euler , BSMHullWhite } |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Public Member Functions | |
HybridHestonHullWhiteProcess (const ext::shared_ptr< HestonProcess > &hestonProcess, const ext::shared_ptr< HullWhiteForwardProcess > &hullWhiteProcess, Real corrEquityShortRate, Discretization discretization=BSMHullWhite) | |
Size | size () const override |
returns the number of dimensions of the stochastic process More... | |
Array | initialValues () const override |
returns the initial values of the state variables More... | |
Array | drift (Time t, const Array &x) const override |
returns the drift part of the equation, i.e., \( \mu(t, \mathrm{x}_t) \) More... | |
Matrix | diffusion (Time t, const Array &x) const override |
returns the diffusion part of the equation, i.e. \( \sigma(t, \mathrm{x}_t) \) More... | |
Array | apply (const Array &x0, const Array &dx) const override |
Array | evolve (Time t0, const Array &x0, Time dt, const Array &dw) const override |
DiscountFactor | numeraire (Time t, const Array &x) const |
const ext::shared_ptr< HestonProcess > & | hestonProcess () const |
const ext::shared_ptr< HullWhiteForwardProcess > & | hullWhiteProcess () const |
Real | eta () const |
Time | time (const Date &date) const override |
Discretization | discretization () const |
void | update () override |
Public Member Functions inherited from StochasticProcess | |
~StochasticProcess () override=default | |
virtual Size | factors () const |
returns the number of independent factors of the process More... | |
virtual Array | expectation (Time t0, const Array &x0, Time dt) const |
virtual Matrix | stdDeviation (Time t0, const Array &x0, Time dt) const |
virtual Matrix | covariance (Time t0, const Array &x0, Time dt) const |
void | update () override |
Public Member Functions inherited from Observer | |
Observer ()=default | |
Observer (const Observer &) | |
Observer & | operator= (const Observer &) |
virtual | ~Observer () |
std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
void | registerWithObservables (const ext::shared_ptr< Observer > &) |
Size | unregisterWith (const ext::shared_ptr< Observable > &) |
void | unregisterWithAll () |
virtual void | update ()=0 |
virtual void | deepUpdate () |
Public Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Protected Attributes | |
const ext::shared_ptr< HestonProcess > | hestonProcess_ |
const ext::shared_ptr< HullWhiteForwardProcess > | hullWhiteProcess_ |
const ext::shared_ptr< HullWhite > | hullWhiteModel_ |
const Real | corrEquityShortRate_ |
const Discretization | discretization_ |
const Real | maxRho_ |
const Time | T_ |
DiscountFactor | endDiscount_ |
Protected Attributes inherited from StochasticProcess | |
ext::shared_ptr< discretization > | discretization_ |
Additional Inherited Members | |
Protected Member Functions inherited from StochasticProcess | |
StochasticProcess ()=default | |
StochasticProcess (ext::shared_ptr< discretization >) | |
Hybrid Heston Hull-White stochastic process.
This class implements a three factor Heston Hull-White model
Definition at line 42 of file hybridhestonhullwhiteprocess.hpp.
enum Discretization |
Enumerator | |
---|---|
Euler | |
BSMHullWhite |
Definition at line 44 of file hybridhestonhullwhiteprocess.hpp.
HybridHestonHullWhiteProcess | ( | const ext::shared_ptr< HestonProcess > & | hestonProcess, |
const ext::shared_ptr< HullWhiteForwardProcess > & | hullWhiteProcess, | ||
Real | corrEquityShortRate, | ||
HybridHestonHullWhiteProcess::Discretization | discretization = BSMHullWhite |
||
) |
Definition at line 30 of file hybridhestonhullwhiteprocess.cpp.
|
overridevirtual |
returns the number of dimensions of the stochastic process
Implements StochasticProcess.
Definition at line 56 of file hybridhestonhullwhiteprocess.cpp.
|
overridevirtual |
returns the initial values of the state variables
Implements StochasticProcess.
Definition at line 60 of file hybridhestonhullwhiteprocess.cpp.
returns the drift part of the equation, i.e., \( \mu(t, \mathrm{x}_t) \)
Implements StochasticProcess.
Definition at line 68 of file hybridhestonhullwhiteprocess.cpp.
returns the diffusion part of the equation, i.e. \( \sigma(t, \mathrm{x}_t) \)
Implements StochasticProcess.
Definition at line 90 of file hybridhestonhullwhiteprocess.cpp.
applies a change to the asset value. By default, it returns \( \mathrm{x} + \Delta \mathrm{x} \).
Reimplemented from StochasticProcess.
Definition at line 79 of file hybridhestonhullwhiteprocess.cpp.
returns the asset value after a time interval \( \Delta t \) according to the given discretization. By default, it returns
\[ E(\mathrm{x}_0,t_0,\Delta t) + S(\mathrm{x}_0,t_0,\Delta t) \cdot \Delta \mathrm{w} \]
where \( E \) is the expectation and \( S \) the standard deviation.
Reimplemented from StochasticProcess.
Definition at line 107 of file hybridhestonhullwhiteprocess.cpp.
DiscountFactor numeraire | ( | Time | t, |
const Array & | x | ||
) | const |
Definition at line 200 of file hybridhestonhullwhiteprocess.cpp.
const ext::shared_ptr< HestonProcess > & hestonProcess | ( | ) | const |
Definition at line 210 of file hybridhestonhullwhiteprocess.cpp.
const ext::shared_ptr< HullWhiteForwardProcess > & hullWhiteProcess | ( | ) | const |
Definition at line 215 of file hybridhestonhullwhiteprocess.cpp.
Real eta | ( | ) | const |
Definition at line 205 of file hybridhestonhullwhiteprocess.cpp.
returns the time value corresponding to the given date in the reference system of the stochastic process.
Reimplemented from StochasticProcess.
Definition at line 224 of file hybridhestonhullwhiteprocess.cpp.
Definition at line 220 of file hybridhestonhullwhiteprocess.cpp.
|
overridevirtual |
This method must be implemented in derived classes. An instance of Observer does not call this method directly: instead, it will be called by the observables the instance registered with when they need to notify any changes.
Implements Observer.
Definition at line 228 of file hybridhestonhullwhiteprocess.cpp.
|
protected |
Definition at line 71 of file hybridhestonhullwhiteprocess.hpp.
|
protected |
Definition at line 72 of file hybridhestonhullwhiteprocess.hpp.
|
protected |
Definition at line 75 of file hybridhestonhullwhiteprocess.hpp.
|
protected |
Definition at line 77 of file hybridhestonhullwhiteprocess.hpp.
|
protected |
Definition at line 78 of file hybridhestonhullwhiteprocess.hpp.
|
protected |
Definition at line 79 of file hybridhestonhullwhiteprocess.hpp.
|
protected |
Definition at line 80 of file hybridhestonhullwhiteprocess.hpp.
|
protected |
Definition at line 81 of file hybridhestonhullwhiteprocess.hpp.