Skip to content
In academic affiliation with Carnegie Mellon University
Institute of Algorithmic Tradingand Applied Computational Finance

Open course in quantitative foundations

Monte Carlo Simulation, From First Principles

What is a Monte Carlo simulation? A free course that builds one from first principles: random numbers, the law of large numbers, simulated price paths and their error bars.

What is a Monte Carlo simulation? It answers a question about averages by generating many random scenarios and averaging over them. If you cannot work out the expected payoff of an option with a formula, you can simulate ten thousand price paths, compute the payoff on each and take the mean. The law of large numbers says the answer converges; the central limit theorem says how fast.

Why learn Monte Carlo from first principles?

Because most mistakes with simulation come from treating it as a black box: too few paths, no error bars, a discretisation that biases the result. Building it from random numbers up makes each of those mistakes visible.

Who should take this course?

Anyone starting in quantitative finance, and anyone who has run a simulation in a spreadsheet or library and wants to know what it is doing. All code is in Python and runs in a browser notebook.

What you will be able to do

  • Explain why averaging random draws estimates an expectation, and how fast the error shrinks.
  • Simulate geometric Brownian motion price paths in Python.
  • Price a European option by simulation and check it against the closed form.
  • Report a simulation result with a confidence interval rather than a single number.

Syllabus, module by module

  1. Random numbers and expectations

    Pseudo-random generators, sampling from distributions and why the sample mean converges to the expectation.

  2. Simulating prices

    Geometric Brownian motion, discretising a path and the difference between simulating returns and simulating prices.

  3. Pricing and risk by simulation

    A European call priced by simulation, a simple value-at-risk estimate, and standard errors for both.

  4. Making it efficient

    Antithetic variates and control variates: two variance reduction methods that cut run time without changing the answer.

How the certificate is earned

Open courses are not assessed. Each lesson ends with a short notebook exercise and a worked solution. Completing every lesson earns a Certificate of attendance, which states that the course is not assessed. Read how certification works.

Before you start

Basic Python, meaning variables, loops and functions, and some familiarity with averages and standard deviations.

Questions applicants ask

What is Monte Carlo simulation used for in finance?

Pricing derivatives that have no closed-form formula, estimating portfolio risk, and stress-testing strategies against many possible futures.

Why is it called Monte Carlo?

The name was given at Los Alamos in the 1940s by the group around Stanislaw Ulam, John von Neumann and Nicholas Metropolis, after the casino in Monaco, because the method relies on chance.

Free 3 hours