LearnFinance
← Quantitative Finance Lesson 4 of 6 · 15 min · +50 XP
Quantitative Finance · Lesson 04

Monte Carlo simulation: pricing and planning with thousands of random futures

When the maths gets too hard to solve, simulate it. Monte Carlo turns one shaky forecast into thousands of possible futures, and shows how often a plan actually works. The recipe and its error, worked step by step; simulating a SIP with a calculator; where Monte Carlo is used and where it misleads; and how Stanislaw Ulam's 1946 idea at Los Alamos, published with Nicholas Metropolis in 1949, gave the method its name, after the casino in Monaco.

Facts reviewed Oct 2026

A financial plan says your SIP will grow to ₹1.7 crore in 20 years, at an “expected” 11%. That number is almost certainly wrong. Not because 11% is a bad guess for the average, but because markets don’t deliver averages in a straight line. Some decades start with a crash. Some end with one.

A single projection hides the only question that matters. Across all the futures that could plausibly happen, how often does the plan work?

Monte Carlo simulation answers it by brute force. Generate thousands of random futures, run the plan through each, and look at the spread of results.

The idea

Every Monte Carlo simulation follows the same recipe:

  1. Build a model of the uncertain inputs. For example: “yearly returns are random, averaging 11%, with 18% volatility”.
  2. Draw random values for those inputs, using a random-number generator.
  3. Work out the outcome for that draw: the final corpus, the option payoff, or the portfolio loss.
  4. Repeat thousands of times.
  5. Summarise the results: the median, the bad cases, and the chance of hitting a target.

The law of large numbers means the averages settle down as the number of simulations grows. The error shrinks with the square root of the count. So four times as many simulations halves the error.

Worked example. A simulation of a retirement corpus gives outcomes with a standard deviation of ₹60 lakh.

  1. With 1,000 runs: the error in the average is about 60 ÷ √1,000 ≈ ₹1.9 lakh.
  2. With 4,000 runs: 60 ÷ √4,000 ≈ ₹0.95 lakh, half as much.
  3. With 16,000 runs: about ₹0.47 lakh. Each halving costs four times the computing.

Simulating a SIP

The calculator below simulates a monthly SIP, with random yearly returns. They’re drawn from a lognormal distribution, with your chosen average and volatility. It sorts the outcomes from worst to best. It uses a fixed random seed, so the same inputs always give the same answer.

A thousand possible futures for one SIP
Plain projection (average return, every year)
₹1.71 Cr
Median simulated outcome
₹1.39 Cr
Bad case (10th percentile)
₹68.29 L
Good case (90th percentile)
₹3.09 Cr
Chance of reaching the target
45%
Simulated outcomeTarget

Contributions are added at the start of each year (12 × the SIP) and each year's return is drawn independently. Real markets have fat tails and streaks, so the bad cases here are, if anything, optimistic.

Three lessons appear immediately:

  1. The median is below the plain projection. Volatility drags compound growth below the average return, the effect from The Maths of Money. The “expected” ₹1.7 crore is closer to a good outcome than a typical one.
  2. The range is enormous. On the defaults, the 90th-percentile outcome is more than four times the 10th-percentile one after 20 years. A plan built on one number ignores most of what can happen.
  3. Probability beats precision. “There’s roughly a 45% chance of reaching ₹1.5 crore” is far more useful than “you’ll have ₹1.7 crore”. It tells you whether to save more, take more risk, or move the target.
Quick check

You sort 1,000 simulated outcomes from worst to best. Which one is the 10th percentile, a common 'bad case'?

Where Monte Carlo is used

  • Retirement and goal planning: planners report a plan’s “probability of success”, not a single projected corpus.
  • Option pricing: for options that depend on the path, such as averages or barriers, or on many assets, simulation is often the only practical method. It averages discounted payoffs over risk-neutral paths.
  • Risk management: Monte Carlo VaR revalues a complex portfolio under thousands of simulated market moves. Credit models simulate linked defaults across a loan book.
  • Corporate finance: project valuations simulate uncertain prices, volumes and costs, to see the range of NPVs, not just one.

Garbage in, garbage out

A simulation looks impressively scientific, but it can’t be better than its model. The common weak points:

  • Distribution: assuming normal or lognormal returns understates crashes.
  • Independence: assuming each year is independent ignores streaks and lasting changes.
  • Parameters: the average return and volatility are themselves guesses. Changing the average return by one or two points often moves the answer more than anything else.
  • Correlations: in a crisis, assets that normally diversify each other fall together.

A real case: the birth of Monte Carlo, 1946–1949

  • 1946, Los Alamos: the mathematician Stanislaw Ulam, recovering from an illness, wondered about the chances of winning a game of solitaire. Working them out by logic was hopeless. Playing many games and counting wins seemed easier.
  • The leap: Ulam saw that the same trick could solve hard physics problems, such as how neutrons travel through material. With John von Neumann and others, he turned it into a method, run on early electronic computers.
  • The name: a code name from the Monte Carlo casino in Monaco, where Ulam’s uncle liked to gamble. Nicholas Metropolis later said he suggested it.
  • September 1949: Metropolis and Ulam published “The Monte Carlo Method” in the Journal of the American Statistical Association.

Worked example: estimating π by random points. Scatter 10,000 random points in a square of side 1. Count how many land inside a quarter circle of radius 1.

  1. The true share inside is the quarter circle’s area: π ÷ 4 ≈ 0.785.
  2. Suppose 7,850 points land inside: the estimate is 4 × 0.785 = 3.14.
  3. The error: about √(0.785 × 0.215 ÷ 10,000) × 4 ≈ ±0.016. For 10 times the precision, you’d need 100 times as many points.

The lessons:

  • Random sampling can answer questions that maths can’t solve directly.
  • Precision grows slowly, with the square root of the number of runs.
  • Computers made it practical: the method arrived with the first electronic computers.

Going further: why randomness isn’t really random. Computers can’t produce true randomness. They use formulas that create “pseudo-random” numbers, which look random but follow fixed rules from a starting “seed”. That’s useful: the same seed gives the same results, so a simulation can be checked and repeated, as the calculator above does. It also means a poor generator can give biased results. Modern finance uses well-tested generators. Some also use “quasi-random” sequences, which spread points more evenly, and converge faster than pure random sampling.

Common mistakes

  • Treating a projection at the average return as typical.
  • Running too few simulations for a stable answer.
  • Trusting normal returns that understate crashes.
  • Reading probabilities as precise when inputs are guesses.
  • Forgetting correlations rise in a crisis.
Practice 1: Set volatility to 0%. What happens, and why?
  1. All 1,000 simulated futures become identical. The median, bad case and good case all equal the plain projection.
  2. With no randomness, a simulation is just the fixed formula.
  3. Volatility is what turns one answer into a distribution, and drags the median below the average.
Practice 2: Simulated outcomes have a standard deviation of ₹80 lakh. How many runs give an error in the average of about ₹0.8 lakh?
  1. The rule: error = standard deviation ÷ √runs.
  2. Solve: √runs = 80 ÷ 0.8 = 100.
  3. Runs: 100² = 10,000.

Key takeaways

  • Monte Carlo replaces one forecast with thousands of random futures and summarises their spread.
  • Its accuracy improves with the square root of the number of simulations: four times as many halves the error.
  • For volatile investments, the median outcome sits below the plain projection, and the range of outcomes is wide.
  • It’s used for goal planning, path-dependent option pricing, VaR, and credit-loss modelling.
  • Results are only as good as the model and its inputs; use simulations mainly to compare decisions.
  • Stanislaw Ulam’s 1946 idea at Los Alamos, published with Metropolis in 1949, gave the method its casino name.

Go deeper

Complete this lesson
Pass the quiz below (60% or more) to earn +50 XP and unlock the next lesson.
Quiz not passed yet
🧠

Quiz: Monte Carlo simulation

5 questions · pass 60% to complete