1
$\begingroup$

I am trying to model geometric Brownian motion using ItoProcess. I am not sure why I am getting negative values in the output.

I am not using GeometricBrownianMotionProcess because I want to model other SDE also.

I am not able to figure out the problem with my code.

r = 33;
s = 8;
sde = 
  ItoProcess[
    \[DifferentialD]z[t] == 
      r z[t] \[DifferentialD]t + s z[t] \[DifferentialD]w[t], 
    z[t], {z, 0.01}, t, w \[Distributed] WienerProcess[]];

sol = RandomFunction[sde, {0, 10, 0.01}];

ListLinePlot[sol, Filling -> Axis]

enter image description here

$\endgroup$
  • 1
    $\begingroup$ PDF[sde[t]] and similar look fine. It's possibly a numerical issue due to the huge rate of return you are using, 3300%. $\endgroup$ – b.gates.you.know.what Sep 12 at 9:17
  • 1
    $\begingroup$ ^ also the s is really high. Try r = .33; s = 0.1; instead and it looks more reasonable. $\endgroup$ – flinty Sep 12 at 11:44
  • $\begingroup$ ^^ thanks! For reasonable values of r and s it is working fine. $\endgroup$ – S_R Sep 12 at 12:55