|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
G2 stochastic process More...
#include <g2process.hpp>
Inheritance diagram for G2Process:
Collaboration diagram for G2Process:Public Member Functions | |
| G2Process (Real a, Real sigma, Real b, Real eta, Real rho) | |
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 | evolve (Time t0, const Array &x0, Time dt, const Array &dw) const |
| virtual Array | apply (const Array &x0, const Array &dx) const |
| virtual Time | time (const Date &) 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 ()=default | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| Observable (Observable &&)=delete | |
| Observable & | operator= (Observable &&)=delete |
| virtual | ~Observable ()=default |
| void | notifyObservers () |
StochasticProcess interface | |
| Real | x0_ = 0.0 |
| Real | y0_ = 0.0 |
| Real | a_ |
| Real | sigma_ |
| Real | b_ |
| Real | eta_ |
| Real | rho_ |
| ext::shared_ptr< QuantLib::OrnsteinUhlenbeckProcess > | xProcess_ |
| ext::shared_ptr< QuantLib::OrnsteinUhlenbeckProcess > | yProcess_ |
| 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 | expectation (Time t0, const Array &x0, Time dt) const override |
| Matrix | stdDeviation (Time t0, const Array &x0, Time dt) const override |
| Matrix | covariance (Time t0, const Array &x0, Time dt) const override |
| Real | x0 () const |
| Real | y0 () const |
| Real | a () const |
| Real | sigma () const |
| Real | b () const |
| Real | eta () const |
| Real | rho () const |
Additional Inherited Members | |
Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
Protected Member Functions inherited from StochasticProcess | |
| StochasticProcess ()=default | |
| StochasticProcess (ext::shared_ptr< discretization >) | |
Protected Attributes inherited from StochasticProcess | |
| ext::shared_ptr< discretization > | discretization_ |
G2 stochastic process
Definition at line 34 of file g2process.hpp.
Definition at line 25 of file g2process.cpp.
|
overridevirtual |
returns the number of dimensions of the stochastic process
Implements StochasticProcess.
Definition at line 30 of file g2process.cpp.
|
overridevirtual |
returns the initial values of the state variables
Implements StochasticProcess.
Definition at line 34 of file g2process.cpp.
returns the drift part of the equation, i.e., \( \mu(t, \mathrm{x}_t) \)
Implements StochasticProcess.
Definition at line 38 of file g2process.cpp.
returns the diffusion part of the equation, i.e. \( \sigma(t, \mathrm{x}_t) \)
Implements StochasticProcess.
Definition at line 45 of file g2process.cpp.
returns the expectation \( E(\mathrm{x}_{t_0 + \Delta t} | \mathrm{x}_{t_0} = \mathrm{x}_0) \) of the process after a time interval \( \Delta t \) according to the given discretization. This method can be overridden in derived classes which want to hard-code a particular discretization.
Reimplemented from StochasticProcess.
Definition at line 61 of file g2process.cpp.
Here is the call graph for this function:returns the standard deviation \( S(\mathrm{x}_{t_0 + \Delta t} | \mathrm{x}_{t_0} = \mathrm{x}_0) \) of the process after a time interval \( \Delta t \) according to the given discretization. This method can be overridden in derived classes which want to hard-code a particular discretization.
Reimplemented from StochasticProcess.
Definition at line 69 of file g2process.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:returns the covariance \( V(\mathrm{x}_{t_0 + \Delta t} | \mathrm{x}_{t_0} = \mathrm{x}_0) \) of the process after a time interval \( \Delta t \) according to the given discretization. This method can be overridden in derived classes which want to hard-code a particular discretization.
Reimplemented from StochasticProcess.
Definition at line 92 of file g2process.cpp.
Here is the call graph for this function:| Real x0 | ( | ) | const |
| Real y0 | ( | ) | const |
Definition at line 102 of file g2process.cpp.
| Real a | ( | ) | const |
Definition at line 106 of file g2process.cpp.
| Real sigma | ( | ) | const |
| Real b | ( | ) | const |
Definition at line 114 of file g2process.cpp.
| Real eta | ( | ) | const |
Definition at line 118 of file g2process.cpp.
| Real rho | ( | ) | const |
Definition at line 122 of file g2process.cpp.
|
private |
Definition at line 55 of file g2process.hpp.
|
private |
Definition at line 55 of file g2process.hpp.
|
private |
Definition at line 55 of file g2process.hpp.
|
private |
Definition at line 55 of file g2process.hpp.
|
private |
Definition at line 55 of file g2process.hpp.
|
private |
Definition at line 55 of file g2process.hpp.
|
private |
Definition at line 55 of file g2process.hpp.
|
private |
Definition at line 56 of file g2process.hpp.
|
private |
Definition at line 57 of file g2process.hpp.