QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
GemanRoncoroniProcess Class Reference

Geman-Roncoroni process class. More...

#include <gemanroncoroniprocess.hpp>

+ Inheritance diagram for GemanRoncoroniProcess:
+ Collaboration diagram for GemanRoncoroniProcess:

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 &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (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 &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (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_typeurng_
 

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< discretizationdiscretization_
 
- Protected Attributes inherited from StochasticProcess
ext::shared_ptr< discretizationdiscretization_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GemanRoncoroniProcess()

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.

Member Function Documentation

◆ x0()

Real x0 ( ) const
overridevirtual

returns the initial value of the state variable

Implements StochasticProcess1D.

Definition at line 52 of file gemanroncoroniprocess.cpp.

+ Here is the caller graph for this function:

◆ drift()

Real drift ( Time  t,
Real  x 
) const
overridevirtual

returns the drift part of the equation, i.e. \( \mu(t, x_t) \)

Implements StochasticProcess1D.

Definition at line 56 of file gemanroncoroniprocess.cpp.

◆ diffusion()

Real diffusion ( Time  t,
Real  x 
) const
overridevirtual

returns the diffusion part of the equation, i.e. \( \sigma(t, x_t) \)

Implements StochasticProcess1D.

Definition at line 65 of file gemanroncoroniprocess.cpp.

+ Here is the call graph for this function:

◆ stdDeviation()

Real stdDeviation ( Time  t0,
Real  x0,
Time  dt 
) const
overridevirtual

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.

+ Here is the call graph for this function:

◆ evolve() [1/3]

Real evolve ( Time  t0,
Real  x0,
Time  dt,
Real  dw 
) const
overridevirtual

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.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ evolve() [2/3]

Real evolve ( Time  t0,
Real  x0,
Time  dt,
Real  dw,
const Array du 
) const

Definition at line 89 of file gemanroncoroniprocess.cpp.

+ Here is the call graph for this function:

◆ evolve() [3/3]

Array evolve ( Time  t0,
const Array x0,
Time  dt,
const Array dw 
) const
privatevirtual

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.

Member Data Documentation

◆ x0_

const Real x0_
private

Definition at line 69 of file gemanroncoroniprocess.hpp.

◆ alpha_

const Real alpha_
private

Definition at line 70 of file gemanroncoroniprocess.hpp.

◆ beta_

const Real beta_
private

Definition at line 70 of file gemanroncoroniprocess.hpp.

◆ gamma_

const Real gamma_
private

Definition at line 70 of file gemanroncoroniprocess.hpp.

◆ delta_

const Real delta_
private

Definition at line 70 of file gemanroncoroniprocess.hpp.

◆ eps_

const Real eps_
private

Definition at line 71 of file gemanroncoroniprocess.hpp.

◆ zeta_

const Real zeta_
private

Definition at line 71 of file gemanroncoroniprocess.hpp.

◆ d_

const Real d_
private

Definition at line 71 of file gemanroncoroniprocess.hpp.

◆ k_

const Real k_
private

Definition at line 72 of file gemanroncoroniprocess.hpp.

◆ tau_

const Real tau_
private

Definition at line 72 of file gemanroncoroniprocess.hpp.

◆ sig2_

const Real sig2_
private

Definition at line 73 of file gemanroncoroniprocess.hpp.

◆ a_

const Real a_
private

Definition at line 73 of file gemanroncoroniprocess.hpp.

◆ b_

const Real b_
private

Definition at line 73 of file gemanroncoroniprocess.hpp.

◆ theta1_

const Real theta1_
private

Definition at line 74 of file gemanroncoroniprocess.hpp.

◆ theta2_

const Real theta2_
private

Definition at line 74 of file gemanroncoroniprocess.hpp.

◆ theta3_

const Real theta3_
private

Definition at line 74 of file gemanroncoroniprocess.hpp.

◆ psi_

const Real psi_
private

Definition at line 75 of file gemanroncoroniprocess.hpp.

◆ urng_

ext::shared_ptr<PseudoRandom::urng_type> urng_
mutableprivate

Definition at line 76 of file gemanroncoroniprocess.hpp.