Skip to content
Finance Lessons

Monte Carlo in Finance

What Monte Carlo Is

Why quants replace impossible math with brute-force randomness: the law of large numbers, random sampling, estimating pi by throwing darts, and why the average of many simulations converges to the true answer.

9 min Updated Jun 5, 2026

So far on this platform you’ve lived in the closed-form world: plug your numbers into a formula, turn the crank, out pops the answer. Black-Scholes hands you an option price. The normal distribution hands you a VaR via a z-score. Portfolio variance is a tidy matrix product. Clean, exact, instant. The trouble is that the real world keeps asking questions that have no such formula — and for those, all your elegant algebra just shrugs.

Monte Carlo is the method that shrugs back and says: fine, I’ll do it the dumb way. If I can’t solve the integral, I’ll estimate it by generating thousands of random scenarios, measuring the thing I care about in each one, and averaging. It’s brute force dressed up in probability theory, and it is one of the most important tools in all of quantitative finance precisely because it doesn’t care how ugly your problem is. Named after the Monaco casino — because at its heart it’s just rolling dice, very deliberately, a great many times.

Before you read — take a guess

What is the core idea of a Monte Carlo simulation?

When there’s no formula, roll the dice

Analogy. Suppose you want the area of a weirdly-shaped lake. You could try to integrate its squiggly coastline — good luck — or you could stand at the edge and throw a thousand pebbles randomly across a known rectangle of land-plus-lake, count what fraction splashes, and multiply by the rectangle’s area. No calculus, just counting splashes. The more pebbles you throw, the better your estimate. That’s Monte Carlo in one sentence: replace a calculation you can’t do with a count you can.

Definition. A Monte Carlo simulation estimates a quantity by (1) building a model that produces random outcomes, (2) drawing many independent random samples from it, (3) computing the quantity of interest in each sample, and (4) averaging across all the samples. The estimate is the sample average; as the number of samples grows, that average homes in on the true value.

The magic isn’t really in the dice — it’s in the averaging. A single random scenario tells you almost nothing (one pebble, one splash). But the average of many random scenarios is a remarkably stable, reliable thing, and there’s a theorem that guarantees it converges to the truth.

Info:

Why 'dumb' is a superpower

Monte Carlo never demands that your problem be solvable on paper. It doesn’t care if the payoff is convex, the path matters, ten assets are correlated, or the distribution has fat tails. As long as you can simulate a scenario and measure the outcome in it, you can Monte Carlo it. The cost of that universality is compute — but compute is cheap and clever algebra is rare, so the trade is usually worth it.

The Law of Large Numbers — why averaging works

Analogy. Flip a fair coin ten times and you might get 7 heads — 70%, nowhere near the “true” 50%. Flip it ten thousand times and you’ll land within a whisker of 50% almost every time. The individual flips stay random forever, but their running average is dragged inexorably toward the true probability. Randomness in the small, near-certainty in the large.

Definition. The Law of Large Numbers (LLN) states that the sample average of independent draws from a distribution converges to the distribution’s true expected value as the number of draws grows without bound. Formally, if x1,x2,,xMx_1, x_2, \dots, x_M are independent draws of a random variable XX, then

1Mi=1Mxi    E[X]asM.\frac{1}{M}\sum_{i=1}^{M} x_i \;\longrightarrow\; E[X] \quad \text{as} \quad M \to \infty.

This is the load-bearing theorem under every Monte Carlo estimate. It promises that the answer you want — usually an expected value — is exactly the thing a big pile of random samples averages out to. You don’t compute E[X]E[X]; you approximate it by sampling and averaging, and the LLN guarantees that approximation gets better as MM grows.

Worked example. A bet pays 2 dollars if a die rolls 5 or 6, and nothing otherwise. The true expected payoff is E[X]=26×2=0.667E[X] = \frac{2}{6}\times 2 = 0.667 dollars. Roll the die 6 times and you might see payoffs of 2, 0, 0, 2, 0, 0, averaging 0.6670.667 — or you might see 0, 0, 0, 0, 2, 0, averaging 0.3330.333, badly off. Roll it 10,000 times and the average will sit around 0.660.660.670.67 virtually every time. The LLN didn’t make any single roll less random; it made the average trustworthy.

Pitfall — the gambler’s fallacy. The LLN says the average converges, not that the universe “owes” you a correction. After ten heads in a row, the eleventh flip is still 50/50 — the streak isn’t repaid by an offsetting run of tails. Convergence happens because later draws dilute early flukes, not because the dice develop a conscience.

Fill in the Law of Large Numbers.

Pick the right option for each blank, then check.

As the number of independent samples grows, the converges to the . Individual draws stay ; it is only their that becomes reliable.

Estimating π by throwing darts

Here’s the canonical demonstration — the “hello world” of Monte Carlo — that you can compute a real, exact mathematical constant using nothing but randomness and counting.

Setup. Take the unit square: xx and yy each between 0 and 1, so area 11. Inside it sits a quarter circle of radius 1, centered at the origin — the set of points with x2+y21x^2 + y^2 \le 1. The area of a full circle of radius 1 is π\pi, so a quarter of it has area π/40.785\pi/4 \approx 0.785.

The trick. Throw darts uniformly at random across the square. Each dart is a point (x,y)(x, y) with x,yx, y drawn uniformly from [0,1][0,1]. A dart lands inside the quarter circle if x2+y21x^2 + y^2 \le 1. Because the darts are spread uniformly, the fraction that land inside should match the area ratio:

darts insidetotal darts    π/41=π4.\frac{\text{darts inside}}{\text{total darts}} \;\approx\; \frac{\pi/4}{1} = \frac{\pi}{4}.

Rearrange, and you have an estimator for π\pi itself:

π    4×darts insidetotal darts.\pi \;\approx\; 4 \times \frac{\text{darts inside}}{\text{total darts}}.

Worked arithmetic. Throw 1,000 darts. Suppose 786 land inside the quarter circle. Then your estimate is π4×7861000=4×0.786=3.144\pi \approx 4 \times \frac{786}{1000} = 4 \times 0.786 = 3.144 — already within a fraction of a percent of the true 3.141593.14159\ldots, and you computed it by counting splashes, never once writing down a formula for π\pi. Throw a million darts and you’ll typically nail three or four decimal places. The chart below runs exactly this experiment live — watch the running estimate lurch around when only a few darts have landed, then get squeezed toward the true value as the sample count climbs.

Estimating π by throwing random darts
EstimateTrue value
2.63.143.611010010002000Samples
Samples0EstimateTrue value3.1416

Each dart is a tiny coin flip about geometry — inside the quarter circle, or not. One dart tells you almost nothing. Average thousands of them and the running estimate of π is squeezed toward the true value, its wobble shrinking like one over the square root of the sample count. Hit Run again to draw a fresh random batch and watch a slightly different path converge to the same answer.

Samples: 0. Estimate: .

This is the whole philosophy in miniature: we wanted π\pi (a quantity with no easy elementary derivation by hand), we couldn’t be bothered to do the geometry exactly, so we estimated it as the average of a random indicator — 1 if the dart’s inside, 0 if not — and the LLN did the rest. Inside-or-out, scaled by 4, averaged. That’s it.

In the dart experiment, 200 darts are thrown and 161 land inside the quarter circle. What is the Monte Carlo estimate of π?

Expected value, the thing Monte Carlo really computes

Step back and notice what every example above had in common: we were always estimating an average, an expected value. The bet’s expected payoff. The probability a dart lands inside (which is just the expected value of the inside-or-out indicator). This is no accident — it’s the universal shape of every Monte Carlo problem.

Definition. The expected value of a function ff of a random variable XX is, in continuous form, an integral:

E[f(X)]=f(x)p(x)dx,E[f(X)] = \int f(x)\,p(x)\,dx,

where p(x)p(x) is the probability density of XX. That integral is frequently impossible to evaluate in closed form. Monte Carlo sidesteps it entirely by drawing samples x1,,xMx_1, \dots, x_M from XX and forming the simple average:

E[f(X)]    1Mi=1Mf(xi).E[f(X)] \;\approx\; \frac{1}{M}\sum_{i=1}^{M} f(x_i).

The integral becomes a sum; the density becomes the sampling itself (you don’t weight by p(x)p(x) — you draw from pp, so common values naturally show up more often). For the darts, ff is the inside-or-out indicator and XX is the uniform point. For an option, ff will be the discounted payoff and XX the simulated terminal price. Same machine, every time: a hard integral, approximated by an easy average of a random sample.

Pitfall — Monte Carlo computes the mean, not the max. People sometimes expect a simulation to hand back “the worst case.” It doesn’t — at least not directly. The raw output is an average. If you want a tail quantity (a 99th-percentile loss, say), you must ask for that statistic of the simulated outcomes, not assume the simulation surfaces it for free. The base operation is always averaging.

Match each Monte Carlo ingredient to its role in estimating E[f(X)].

Pick a term, then click its definition.

Why finance can’t live without it

Everything you’ve learned so far worked because it lived in the small, tidy corner of finance where formulas exist. Real practice spends most of its time outside that corner. Three flavors of question that have no clean formula and so demand simulation:

  • Will my retirement savings survive? Withdraw an inflation-adjusted amount each year, while a volatile portfolio bounces around for 30 years, and ask: in what fraction of futures does the money outlast you? There is no formula for “probability of ruin” under random sequential returns — but you can simulate 10,000 thirty-year futures and count the survivors.
  • What’s a path-dependent option worth? A barrier option that dies if the price ever touches a level, or an Asian option paying off the average price over its life, depends on the entire route, not just the endpoint. Black-Scholes assumes a single endpoint and can’t see the path — so you simulate thousands of whole price paths and average the payoffs.
  • How bad is the tail of a 50-asset book? A messy, correlated, optioned portfolio with fat-tailed returns has a loss distribution no formula describes. You met this already as Monte Carlo VaR: manufacture thousands of correlated scenarios, fully reprice, read the percentile.

Worked intuition. Take the retirement case. Closed-form finance can tell you the expected ending balance — but “expected” is a cruel summary, because a 50% chance of 2Manda502M and a 50% chance of 0 averages to a comfortable-sounding $1M while hiding a coin-flip of destitution. What you actually want is the distribution of outcomes and the fraction that hit zero. Monte Carlo gives you that whole distribution; a single formula gives you one misleading number. This is exactly the gap simulation fills — it returns the shape of risk, not just its center.

Closed-form formula, or does it need Monte Carlo simulation?

Place each item in the right group.

  • Variance of a two-asset portfolio from a covariance matrix
  • Price of a vanilla European call under Black-Scholes
  • Probability a 30-year retirement plan runs out of money
  • VaR of a linear book assuming normal returns and a z-score
  • Tail loss of a 50-asset, fat-tailed, optioned portfolio
  • Value of an Asian option that pays the average price over its life

Slow but reliable — the price of brute force

Monte Carlo always works, but it isn’t free, and the catch is the rate at which it improves. More samples always help — but the help arrives grudgingly.

Definition. The error of a Monte Carlo estimate shrinks like 1/M1/\sqrt{M}, where MM is the number of samples. In plain terms: to halve the error, you must quadruple the samples. Accuracy improves only with the square root of effort, so squeezing out the last digit of precision costs brutally more compute than the first.

Worked example. Estimating π\pi, suppose 1,000 darts give you an error of about 0.050.05. Want to halve it to 0.0250.025? You need 4×4\times the darts — 4,000. Halve it again to 0.01250.0125? Another 4×4\times — 16,000 darts. The estimate is honest and it does converge, but you pay quadratically for linear gains in precision. (We’ll develop exactly why the rate is 1/M1/\sqrt{M} — and the variance-reduction tricks that cheat it — in a later lesson; for now, just internalize “quadruple for half.”)

Randomness is a feature, not a bug. Because the method is built on random draws, every run gives a slightly different answer — hit “Run again” on the dart chart and the path to π\pi wiggles differently each time, even as it lands in the same place. That run-to-run wobble is sampling noise, and it’s completely expected. Far from being embarrassing, it’s quantifiable: you can put error bars on a Monte Carlo estimate precisely because you understand how the noise behaves. An answer that came back identical every time would mean you weren’t really sampling.

Warning:

Convergence is a promise, not a deadline

The LLN guarantees Monte Carlo gets there — eventually. It says nothing about how fast, and the answer is “slowly”: error falls only like 1/M1/\sqrt{M}. A run that looks “converged” after 1,000 samples may still carry meaningful noise, and a noisy estimate dressed up with three decimal places is a confidently-stated guess. Always ask how many samples produced a number before you trust its last digits — and run it more than once to see the wobble for yourself.

Cause → effect. Your π estimate has an error of about 0.04 at 2,500 darts. Roughly how many darts do you need to cut the error to about 0.02?

If Monte Carlo is so slow, why not always just solve the integral exactly?

Because for the problems that matter, you can’t. Closed-form solutions exist only for a narrow, well-behaved class of integrals — vanilla options, normal-return VaR, a handful of textbook cases. The moment your problem has path-dependence, many correlated factors, non-linear payoffs, or a non-standard distribution, the integral becomes genuinely unsolvable by hand or by any clean formula. Monte Carlo’s 1/M1/\sqrt{M} convergence is slow, but it’s dimension-independent — adding a tenth or a fiftieth correlated asset barely changes the method, whereas grid-based numerical integration explodes exponentially with dimensions (the “curse of dimensionality”). So in high dimensions Monte Carlo isn’t just the easy option — it’s frequently the only option that finishes before the heat death of the universe. Slow-but-possible beats fast-but-impossible every time.

Putting it together

Monte Carlo is the universal escape hatch from intractable math: when no formula exists, build a model that produces random scenarios, measure the quantity you care about in each one, and average. The Law of Large Numbers guarantees that average converges to the true expected value E[f(X)]1Mf(xi)E[f(X)] \approx \frac{1}{M}\sum f(x_i) — you saw it conjure π\pi from a pile of random darts. Finance leans on it constantly, because retirement ruin, path-dependent options, and fat-tailed multi-asset tails have no clean closed form. The price is square-root-slow convergence and a dash of run-to-run noise — both fully expected, both fully quantifiable.

Big picture

What Monte Carlo is — the whole idea

  • Monte Carlo simulation
    • The core idea
      • No closed-form formula → use randomness
      • Generate many random scenarios
      • Measure the quantity in each
      • Average → the estimate
    • Why averaging works
      • Law of Large Numbers
      • Sample average → true E[X] as M grows
      • Individual draws stay random; the mean stabilises
    • Canonical demo: π by darts
      • Throw uniform darts at the unit square
      • Count fraction inside the quarter circle
      • π ≈ 4 × inside / total
    • Why finance needs it
      • Retirement ruin under random returns
      • Path-dependent options (barrier, Asian)
      • Fat-tailed multi-asset VaR
    • The catch
      • Error shrinks like 1/√M (slow)
      • Quadruple samples to halve the error
      • Run-to-run noise is expected and quantifiable
No formula? Simulate many random scenarios, measure each, average. The LLN guarantees convergence; finance needs it because most real questions have no closed form.

Recap: what Monte Carlo is

Question 1 of 50 correct

Which best describes when you reach for a Monte Carlo simulation rather than a formula?

Check your answer to continue.

Next up — Sampling from distributions — we get our hands on the dice themselves. A computer’s random-number generator only spits out uniform numbers between 0 and 1; we’ll learn how to transform that flat stream into normally-distributed returns, lognormal prices, and the fat-tailed shocks that real markets actually throw at you. Once you can sample the right distribution, you can simulate anything.

Mark lesson as complete