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

Euler discretization for stochastic processes. More...

#include <eulerdiscretization.hpp>

+ Inheritance diagram for EulerDiscretization:
+ Collaboration diagram for EulerDiscretization:

Public Member Functions

Array drift (const StochasticProcess &, Time t0, const Array &x0, Time dt) const override
 
Real drift (const StochasticProcess1D &, Time t0, Real x0, Time dt) const override
 
Matrix diffusion (const StochasticProcess &, Time t0, const Array &x0, Time dt) const override
 
Real diffusion (const StochasticProcess1D &, Time t0, Real x0, Time dt) const override
 
Matrix covariance (const StochasticProcess &, Time t0, const Array &x0, Time dt) const override
 
Real variance (const StochasticProcess1D &, Time t0, Real x0, Time dt) const override
 
- Public Member Functions inherited from StochasticProcess::discretization
virtual ~discretization ()=default
 
virtual Array drift (const StochasticProcess &, Time t0, const Array &x0, Time dt) const =0
 
virtual Matrix diffusion (const StochasticProcess &, Time t0, const Array &x0, Time dt) const =0
 
virtual Matrix covariance (const StochasticProcess &, Time t0, const Array &x0, Time dt) const =0
 
- Public Member Functions inherited from StochasticProcess1D::discretization
virtual ~discretization ()=default
 
virtual Real drift (const StochasticProcess1D &, Time t0, Real x0, Time dt) const =0
 
virtual Real diffusion (const StochasticProcess1D &, Time t0, Real x0, Time dt) const =0
 
virtual Real variance (const StochasticProcess1D &, Time t0, Real x0, Time dt) const =0
 

Detailed Description

Euler discretization for stochastic processes.

Definition at line 33 of file eulerdiscretization.hpp.

Member Function Documentation

◆ drift() [1/2]

Array drift ( const StochasticProcess process,
Time  t0,
const Array x0,
Time  dt 
) const
overridevirtual

Returns an approximation of the drift defined as \( \mu(t_0, \mathbf{x}_0) \Delta t \).

Implements StochasticProcess::discretization.

Definition at line 24 of file eulerdiscretization.cpp.

+ Here is the call graph for this function:

◆ drift() [2/2]

Real drift ( const StochasticProcess1D process,
Time  t0,
Real  x0,
Time  dt 
) const
overridevirtual

Returns an approximation of the drift defined as \( \mu(t_0, x_0) \Delta t \).

Implements StochasticProcess1D::discretization.

Definition at line 30 of file eulerdiscretization.cpp.

+ Here is the call graph for this function:

◆ diffusion() [1/2]

Matrix diffusion ( const StochasticProcess process,
Time  t0,
const Array x0,
Time  dt 
) const
overridevirtual

Returns an approximation of the diffusion defined as \( \sigma(t_0, \mathbf{x}_0) \sqrt{\Delta t} \).

Implements StochasticProcess::discretization.

Definition at line 35 of file eulerdiscretization.cpp.

+ Here is the call graph for this function:

◆ diffusion() [2/2]

Real diffusion ( const StochasticProcess1D process,
Time  t0,
Real  x0,
Time  dt 
) const
overridevirtual

Returns an approximation of the diffusion defined as \( \sigma(t_0, x_0) \sqrt{\Delta t} \).

Implements StochasticProcess1D::discretization.

Definition at line 42 of file eulerdiscretization.cpp.

+ Here is the call graph for this function:

◆ covariance()

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

Returns an approximation of the covariance defined as \( \sigma(t_0, \mathbf{x}_0)^2 \Delta t \).

Implements StochasticProcess::discretization.

Definition at line 47 of file eulerdiscretization.cpp.

+ Here is the call graph for this function:

◆ variance()

Real variance ( const StochasticProcess1D process,
Time  t0,
Real  x0,
Time  dt 
) const
overridevirtual

Returns an approximation of the variance defined as \( \sigma(t_0, x_0)^2 \Delta t \).

Implements StochasticProcess1D::discretization.

Definition at line 56 of file eulerdiscretization.cpp.

+ Here is the call graph for this function: