CIRProcess.CIR2.a C# (CSharp) Method

a() public method

This function defines the drift in the Cox-Ingersoll-Ross Two factors Markov process. The formula to calculate the A component is A[0] = k1 * (theta1 - previous state) A[1] = k2 * (theta2 - previous state).
public a ( int i, double x, double a ) : void
i int The parameter is not used.
x double The state vector at the previous state.
a double The output of the function.
return void
        public void a(int i, double* x, double* a)
        {
            a[0] = this.k1.fV() * (this.theta1.fV() - x[0]);
            a[1] = this.k2.fV() * (this.theta2.fV() - x[1]);
        }