O'Reilly logo

Genetic Algorithms and Machine Learning for Programmers by Frances Buontempo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Did It Work?

You now have three Monte Carlo simulations of Brownian motion. The first gradually moves some particles out of the bag. They start in the middle and gradually disperse as the figures show. They will either bump into the sides or breakthrough depending on the value you used for breakout. If they are allowed through the sides, some will sneak back in again from time to time. Because they stop moving when they get above the bag, you will end up with a line near the top of the window, as shown in the figure on the right:

images/Diffuse/DiffuseSideBySide.png

The stock price simulation has many more parameters. A simulation with time steps of 0.01, a drift of 0.2 (yes, a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required