Quant Sandbox
DerivativesPortfolio & RiskFixed IncomeCorporate FinanceStochastic ModelsGuide
Guide
Derivatives pricing
01Forwards, calls and puts02Combining positions03Arbitrage and the forward price04Put–call parity05The one-step binomial model06Risk-neutral probabilities07Multi-step trees and backward induction08American options and early exercise09Delta and hedging10Geometric Brownian motion11The Black–Scholes formula12The Greeks: gamma, vega, theta and rho13Implied volatility and the volatility smile14Stochastic volatility and the Heston model15Static replication: Breeden–Litzenberger and Carr–Madan16Exotic options: barriers, Asians and digitals
Portfolio & risk
01Returns and volatility02Diversification and correlation03The efficient frontier and the capital market line04Risk aversion and the optimal complete portfolio05CAPM, beta and the security market line06Performance measures: Sharpe, Treynor, Jensen and information ratio07Factor models and systematic risk08Value at Risk and expected shortfall
Fixed income
01Bond prices and yields02Duration and convexity03Immunization and duration matching04Spot rates, forward rates and the yield curve05Bond futures and the cheapest-to-deliver06Interest rate swaps07Callable bonds and negative convexity08Credit risk: default probabilities and credit spreads
Corporate finance
01Interest, compounding and discounting02Annuities, perpetuities and loan amortization03Net present value and internal rate of return04The weighted average cost of capital05Capital structure and the Modigliani–Miller theorems06Discounted cash flow valuation07Relative valuation with multiples08Real options: the value of flexibility
Stochastic models
01Random walks and Brownian motion02Probability spaces, σ-algebras and random variables03Filtrations, adapted processes and stopping times04Conditional expectation and martingales05Properties of Brownian motion06The reflection principle and first passage times07The Brownian bridge08The Itô integral09Itô's lemma10Kolmogorov equations and the Feynman–Kac formula11Change of measure and Girsanov's theorem12Monte Carlo option pricing13Simulating SDEs: the Euler–Maruyama scheme14Mean reversion: Ornstein–Uhlenbeck and Vasicek15Jumps and the Merton jump-diffusion model
Knowledge graph

© 2026 Quant Sandbox · A study aid for quantitative finance

Privacy & dataNo cookies

This site does not use cookies and asks for no personal data. It keeps a few small settings in your browser's local storage — your chosen theme and language, the sidebar layout, and your progress and answers in the Guides — so it remembers them on your next visit. This data never leaves your device; clearing your browser storage removes it. Inputs you change can also be captured in the page URL, so you can share or bookmark a specific setup. The site uses Vercel Web Analytics, a privacy-friendly, cookieless service that records only anonymous, aggregated usage (such as page views) without identifying you or tracking you across other sites.

Guide/Stochastic models

Monte Carlo option pricing

Lesson 12 of 15 · 1 min read

Many quantities in finance are expected values: the price of an option is a discounted expected payoff, a risk measure is a tail probability. When the expectation has no closed form, it can be estimated by Monte Carlo simulation: draw many random outcomes and average them. This lesson explains why the average works, how fast it converges, and how to price a European call this way, using the stock price solution from "Itô's lemma".

Expectations as long-run averages

Let XXX be a random variable whose mean E[X]\mathbb{E}[X]E[X] we want. Draw NNN independent copies X1,…,XNX_1, \dots, X_NX1​,…,XN​ with the same distribution and form the sample mean

μ^N=1N∑i=1NXi.\hat\mu_N = \frac{1}{N} \sum_{i=1}^{N} X_i.μ^​N​=N1​i=1∑N​Xi​.

The law of large numbers says that μ^N→E[X]\hat\mu_N \to \mathbb{E}[X]μ^​N​→E[X] as N→∞N \to \inftyN→∞. This is the entire idea of Monte Carlo: replace an integral that is hard to compute by an average over simulated outcomes that are easy to generate.

The estimator is unbiased: E[μ^N]=E[X]\mathbb{E}[\hat\mu_N] = \mathbb{E}[X]E[μ^​N​]=E[X] for every NNN. Any single run is off by a random error, but the error has no systematic direction.

Standard error

Let sss be the standard deviation of one draw XiX_iXi​. Since the draws are independent, the variance of their sum is Ns2N s^2Ns2, and dividing by NNN gives

Var⁡(μ^N)=s2N,SE⁡=sd⁡(μ^N)=sN.\operatorname{Var}(\hat\mu_N) = \frac{s^2}{N}, \qquad \operatorname{SE} = \operatorname{sd}(\hat\mu_N) = \frac{s}{\sqrt{N}}.Var(μ^​N​)=Ns2​,SE=sd(μ^​N​)=N​s​.

This is the standard error of the estimate. It falls like 1/N1/\sqrt{N}1/N​, the same square-root law that governed the random walk in "Random walks and Brownian motion". The consequence is sobering: to make the error 10 times smaller you need 100 times as many simulations.

Monte Carlo error: SE⁡=s/N\operatorname{SE} = s/\sqrt{N}SE=s/N​. One extra digit of accuracy costs a hundredfold more draws.

Confidence intervals

By the central limit theorem, for large NNN the estimate μ^N\hat\mu_Nμ^​N​ is approximately normal around the true mean with standard deviation SE⁡\operatorname{SE}SE. The true value sss is unknown, so we use the sample standard deviation of the draws in its place. An approximate 95% confidence interval for E[X]\mathbb{E}[X]E[X] is

μ^N±1.96 sN.\hat\mu_N \pm 1.96\,\frac{s}{\sqrt{N}}.μ^​N​±1.96N​s​.

If the whole experiment were repeated many times, about 95% of such intervals would contain the true mean. Always report a Monte Carlo estimate together with its interval: the estimate alone says nothing about how much to trust it.

Pricing a European call

"Risk-neutral probabilities" showed that a derivative's price is its discounted expected payoff under the measure Q\mathbb{Q}Q. For a European call with strike KKK and maturity TTT,

C0=e−rT EQ[max⁡(ST−K, 0)].C_0 = e^{-rT}\,\mathbb{E}^{\mathbb{Q}}\big[\max(S_T - K,\ 0)\big].C0​=e−rTEQ[max(ST​−K, 0)].

Under Q\mathbb{Q}Q the stock follows GBM with drift rrr. By Itô's lemma its terminal value is exact: ST=S0exp⁡((r−12σ2)T+σWT)S_T = S_0 \exp((r - \tfrac12\sigma^2)T + \sigma W_T)ST​=S0​exp((r−21​σ2)T+σWT​), and WT=T ZW_T = \sqrt{T}\,ZWT​=T​Z with ZZZ standard normal. No time-stepping is needed for a payoff that depends only on STS_TST​. The algorithm is:

  1. Draw NNN independent standard normal numbers Z1,…,ZNZ_1, \dots, Z_NZ1​,…,ZN​.
  2. Compute terminal prices ST(i)=S0exp⁡((r−12σ2)T+σT Zi)S_T^{(i)} = S_0 \exp\big((r - \tfrac12\sigma^2)T + \sigma\sqrt{T}\,Z_i\big)ST(i)​=S0​exp((r−21​σ2)T+σT​Zi​).
  3. Compute payoffs max⁡(ST(i)−K,0)\max(S_T^{(i)} - K, 0)max(ST(i)​−K,0) and discount each by e−rTe^{-rT}e−rT.
  4. Average the discounted payoffs; their sample standard deviation divided by N\sqrt{N}N​ is the standard error.

The figure runs this algorithm in front of you for S0=K=100S_0 = K = 100S0​=K=100, r=5%r = 5\%r=5%, σ=20%\sigma = 20\%σ=20% and T=1T = 1T=1. Each draw of STS_TST​ drops into a histogram of terminal prices; the bins to the right of the strike line are tinted, because only there does the call pay. Press +1 a few times and watch single draws land, mostly near 100 and some far out. Then press Play: draws arrive faster and faster, the histogram takes the skewed log-normal shape, and the strip below shows the running estimate with its 95% band narrowing around the Black–Scholes price of 10.45. The readouts give the number of draws, the estimate, its standard error and the share of draws that end in the money, which settles near N(d2)≈0.56N(d_2) \approx 0.56N(d2​)≈0.56. Reset starts a new sample.

A Monte Carlo simulation, liveOpen in Monte Carlo →
Press +1 or Play to make the first draw.
Running estimate ± 1.96·SEBlack–Scholes: 10.45
Draws
0
Estimated call price
–
Standard error
–
Share in the money (N(d₂) = 0.560)
–

A small worked example

Take S0=100S_0 = 100S0​=100, K=100K = 100K=100, r=5%r = 5\%r=5%, σ=20%\sigma = 20\%σ=20%, T=1T = 1T=1. Then (r−12σ2)T=0.03(r - \tfrac12\sigma^2)T = 0.03(r−21​σ2)T=0.03 and σT=0.2\sigma\sqrt{T} = 0.2σT​=0.2. Suppose five draws are Z=0.5, −1.2, 1.5, 0.1, −0.3Z = 0.5,\ -1.2,\ 1.5,\ 0.1,\ -0.3Z=0.5, −1.2, 1.5, 0.1, −0.3. The terminal prices are 100 e0.03+0.2Z100\,e^{0.03 + 0.2Z}100e0.03+0.2Z:

  • Z=0.5Z = 0.5Z=0.5: ST=100 e0.13≈113.88S_T = 100\,e^{0.13} \approx 113.88ST​=100e0.13≈113.88, payoff 13.8813.8813.88.
  • Z=−1.2Z = -1.2Z=−1.2: ST=100 e−0.21≈81.06S_T = 100\,e^{-0.21} \approx 81.06ST​=100e−0.21≈81.06, payoff 000.
  • Z=1.5Z = 1.5Z=1.5: ST=100 e0.33≈139.10S_T = 100\,e^{0.33} \approx 139.10ST​=100e0.33≈139.10, payoff 39.1039.1039.10.
  • Z=0.1Z = 0.1Z=0.1: ST=100 e0.05≈105.13S_T = 100\,e^{0.05} \approx 105.13ST​=100e0.05≈105.13, payoff 5.135.135.13.
  • Z=−0.3Z = -0.3Z=−0.3: ST=100 e−0.03≈97.04S_T = 100\,e^{-0.03} \approx 97.04ST​=100e−0.03≈97.04, payoff 000.

The average payoff is 58.11/5≈11.6258.11 / 5 \approx 11.6258.11/5≈11.62, and discounting gives 11.62 e−0.05≈11.0511.62\,e^{-0.05} \approx 11.0511.62e−0.05≈11.05. The Black–Scholes price for these inputs is 10.4510.4510.45. Five draws are far too few: the estimate is in the right region, but its error is large.

Worked example

One more draw, step by step

  1. With the same inputs (S0=K=100S_0 = K = 100S0​=K=100, r=5%r = 5\%r=5%, σ=20%\sigma = 20\%σ=20%, T=1T = 1T=1), take the draw Z=0.8Z = 0.8Z=0.8. Terminal price.

    ST=S0 e(r−12σ2)T+σT Z\displaystyle S_T = S_0\,e^{(r - \frac12\sigma^2)T + \sigma\sqrt{T}\,Z}ST​=S0​e(r−21​σ2)T+σT​Z=120.92
  2. Payoff of the call.

    (ST−K)+\displaystyle (S_T - K)^+(ST​−K)+=20.92
  3. Discounted payoff, this draw's contribution to the average.

    e−rT(ST−K)+\displaystyle e^{-rT}(S_T - K)^+e−rT(ST​−K)+=19.9

Comparing with Black–Scholes

For these inputs the standard deviation of one discounted payoff is about s≈14.72s \approx 14.72s≈14.72, larger than the price itself, because most of the value comes from a minority of paths that end far in the money. The standard error and the half-width of the 95% interval are therefore

  • N=100N = 100N=100: SE⁡≈1.47\operatorname{SE} \approx 1.47SE≈1.47, interval ±2.89\pm 2.89±2.89.
  • N=1000N = 1000N=1000: SE⁡≈0.47\operatorname{SE} \approx 0.47SE≈0.47, interval ±0.91\pm 0.91±0.91.
  • N=5000N = 5000N=5000: SE⁡≈0.21\operatorname{SE} \approx 0.21SE≈0.21, interval ±0.41\pm 0.41±0.41.

Even 5000 paths pin the price down only to within about ±0.41\pm 0.41±0.41 of the Black–Scholes value 10.4510.4510.45. At σ=40%\sigma = 40\%σ=40% the price rises to about 18.0218.0218.02 and the payoff standard deviation to about 31.2931.2931.29, so the interval at N=5000N = 5000N=5000 widens to about ±0.87\pm 0.87±0.87: more volatile payoffs need more draws for the same accuracy.

The figure prices this call (S0=100S_0 = 100S0​=100, K=100K = 100K=100, r=5%r = 5\%r=5%, T=1T = 1T=1) with terminal prices drawn exactly from GBM under Q\mathbb{Q}Q. It plots the running Monte Carlo estimate against the number of simulations up to 5000, with the band ±1.96 SE⁡\pm 1.96\,\operatorname{SE}±1.96SE around it and the Black–Scholes price as a horizontal line. Press "New sample" a few times: the early part of the curve jumps around, while the band narrows like 1/N1/\sqrt{N}1/N​ and nearly always contains the line. Move the σ\sigmaσ slider and note that the band widens. The readouts at N=5000N = 5000N=5000 give the estimate, its standard error, the Black–Scholes price and the error.

Convergence of the Monte Carlo estimateOpen in Monte Carlo →
20%
0.10.6
±1.96 · SEMonte Carlo estimateBlack–Scholes price
Estimate at n = 5000
10.583
Standard error
0.207
Black–Scholes price
10.451
Error
0.132

For a European call the closed form is obviously better. Monte Carlo pays off for payoffs that depend on the whole path (Asian or barrier options), for many underlyings at once, and for models such as Heston where no simple formula exists. The flexibility is the same in all cases; only the payoff function changes.

Variance reduction

Since the error is s/Ns/\sqrt{N}s/N​, there are two ways to improve it: raise NNN, or lower sss. Techniques that lower sss are called variance reduction. The simplest is antithetic variates: for every draw ZZZ also use −Z-Z−Z, and average the two payoffs. The pair moves in opposite directions, so much of their noise cancels. Another is a control variate: simulate alongside a quantity whose mean is known exactly, such as the discounted stock price with mean S0S_0S0​, and correct the estimate by the observed error in that quantity.

Summary

  • Monte Carlo estimates an expectation by the average of NNN independent simulated outcomes; the law of large numbers makes it converge.
  • The standard error is s/Ns/\sqrt{N}s/N​: halving the error needs four times as many draws.
  • A 95% confidence interval is the estimate ±1.96 s/N\pm 1.96\,s/\sqrt{N}±1.96s/N​.
  • A European call is priced by averaging e−rTmax⁡(ST−K,0)e^{-rT}\max(S_T - K, 0)e−rTmax(ST​−K,0) over risk-neutral draws of ST=S0e(r−σ2/2)T+σTZS_T = S_0 e^{(r - \sigma^2/2)T + \sigma\sqrt{T}Z}ST​=S0​e(r−σ2/2)T+σT​Z; the result converges to Black–Scholes.
  • Its real strength is flexibility: path-dependent payoffs and models without closed forms.

Monte Carlo price =e−rT×= e^{-rT} \times=e−rT× average payoff, reported with its standard error s/Ns/\sqrt{N}s/N​.

Try itWatch the Monte Carlo estimate and its confidence interval converge in the Monte Carlo lab →
2 questions on this lesson at the end of the series →
← PreviousChange of measure and Girsanov's theoremNext →Simulating SDEs: the Euler–Maruyama scheme
Connections
Monte Carlo option pricing
Open the full graph →
Labs for this lesson
Monte CarloGeometric Brownian Motion