template class xf::fintech::OrnsteinUhlenbeckProcess

#include "ornstein_uhlenbeck_process.hpp"

Overview

Ornstein-Uhlenbeck Process is one of the basic stochastic processes. This class describes the Ornstein-Uhlenbeck process.

Parameters:

DT The data type, which decides the precision of the result, and the default data type is double.
_x0 The initial value of the state variable.
template <typename DT = double>
class OrnsteinUhlenbeckProcess

// fields

DT _x0

Methods

init

void init (
    DT speed,
    DT vola,
    DT x0,
    DT level = 0.0
    )

Initialize parameters.

Parameters:

speed Spreads on interest rates.
vola The overall level of volatility.
x0 The initial value of the state variable.
level The initial value of level.

expectation

DT expectation (
    DT t0,
    DT x0,
    DT dt
    ) const

The expertation E of the process.

Parameters:

t0 the time at the beginning of processing
x0 the state of current value
dt the step of processing

Returns:

the result of expectation

stdDeviation

DT stdDeviation (
    DT t0,
    DT x0,
    DT dt
    ) const

The standard deviation S of the process.

Parameters:

t0 the time at the beginning of processing
x0 the state of current value
dt the step of processing

Returns:

the result of standard deviation

variance

DT variance (
    DT t0,
    DT x0,
    DT dt
    ) const

The variance of the process.

Parameters:

t0 the time at the beginning of processing
x0 the state of current value
dt the step of processing

Returns:

the result of variance

evolve

DT evolve (
    DT dt,
    DT dw
    ) const

As this process will only be executed for once in the prcing engine and it is not the critical time consumer,then it is optimized for minimum resource utilization while having a reasonable latency.

Parameters:

dt the step of processing
dw the step of evoleing

Returns:

Returns the asset value after a time interval Δt according to the given discretization.