template class xf::fintech::StochasticProcess1D¶
#include "stochastic_process.hpp"
Overview¶
Stochastic process for CIR and ECIR models to simulate rate volatility.
Parameters:
DT | data type supported include float and double |
template <typename DT = double> class StochasticProcess1D
Methods¶
init¶
void init ( DT speed, DT vola, DT x0, DT level )
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 )
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
variance¶
DT variance ( DT t0, DT x0, DT dt )
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