Over to You

You built three simulations in this chapter, used two different statistical distributions, drew pictures in C++, and briefly looked at property-based testing. The models you simulated used stochastic differential equations—equations with a random element. They were a special type of random walk known as Markov processes; the next step depends on the current state only. You built a discrete simulation of these by finding values at specific time intervals.

Think about some other property-based tests for your code. Look at unit tests in a project you are working on—can you see any magic numbers? Try property-based testing on that code and see what happens.

Try out some different models. Your stock prices tend to go up over time. ...

Get Genetic Algorithms and Machine Learning for Programmers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.