1
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ Maybe a starting point here. $\endgroup$ – b.gates.you.know.what Jul 8 at 20:15
  • $\begingroup$ 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. $\endgroup$ – Maurice Jul 9 at 1:04
1
$\begingroup$

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.

| improve this answer | |
$\endgroup$
  • $\begingroup$ That is excellent. Thank you. $\endgroup$ – Maurice Jul 9 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.