QuantLib: a free/open-source library for quantitative finance
Reference manual - version 1.40
Loading...
Searching...
No Matches
G2Process Class Reference

G2 stochastic process More...

#include <ql/processes/g2process.hpp>

Inheritance diagram for G2Process:

Public Member Functions

 G2Process (Real a, Real sigma, Real b, Real eta, Real rho)
Public Member Functions inherited from StochasticProcess
virtual Size factors () const
 returns the number of independent factors of the process
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 (const Observer &)
Observeroperator= (const 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 deepUpdate ()
Public Member Functions inherited from Observable
 Observable (const Observable &)
Observableoperator= (const Observable &)
 Observable (Observable &&)=delete
Observableoperator= (Observable &&)=delete
void notifyObservers ()

StochasticProcess interface

Size size () const override
 returns the number of dimensions of the stochastic process
Array initialValues () const override
 returns the initial values of the state variables
Array drift (Time t, const Array &x) const override
 returns the drift part of the equation, i.e., \( \mu(t, \mathrm{x}_t) \)
Matrix diffusion (Time t, const Array &x) const override
 returns the diffusion part of the equation, i.e. \( \sigma(t, \mathrm{x}_t) \)
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
 StochasticProcess (ext::shared_ptr< discretization >)
ext::shared_ptr< discretizationdiscretization_

Detailed Description

G2 stochastic process

Member Function Documentation

◆ size()

Size size ( ) const
overridevirtual

returns the number of dimensions of the stochastic process

Implements StochasticProcess.

◆ initialValues()

Array initialValues ( ) const
overridevirtual

returns the initial values of the state variables

Implements StochasticProcess.

◆ drift()

Array drift ( Time t,
const Array & x ) const
overridevirtual

returns the drift part of the equation, i.e., \( \mu(t, \mathrm{x}_t) \)

Implements StochasticProcess.

◆ diffusion()

Matrix diffusion ( Time t,
const Array & x ) const
overridevirtual

returns the diffusion part of the equation, i.e. \( \sigma(t, \mathrm{x}_t) \)

Implements StochasticProcess.

◆ expectation()

Array expectation ( Time t0,
const Array & x0,
Time dt ) const
overridevirtual

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.

◆ stdDeviation()

Matrix stdDeviation ( Time t0,
const Array & x0,
Time dt ) const
overridevirtual

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.

◆ covariance()

Matrix covariance ( Time t0,
const Array & x0,
Time dt ) const
overridevirtual

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.