# Stochastic Process¶

## Overview¶

Stochastic process uses the Random Number Generator(RNG). It uses a given point \((t,x)\) and a time step \(\Delta t\) to calculate the expectation and variance. The class StochasticProcess1D is 1-dimensional stochastic process, and it cooperates with Cox-Ingersoll-Ross and Extended Cox-Ingersoll-Ross Models. The stochastic process can be described as

## Implementation¶

The implementation of StochasticProcess1D is comprised by a few methods. The implementation is introduced as follows:

init: Initialization function used to set up the arguments as below:

a)speed, the spreads on interest rates;

b)vola, the overall level of volatility;

c)x0, the initial value of level;

d)level, the width of fluctuation on interest rates.

expectation: The expectation method returns the expectation of the process at time \(E(x_{t_{0}+\Delta t}|x_{t_{0}}=x_{0})\).

variance: The variance method returns the variance \(V(x_{t_{0}+\Delta t}|x_{t_{0}}=x_{0})\) of the process during a time interval \(\Delta t\) according to the given volatility.