How do Black-Scholes and Monte Carlo prices compare?

Price a European call with the Black-Scholes formula and with Monte Carlo simulation, measure the simulation’s standard error, and see that more paths cannot fix a wrong volatility.

After this lesson, you can price a European call with the Black-Scholes formula and by simulation, and report the simulation’s standard error.

How do I compute the Black-Scholes price?

The Black-Scholes formula gives the price of a European call on a stock without dividends from five inputs. A one-year call with a strike of 105 dollars on a made-up stock at 100 dollars, with a risk-free rate of 3% and a volatility of 20%, costs 7.1281 dollars.

\[ C = S_0\,\Phi(d_1) - K e^{-rT}\,\Phi(d_2), \qquad d_1 = \frac{\ln(S_0/K) + (r + \sigma^2/2)\,T}{\sigma\sqrt{T}}, \qquad d_2 = d_1 - \sigma\sqrt{T} \]

Here \(S_0\) is the stock price, \(K\) the strike, \(r\) the continuously compounded risk-free rate, \(T\) the years to expiry, \(\sigma\) the yearly volatility and \(\Phi\) the standard normal distribution function, which norm.cdf computes.

The following box computes the Black-Scholes price.

import numpy as np
from scipy.stats import norm

def black_scholes_call(volatility=0.20, stock_price=100, strike=105, rate=0.03, years=1):
    d1 = (np.log(stock_price / strike) + (rate + volatility ** 2 / 2) * years) / (volatility * np.sqrt(years))
    d2 = d1 - volatility * np.sqrt(years)
    return stock_price * norm.cdf(d1) - strike * np.exp(-rate * years) * norm.cdf(d2)

print(round(black_scholes_call(), 4))
7.1281

How do I price the call by simulation?

A Monte Carlo price simulates many terminal stock prices, takes the call’s payoff on each and averages the discounted payoffs. With 100,000 paths, it gives 7.1200 dollars with a standard error of 0.0399, and with 1,000 paths 6.5937 with a standard error of 0.3807.

\[ S_T = S_0 \exp\Big[\big(r - \tfrac{\sigma^2}{2}\big)T + \sigma\sqrt{T}\,Z\Big], \qquad \hat C = e^{-rT}\,\frac{1}{N}\sum_{i=1}^{N}\max(S_{T,i} - K, 0) \]

Here \(Z\) is a standard normal draw, \(S_T\) the stock price at expiry under the risk-neutral model of Black-Scholes, and \(N\) the number of paths. The standard error of \(\hat C\) is the sample standard deviation of the discounted payoffs divided by \(\sqrt{N}\).

rng.standard_normal(100_000) draws the \(Z\) values, as in the lesson on simulating returns. np.maximum(..., 0) takes the payoff of each path, and monte_carlo_call returns the price and its standard error.

The following box prices the call with the first 1,000 paths and with all 100,000.

rng = np.random.default_rng(42)
draws = rng.standard_normal(100_000)

def monte_carlo_call(draws, volatility=0.20, stock_price=100, strike=105, rate=0.03, years=1):
    terminal_price = stock_price * np.exp((rate - volatility ** 2 / 2) * years + volatility * np.sqrt(years) * draws)
    discounted_payoff = np.exp(-rate * years) * np.maximum(terminal_price - strike, 0)
    return discounted_payoff.mean(), discounted_payoff.std(ddof=1) / np.sqrt(len(draws))

for paths in [1_000, 100_000]:
    price, standard_error = monte_carlo_call(draws[:paths])
    print(paths, round(price, 4), round(standard_error, 4))
1000 6.5937 0.3807
100000 7.12 0.0399

A hundred times more paths make the standard error about ten times smaller.

Can more paths fix a wrong volatility?

More paths shrink the simulation error around the price of the assumed model, so a wrong input stays wrong. At a volatility of 25%, Black-Scholes gives 9.1218 dollars and the simulation 9.1144, both about 1.99 dollars above the price at 20%.

The following box prices the call at 25% both ways, with the same draws.

price, standard_error = monte_carlo_call(draws, volatility=0.25)
print(round(black_scholes_call(volatility=0.25), 4), round(price, 4), round(standard_error, 4))
9.1218 9.1144 0.052

Your turn

Price the call with the first 10,000 paths. You should see 7.0578 dollars with a standard error of 0.1259, between those of 1,000 and 100,000 paths.

draws[:10000] keeps the first 10,000 draws.

price, standard_error = monte_carlo_call(draws[:10000])
print(round(price, 4), round(standard_error, 4))
7.0578 0.1259