Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- T = 10;
- n = 1000;
- dt = T/n;
- lambda = 5;
- dw = RandomVariate[NormalDistribution[0, Sqrt[dt]], n];
- dJ = Table[
- If[RandomVariate[BernoulliDistribution[lambda dt]] == 0, 0,
- RandomVariate[NormalDistribution[]]], {i, 1, n}];
- dX = dw + dJ;
- BrownianJumpPath = Accumulate[Prepend[dX, 0]];
- ListLinePlot[BrownianJumpPath, Frame -> True]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement