Hello Ruben
Here is the code that should be working - it runs on my side....
In[1]:= cW[\[Rho]_] :=
Refine[ItoProcess[{{0, 0}, IdentityMatrix[2]}, {{n1, n2}, {0, 0}},
t, {{1, \[Rho]}, {\[Rho], 1}}], -1 < \[Rho] < 1];
In[2]:= combprc =
ItoProcess[{\[DifferentialD]s[
t] == \[Mu] s[t] \[DifferentialD]t + \[Sigma]1*
s[t] \[DifferentialD]n1[t], \[DifferentialD]c[
t] == \[Theta] (\[Beta] - c[t]) \[DifferentialD]t + \[Sigma]2*
Sqrt[Abs[c[t]]] \[DifferentialD]n2[t]
}, {s[t], c[t]}, {{s, c}, {s0, c0}},
t, {n1, n2} \[Distributed] cW[\[Rho]]];
In[3]:= {dt, y, R} = {0.005, 5, 0.4};
In[4]:= simproc =
RandomFunction[
combprc /. {\[Mu] -> 0.022, \[Sigma]1 -> 0.2, \[Theta] ->
0.005, \[Beta] -> 0.015, \[Sigma]2 -> 0.05, \[Rho] -> 0.5,
s0 -> 0.025, c0 -> 0.0125}, {0, y, dt}, 1000,
Method -> "StochasticRungeKutta"] ;
In[5]:= swapproc = simproc["PathComponent", 1];
cdsproc = simproc["PathComponent", 2];
hazrate = TimeSeriesMap[#/(1 - R) &, cdsproc];
ListLinePlot[swapproc["Path", Range[10]],
PlotLabel -> "Swap rate process"]
ListLinePlot[hazrate["Path", Range[15]],
PlotLabel -> "Hazard rate process", PlotRange -> All]
If it does not, please let me know.
Kind regards
Igor