Chapter 28. Simulation of Financial Models
Pricing models need simulated scenarios before they can produce values and risk measures. This chapter focuses on simulation: how to generate random numbers, how to build time grids, and how to implement reusable model simulators for a small “process zoo” that you can later plug into valuation routines. The emphasis is on code that is explicit, testable, and easy to extend, not on extracting every last bit of performance.
This chapter extends dxlib with the core simulation layer. You implement reproducible
standard normal random number generation with numpy, simple variance reduction,
uniform time grids, simulation models for geometric Brownian motion, jump diffusion, and
the Heston stochastic volatility model, and a compact CIR short-rate simulator as an
extension point for stochastic-rate experiments. The examples assume a working Python
environment with numpy and Matplotlib, plus the dxlib foundation modules from
Chapter 27.
Simulation as an ...
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