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.