Monte Carlo Simulation Theory and Applications in Python

Andrea Chello
The Quant Journey
Published in
5 min readApr 23, 2022

--

Histogram of Monte Carlo Simulation Results

The Monte Carlo Simulation is a numerical analysis technique aimed at estimating the possible outcomes of a certain random event. It is a very powerful method of evaluating integrals where there are no known solutions.

The main idea behind this simulation is that the results are computed based on repeated random sampling and statistical analysis. The technique relies on random sampling, the Law of Large Numbers and the Central Limit Theorem.

1. Monte Carlo Approximation

Suppose we wanted to evaluate the integral:

over the domain set 𝐴

We can do so using two different points of view.

a. Using Expectation

We can express this integral as:

Where,

  • 𝑋 is a random variable with a probability density function given by ℎ(𝑥)
  • 𝐸[𝑔(𝑋);𝐴] represents the expected value of 𝑔(𝑥) over the set 𝐴

This means we can re-express the integral as an expectation of a function of a random variable over a given set

Suppose we have i.i.d. random variables 𝑋1,𝑋2,… with:

--

--

The Quant Journey
The Quant Journey

Published in The Quant Journey

This is a repository of information regarding everything quantitative. I am building my knowledge as I go, therefore this is a journey for both me as a contributor and you as a reader as we venture in to the world of mathematics, programming, statistics, finance and business.

Andrea Chello
Andrea Chello

Written by Andrea Chello

Quant | Full-Stack Blockchain Developer

No responses yet