How to Cause Diffusion
You now have an overview of how to build Brownian motion, Geometric Brownian motion, and Jump Diffusion. This section will show you how to get random numbers for the stochastic part of the simulation, and how to draw pictures in C++.
Small Random Steps, dW
C++ introduced a random number library from C++11, with a variety of statistical distributions including the Gaussian and Poisson flavors you need. You will therefore have this avaiable, without needing to install a library, if you use a current compiler—for example, anything from GCC4.8.1.[37] You can use the older rand C call instead, but this is error prone and you will likely need to resort to some tricks to get the distributions you need. The new standard C++ library ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access