QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
|
Geman-Roncoroni process class. More...
#include <gemanroncoroniprocess.hpp>
Public Member Functions | |
GemanRoncoroniProcess (Real x0, Real alpha, Real beta, Real gamma, Real delta, Real eps, Real zeta, Real d, Real k, Real tau, Real sig2, Real a, Real b, Real theta1, Real theta2, Real theta3, Real psi) | |
Real | x0 () const override |
returns the initial value of the state variable More... | |
Real | drift (Time t, Real x) const override |
returns the drift part of the equation, i.e. \( \mu(t, x_t) \) More... | |
Real | diffusion (Time t, Real x) const override |
returns the diffusion part of the equation, i.e. \( \sigma(t, x_t) \) More... | |
Real | stdDeviation (Time t0, Real x0, Time dt) const override |
Real | evolve (Time t0, Real x0, Time dt, Real dw) const override |
Real | evolve (Time t0, Real x0, Time dt, Real dw, const Array &du) const |
Public Member Functions inherited from StochasticProcess1D | |
virtual Real | expectation (Time t0, Real x0, Time dt) const |
virtual Real | variance (Time t0, Real x0, Time dt) const |
virtual Real | apply (Real x0, Real dx) const |
Public Member Functions inherited from StochasticProcess | |
~StochasticProcess () override=default | |
virtual Size | factors () const |
returns the number of independent factors of the process More... | |
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 () | |
Observable (const Observable &) | |
Observable & | operator= (const Observable &) |
Observable (Observable &&)=delete | |
Observable & | operator= (Observable &&)=delete |
virtual | ~Observable ()=default |
void | notifyObservers () |
Private Member Functions | |
virtual Array | evolve (Time t0, const Array &x0, Time dt, const Array &dw) const |
Private Attributes | |
const Real | x0_ |
const Real | alpha_ |
const Real | beta_ |
const Real | gamma_ |
const Real | delta_ |
const Real | eps_ |
const Real | zeta_ |
const Real | d_ |
const Real | k_ |
const Real | tau_ |
const Real | sig2_ |
const Real | a_ |
const Real | b_ |
const Real | theta1_ |
const Real | theta2_ |
const Real | theta3_ |
const Real | psi_ |
ext::shared_ptr< PseudoRandom::urng_type > | urng_ |
Additional Inherited Members | |
Public Types inherited from Observer | |
typedef set_type::iterator | iterator |
Protected Member Functions inherited from StochasticProcess1D | |
StochasticProcess1D ()=default | |
StochasticProcess1D (ext::shared_ptr< discretization >) | |
Protected Member Functions inherited from StochasticProcess | |
StochasticProcess ()=default | |
StochasticProcess (ext::shared_ptr< discretization >) | |
Protected Attributes inherited from StochasticProcess1D | |
ext::shared_ptr< discretization > | discretization_ |
Protected Attributes inherited from StochasticProcess | |
ext::shared_ptr< discretization > | discretization_ |
Geman-Roncoroni process class.
This class describes the Geman-Roncoroni process governed by
\[ \begin{array}{rcl} dE(t) &=& \left[ \frac{\partial}{\partial t} \mu(t) +\theta_1 \left(\mu(t)-E(t^-)\right)\right]dt +\sigma dW(t) + h(E(t^-))dJ(t) \\ \mu(t)&=& \alpha + \beta t +\gamma \cos(\epsilon+2\pi t) +\delta \cos(\zeta + 4\pi t) \end{array} \]
Definition at line 46 of file gemanroncoroniprocess.hpp.
GemanRoncoroniProcess | ( | Real | x0, |
Real | alpha, | ||
Real | beta, | ||
Real | gamma, | ||
Real | delta, | ||
Real | eps, | ||
Real | zeta, | ||
Real | d, | ||
Real | k, | ||
Real | tau, | ||
Real | sig2, | ||
Real | a, | ||
Real | b, | ||
Real | theta1, | ||
Real | theta2, | ||
Real | theta3, | ||
Real | psi | ||
) |
Definition at line 31 of file gemanroncoroniprocess.cpp.
|
overridevirtual |
returns the initial value of the state variable
Implements StochasticProcess1D.
Definition at line 52 of file gemanroncoroniprocess.cpp.
returns the drift part of the equation, i.e. \( \mu(t, x_t) \)
Implements StochasticProcess1D.
Definition at line 56 of file gemanroncoroniprocess.cpp.
returns the diffusion part of the equation, i.e. \( \sigma(t, x_t) \)
Implements StochasticProcess1D.
Definition at line 65 of file gemanroncoroniprocess.cpp.
returns the standard deviation \( S(x_{t_0 + \Delta t} | x_{t_0} = 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 StochasticProcess1D.
Definition at line 69 of file gemanroncoroniprocess.cpp.
returns the asset value after a time interval \( \Delta t \) according to the given discretization. By default, it returns
\[ E(x_0,t_0,\Delta t) + S(x_0,t_0,\Delta t) \cdot \Delta w \]
where \( E \) is the expectation and \( S \) the standard deviation.
Reimplemented from StochasticProcess1D.
Definition at line 75 of file gemanroncoroniprocess.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 StochasticProcess1D.
Definition at line 123 of file stochasticprocess.cpp.
|
private |
Definition at line 69 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 70 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 70 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 70 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 70 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 71 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 71 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 71 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 72 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 72 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 73 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 73 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 73 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 74 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 74 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 74 of file gemanroncoroniprocess.hpp.
|
private |
Definition at line 75 of file gemanroncoroniprocess.hpp.
|
mutableprivate |
Definition at line 76 of file gemanroncoroniprocess.hpp.