Advertisement
Guest User

Untitled

a guest
Mar 30th, 2015
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. T = 10;
  2. n = 1000;
  3. dt = T/n;
  4. lambda = 5;
  5. dw = RandomVariate[NormalDistribution[0, Sqrt[dt]], n];
  6. dJ = Table[
  7. If[RandomVariate[BernoulliDistribution[lambda dt]] == 0, 0,
  8. RandomVariate[NormalDistribution[]]], {i, 1, n}];
  9. dX = dw + dJ;
  10. BrownianJumpPath = Accumulate[Prepend[dX, 0]];
  11. ListLinePlot[BrownianJumpPath, Frame -> True]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement