Chapter 18. Simulation of Financial Models

The purpose of science is not to analyze or describe but to make useful models of the world.

Edward de Bono

Chapter 12 introduces in some detail the Monte Carlo simulation of stochastic processes using Python and NumPy. This chapter applies the basic techniques presented there to implement simulation classes as a central component of the DX package. The set of stochastic processes is restricted to three widely used ones. In particular, the chapter comprises the following sections:

“Random Number Generation”

This section develops a function to generate standard normally distributed random numbers using variance reduction techniques.1

“Generic Simulation Class”

This section develops a generic simulation class from which the other specific simulatation classes inherit fundamental attributes and methods.

“Geometric Brownian Motion”

This section is about the geometric Brownian motion (GBM) that was introduced to the option pricing literature through the seminal works of Black and Scholes (1973) and Merton (1973); it is used several times throughout this book and still represents—despite its known shortcomings and given the mounting empirical evidence against it—a benchmark process for option and derivative valuation purposes.

“Jump Diffusion”

The jump diffusion, as introduced to finance by Merton (1976), adds a log-normally distributed jump component to the GBM. This allows one to take into account that, for example, short-term out-of-the-money ...

Get Python for Finance, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.