2
$\begingroup$

I would like to simulate two processes, Ito Process "A" and Ito Process "B". What I need is to have only one path of process "B" but many paths of process "A" - however, I need all these paths of process "A" to be generated using the diffusion term that generated the single path of process "B". To clarify, say I have the following two stochastic differential equations that describe, respectively, process "A" and "B": \begin{equation} \begin{aligned} da_t &=\mu_1a_tdt+a_t \left(\sigma_1dZ_t+\sigma_2dW_t\right)\\ db_t &=\mu_2b_tdt+\sigma_3dZ_t \end{aligned} \end{equation} where $Z_t,W_t$ are standard Brownian motions (Wiener processes). I would therefore first like to sample one path of the process driven by the second equation and then (or possibly at the same time) sample many paths of the process driven by the first equation using the same (realized) path of $Z_t$. The difference among these paths would then come only from $W_t$. Is there an easy way to do this? I tried the following, that does allow me to use the same $Z_t$ for both processes "A" and "B" but obviously I need new path of "B" to get a new path of "A".

proc=ItoProcess[{\[DifferentialD]a[t]==\[Mu]1 a[t]\[DifferentialD]t+a[t](\[Sigma]1 \[DifferentialD]Z[t]+\[Sigma]2 \[DifferentialD]W[t]),\[DifferentialD]b[t]==\[Mu]2 b[t]\[DifferentialD]t+\[Sigma]3 \[DifferentialD]Z[t]},{a[t],b[t]},{{a,b},{1,1}},{t,0},{W\[Distributed]WienerProcess[],Z\[Distributed]WienerProcess[]}]
ItoProcess[{{\[Mu]1 a[t],\[Mu]2 b[t]},{{\[Sigma]2 a[t],\[Sigma]1 a[t]},{0,\[Sigma]3}},{a[t],b[t]}},{{a,b},{1,1}},{t,0}]

One possible way I can think of would be to generate a path of $Z_t$ first, recover the values, and then manually feed them to both processes but I am not sure whether that would work well within ItoProcess and RandomFunction.

$\endgroup$
2
$\begingroup$

For future refence: I managed to solve the issue by simply defining an ItoProcess proc in such a way that it contains the process with the common component, that is, the $b_t$ process in this case, and then a number of (indexed) functions $a_t^i$, where $i \in \left\{1,2,\ldots,N\right\}$, and $N$ is the originally desired number of simulations of the $a_t$ process. Then one has to use RandomFunction so that it only samples one path. The process is therefore defined as:

proc=ItoProcess[Prepend[Table[
\[DifferentialD]y[i][t]==y[i][t]\[DifferentialD]t+y[i][t]*(0.2*\[DifferentialD]z[i][t]+0.3*\[DifferentialD]w[t]),{i,1,5}],\[DifferentialD]x[t]==x[t]\[DifferentialD]t+0.5*x[t]\[DifferentialD]w[t]],Prepend[Table[y[i][t],{i,1,5}],x[t]],{Prepend[Table[y[i],{i,1,5}],x],Table[1,{i,6}]},t,Prepend[Table[z[i]\[Distributed]WienerProcess[],{i,5}],w\[Distributed]WienerProcess[]]]
$\endgroup$
1
$\begingroup$

You could define the process as

    procG = ItoProcess[{\[DifferentialD]a[
       t] == μ1 a[t] \[DifferentialD]t + 
      a[t] (σ1 \[DifferentialD]z[
            t] + σ2 \[DifferentialD]w[t]), \[DifferentialD]b[
       t] == μ2 b[
        t] \[DifferentialD]t + σ3 \[DifferentialD]z[t]}, {a[
     t], b[t], z[t]}, {{a, b}, {a0, b0}}, {t, 
    0}, {z \[Distributed] WienerProcess[], 
    w \[Distributed] WienerProcess[]}];

In the setup above the process will return all {a[t], b[t], z[t]}.

You can check the statistical properties as:

Mean[procG[t]]
(* {a0 E^(t μ1), b0 E^(t μ2), 0} *)

Variance[procG[t]]
(* {-a0^2 (E^(2 t μ1) - E^(t (2 μ1 + σ1^2 + σ2^2))), 
    ((-1 + E^(2 t μ2)) σ3^2)/(2 μ2), 
    t} *)

You can run simulations provided you give numerical values to the parameters:

Block[{a0 = 1., b0 = 2., μ1 = 0.1, μ2 = 0.2, σ1 = 0.3, σ2 = 0.4, σ3 = 0.5},
RandomFunction[procG, {0, 1, 0.5}, 10]["Paths"]]
$\endgroup$
  • $\begingroup$ But this essentially does the same as what my code does, doesn't it? The only difference is that I can explicitly see the path of $Z_t$. Maybe I did not clarify what I want properly: I need one path of $Z_t$, one resulting path of $b_t$, and then using the one path of $Z_t$ simulate $a_t$ many times. $\endgroup$ – Skumin Mar 17 '16 at 21:51

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.