Chapter 3. Quantifying Output Uncertainty with Monte Carlo Simulation
I of dice possess the science and in numbers thus am skilled.
—King Rituparna of the Mahabharata (circa 900 BCE), on estimating the leaves on a tree from a randomly selected branch
The importance of Monte Carlo simulation (MCS), also known as the Monte Carlo method, cannot be overstated. In finance and investing, MCS is used to value all types of assets, optimize diverse portfolios, estimate risks, and evaluate complex trading strategies. MCS is especially used to solve problems that don’t have an analytical solution.1 Indeed, there are many types of financial derivatives—such as lookback options and Asian options—that cannot be valued using any other technique. While the mathematics underpinning MCS is not simple, applying the method is actually quite easy, especially once you understand the key statistical concepts on which it is based.
MCS also pervades machine learning algorithms in general and probabilistic machine learning in particular. As discussed in Chapter 1 and demonstrated in the simulated solution to the Monte Hall problem in Chapter 2, MCS enables you to quantify the uncertainty of a model’s outputs in a process called forward propagation. It takes the traditional scenario and sensitivity analysis used by financial analysts to a completely different level.
You might be wondering how a method that uses random sampling can lead to a stable solution. Isn’t that a contradiction in terms? In a sense ...
Get Probabilistic Machine Learning for Finance and Investing 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.