Simulating a bivariate Ito process

I would like to simulate a bivariate process where the two components, say $$X_1(t)$$ and $$X_2(t),$$ which are related by the following stochastic differential equations:

dX_1(t) = -X_2(t)dt + \sigma_1dW^{(1)}(t)
and
dX_2(t) = X_1(t)dt + \sigma_2dW^{(2)}(t).


I would also like to allow the two BMs $$W^{(1)}$$ and $$W^{(2)}$$ that are correlated.

What would be the proper way to do this by defining a process using ItoProcess first and then simulating it via RandomFunction? If the coefficients were just a function of $$t$$ and not of $$X_i(t,$$ then I am able to make it work, but everytime I try to enter the process as described in the two SDEs above, I get some error message to the tone that "process" does not exist.

Any help much appreciated. I tried to make sense of what Mathematica has for explanation in the online help, but it does not seem to solve my issues.

Thank you.

Maurice

• Maybe a starting point here. Jul 8 '20 at 20:15
• I was already aware of that thread. It works fine, but as long as my drifts and diffusions are not functions of the processes involved themselves. I do believe that what I did is a modification of that, but alas, cannot get it to work in my setting. Jul 9 '20 at 1:04

One could define a process:

proc[x10_, x20_, \[Sigma]1_, \[Sigma]2_, \[Rho]_] :=
ItoProcess[{
\[DifferentialD]x1[t] == -x2[t]\[DifferentialD]t + \[Sigma]1 \[DifferentialD]Wa[t],
\[DifferentialD]x2[t] == x1[t]  \[DifferentialD]t + \[Sigma]2 (\[Rho] \[DifferentialD]Wa[t] + Sqrt[1 - \[Rho]^2] \[DifferentialD]Wb[t])},
{x1[t], x2[t]}, {{x1, x2}, {x10, x20}}, {t, 0},
{Wa \[Distributed] WienerProcess[], Wb \[Distributed] WienerProcess[]}]


and then use it:

Mean[proc[x10, x20, \[Sigma]1, \[Sigma]2, \[Rho]][t]]
(* {x10 Cos[t] - x20 Sin[t], x20 Cos[t] + x10 Sin[t]} *)


This matches the analytical result:

$$x_1(t)=-\imath\ (y_1(t)-y_2(t))$$ $$x_2(t)=y_1(t)+y_2(t)$$ $$y_1(t)=e^{-\imath\ t}\left[ y_1(0)+\frac{1}{2}\int_0^{t}\ e^{\imath\ \tau}\ \left(\imath\ \sigma_1 dW_a\ +\ \sigma_2 dW_b \right)\right]$$ $$y_2(t)=e^{\imath\ t}\left[ y_2(0)+\frac{1}{2}\int_0^{t}\ e^{-\imath\ \tau}\ \left(-\imath\ \sigma_1 dW_a\ +\ \sigma_2 dW_b \right)\right]$$

Other properties (covariance, ...) could be checked along the same lines.

• That is excellent. Thank you. Jul 9 '20 at 15:42