QF-Learn

The Black-Scholes model, explained with a worked example

The Black-Scholes model is a formula for the fair price of a European option. It takes five inputs, the stock price, the strike, the time to expiry, the risk-free interest rate and the stock’s volatility, and returns the price at which neither buyer nor seller can lock in a riskless profit.

Fischer Black and Myron Scholes published it in 1973, and Robert Merton extended it the same year. Merton and Scholes received the 1997 Nobel Memorial Prize in Economic Sciences for the work (Black had died in 1995). It is still the starting point for how options are quoted and hedged, which is why it is the first thing most quant courses teach.

The Black-Scholes formula

The price of a call option C and a put option P on a stock that pays no dividends is:

C = S·N(d1) − K·e−rT·N(d2)
P = K·e−rT·N(−d2) − S·N(−d1)
d1 = [ln(S/K) + (r + σ²/2)·T] / (σ·√T)
d2 = d1 − σ·√T

N(·) is the cumulative standard normal distribution: N(x) is the chance that a standard normal draw is below x. Read the call formula as two pieces. K·e−rT·N(d2) is what you expect to pay at expiry, discounted to today, because N(d2) is the risk-neutral probability that the call ends in the money. S·N(d1) is the value of the stock you expect to receive. N(d1) is also the option’s delta, the number of shares that hedges one call.

What each input does

Every input moves the price in a predictable direction:

Input goes upCall pricePut priceWhy
Stock price SUpDownThe call is closer to paying out, the put further away.
Strike KDownUpYou pay more (call) or receive more (put) at exercise.
Volatility σUpUpBigger swings raise the upside while the loss is capped at the premium.
Time TUpUsually upMore time means more room to move; a deep in-the-money put can be the exception.
Interest rate rUpDownThe strike paid later is worth less today.
Black-Scholes call price against the stock priceA one-year call with strike 100, 5% rate and 20% volatility. Its value is a smooth curve that always sits above the hockey-stick payoff at expiry.020406080100120140Strike 100Stock price today (S)Call valueBlack-Scholes value, 1 year to expiryPayoff at expiry
The gap between the curve and the dashed payoff is the option’s time value. It is widest at the strike and shrinks to zero at expiry.

Worked example

A one-year at-the-money call on a stock at 100, with a strike of 100, a 5% risk-free rate and 20% volatility, is worth 10.45, and the matching put is worth 5.57. Here is the arithmetic:

  1. d1 = [ln(100/100) + (0.05 + 0.2²/2)·1] / (0.2·√1) = 0.07 / 0.2 = 0.35
  2. d2 = 0.35 − 0.2 = 0.15
  3. N(0.35) = 0.6368 and N(0.15) = 0.5596
  4. K·e−rT = 100·e−0.05 = 95.1229
  5. C = 100 × 0.6368 − 95.1229 × 0.5596 = 63.68 − 53.23 = 10.45

You can change any of these inputs and see the Greeks update in the Black-Scholes calculator.

Black-Scholes in Python

The formula fits in ten lines of Python using only the standard library. This is the code and what it printed:

Python
from math import exp, log, sqrt
from statistics import NormalDist

N = NormalDist().cdf  # standard normal CDF


def black_scholes(S, K, T, r, sigma):
    """European call and put prices under Black-Scholes (no dividends)."""
    d1 = (log(S / K) + (r + 0.5 * sigma**2) * T) / (sigma * sqrt(T))
    d2 = d1 - sigma * sqrt(T)
    call = S * N(d1) - K * exp(-r * T) * N(d2)
    put = K * exp(-r * T) * N(-d2) - S * N(-d1)
    return call, put, d1, d2


call, put, d1, d2 = black_scholes(S=100, K=100, T=1, r=0.05, sigma=0.20)
print(f"d1 = {d1:.4f}, d2 = {d2:.4f}")
print(f"call = {call:.4f}")
print(f"put  = {put:.4f}")
Output
d1 = 0.3500, d2 = 0.1500
call = 10.4506
put  = 5.5735

Assumptions and limits

The formula is exact only under its assumptions. The stock follows geometric Brownian motion, so its log returns are normally distributed with a constant volatility. The interest rate is constant, trading is continuous and free, there is no arbitrage, and the option can only be exercised at expiry.

None of this stops traders using it. They quote options in implied volatility and treat Black-Scholes as the translation between that number and a price.

Learn this on your phone, one short lesson at a time

QF-Learn turns topics like this into five-minute lessons with quizzes, finance games and certificates. It is free, and it is coming to Android and iOS. Leave your email and you will be first to get it.