More in Engineering and physics in markets
A one-month call on a £100 share, struck at £100, with volatility at 20 per cent and interest rates at 4 per cent, is worth £2.45. I got that figure in an earlier post on implied volatility from the Black-Scholes formula. Here I get the same £2.45 from an equation Joseph Fourier published in 1822 to describe heat moving through a solid. After the first step there is no finance in it.
In that post I said Black-Scholes is a partial differential equation and then went straight to its solution. This is the part I left out: the equation itself, the three substitutions that turn it into Fourier’s, and a script that solves it the way you would solve for the temperature along a metal bar.
The equation behind the formula
Black-Scholes says that the value V of an option on a share priced at S satisfies, at every moment t before expiry,
\[\frac{\partial V}{\partial t} + \frac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} + rS\frac{\partial V}{\partial S}-rV = 0\]where σ is the volatility and r the interest rate. Options traders know the pieces by other names. The first term is theta, the value the option loses as a day passes. The second contains gamma, the curvature of the option’s value against the share price. The last two are interest, on the shares held as a hedge and on the option itself.
Read that way, the equation is a statement about time decay: an option loses value fastest where its value curve bends most. For the £100 call with thirty days left, theta is 4.4p a day and 3.8p of that is the curvature term. With ten days left the curve is tighter around the strike and theta is 7.1p a day. With two days left it is 15.3p.
Any option on the share obeys the same equation. The condition at expiry is what makes this one a call: at time T it pays S − K if the share finishes above the strike K, and nothing otherwise.
Fourier wrote the same equation for a metal bar
Take a long metal bar, heat part of it and leave it alone. If u is the temperature at position x along the bar and τ is the time since the heating stopped, Fourier’s equation is
\[\frac{\partial u}{\partial \tau} = \frac{\partial^2 u}{\partial x^2}\]with the metal’s thermal diffusivity folded into the units of time. The temperature at a point changes at a rate set by how sharply the temperature profile bends there. A hot spot has cooler metal on both sides, so the profile curves downwards and the spot cools. A sharp corner in the profile rounds off quickly. A straight slope does not move at all.
Every engineering student meets this equation in a heat transfer course, and the applied mathematics, partial differential equations above all, was the part of my degree I enjoyed most. The same mathematics covers a dye spreading in water and a random walk spreading over time, which I wrote about in the post on Brownian motion.
Set the two equations side by side and the resemblance shows: one derivative in time, two in space. Black-Scholes has two extra terms, and the awkward coefficients S² and S in front of the derivatives.
Three substitutions turn one into the other
A change of variables removes the extras, and each of the three steps has a plain meaning.
The first measures the share price as a distance. Set x = ln(S/K), the logarithm of the share price relative to the strike. The strike sits at x = 0, and a 1 per cent move in the share is the same step along the bar wherever it starts. That removes the S² and the S, because a price that moves in proportion to its level moves evenly in its logarithm.
Then the clock. Run it backwards from expiry and count it in variance: τ = ½σ²(T − t). At expiry τ is zero, and it grows as you step back towards today. The payoff becomes the bar’s starting temperature, and today’s value is the temperature after the bar has been left for a time τ.
Interest goes last. Write V = K e^(αx + βτ) u(x, τ), with k = 2r/σ², α = −(k − 1)/2 and β = −(k + 1)²/4. The exponential absorbs the two interest terms, much as discounting turns a future payment into a present one.
After those steps the Black-Scholes equation for V is exactly Fourier’s equation for u. The call’s payoff becomes the starting temperature
\[u(x, 0) = \max\left(e^{(k+1)x/2}-e^{(k-1)x/2},\ 0\right)\]which is zero along the left half of the bar and rises to the right of x = 0, with a corner at the strike.
| Heat in a bar | A call option |
|---|---|
| Position along the bar, x | Logarithm of share price over strike, ln(S/K) |
| Time since the heating stopped, τ | Variance still to come before expiry, ½σ²(T − t) |
| Temperature, u | Option value with the interest stripped out |
| Starting temperature profile | Payoff at expiry |
| The corner in that profile | The strike |
| Thermal diffusivity of the metal | Half the variance rate, ½σ² |
| Corners round off, straight slopes stay put | Time decay is largest where gamma is largest |
One consequence comes straight out of the second substitution. Volatility and time to expiry never appear separately in the heat problem, only as the product σ²(T − t). A thirty-day option at 40 per cent volatility has had exactly as much heating time as a 120-day option at 20 per cent. Apart from the interest terms, they are the same problem.
The £100 call, solved on a grid
For the call from the earlier post, k = 2 × 0.04 ÷ 0.20² = 2 and the heating time is ½ × 0.20² × 30/365 = 0.00164. The share is at the strike, so the answer is the temperature at x = 0 after that time.
When a heat problem cannot be solved on paper, an engineer cuts the bar into short segments and steps forward in time. At each step, every segment’s temperature moves towards the average of its two neighbours:
\[u_i^{\text{new}} = u_i + \lambda\,(u_{i+1}-2u_i + u_{i-1}), \qquad \lambda = \frac{\Delta\tau}{\Delta x^2}\]The scheme is stable only while λ stays below one half. Above that the errors grow at every step. The two ends of the bar are far from the strike: worthless on the left, and on the right the value of a call so far in the money that it is certain to be exercised.
| Grid points | Time steps | Value | Gap to the formula |
|---|---|---|---|
| 51 | 8 | £2.4414 | −0.98p |
| 101 | 32 | £2.4488 | −0.25p |
| 201 | 126 | £2.4507 | −0.06p |
| 401 | 500 | £2.4511 | −0.01p |
| 801 | 2,001 | £2.4512 | under 0.01p |
| 1,601 | 8,001 | £2.4513 | under 0.01p |
With 51 points the answer is a penny out. Each doubling of the grid cuts the error to about a quarter, and from 801 points the grid and the Black-Scholes formula agree to within a hundredth of a penny. The same solver gives the other two prices in that post, £1.31 at 10 per cent volatility and £3.59 at 30.

The chart shows the whole solution rather than the single point. On the left is the bar: the starting profile with its corner at the strike, then the temperature after the heating times that correspond to ten, twenty and thirty days. On the right the same four curves are converted back into pounds, and the dots are the Black-Scholes formula.
The solver also prices the Bitcoin call I worked through in Python: Bitcoin at $93,491, a strike of $100,000, thirty days to run. At 40, 50 and 60 per cent volatility the grid returns $1,995, $2,968 and $3,981, the three prices quoted there, and at the 45.25 per cent implied by the market price it returns $2,500. Both options have thirty days left, but the Bitcoin call’s heating time is 0.0084 against the share’s 0.0016, about five times as long, because volatility enters squared. In heat terms a month of Bitcoin at 45 per cent is five months of a share at 20.
A third route to the price comes from Fourier’s own solution. On a long bar the temperature at any point is an average of the starting temperatures, weighted by a bell curve that widens as time passes.
\[u(x,\tau) = \frac{1}{\sqrt{4\pi\tau}}\int_{-\infty}^{\infty} u(s,0)\,e^{-(x-s)^2/4\tau}\,ds\]Do that integral on the call’s starting profile and the two N(·) terms of the Black-Scholes formula come out, one from each exponential. The script does the average numerically and gets £2.4513.
Bachelier used it in 1900, Black and Scholes in 1973
The link between prices and heat is older than the formula. Louis Bachelier defended his thesis, Théorie de la spéculation, at the Sorbonne on 29 March 1900, with Henri Poincaré as his supervisor. He treated prices as a random walk, showed that the probability of finding the price at a given level spreads out according to Fourier’s equation, and gave the idea a name, the radiation of probability. Poincaré’s report said Fourier’s reasoning carried over almost unchanged. Bachelier went on to price options with it.
His model let the price itself wander, so it could fall below zero, and like every attempt before 1973 it had no sound way of handling the risk premium. Fischer Black and Myron Scholes closed that gap in The Pricing of Options and Corporate Liabilities, published in the Journal of Political Economy in 1973. Their argument was financial: hold the option against the right amount of the share and the risk cancels, so the pair must earn the interest rate. That argument produces the differential equation. The next step was the one an engineer would take. They changed variables, wrote that the result “is the heat-transfer equation of physics”, and took its solution from page 155 of Churchill’s Fourier Series and Boundary Value Problems, a 1963 textbook on the differential equations of engineering and physics.
Robert Merton reached the same formula by another route. He and Scholes shared the 1997 Nobel prize in economics for the method; Black had died in 1995.
Where an option stops behaving like a metal bar
The diffusivity of a steel bar is a property of the steel, and it is the same tomorrow as today. Volatility is not. The whole construction assumes σ is one fixed number for the life of the option, and prices don’t behave that way. In the Brownian motion post I counted thirty days in the S&P 500 beyond five standard deviations where the model expects none, and found that a big day tends to be followed by more big days.
Option markets price that in. Options on the same share with different strikes trade at different implied volatilities, and if the heat equation were the whole story there would be one σ per share.
So I use the picture for intuition and the formula for the price. The bar explains why time decay speeds up near expiry, why an option at the strike is the one most exposed to a change in volatility, and why volatility and time can be traded off against each other through σ²T. And the grid goes where the formula cannot. For an American put, which can be exercised early and has no closed-form price, the same few lines work with one extra check at every step.
Checking it yourself
The script needs numpy and nothing else. It prices the £100 call three ways, by the formula, by the bell-curve average and on the grid, prints the grid’s error as the mesh is refined, gives the theta figures quoted near the top and reprices the Bitcoin call at four volatilities. Nothing is downloaded, so your output should be identical to mine.
from math import ceil, erf, exp, log, pi, sqrt
import numpy as np
def N(z):
return 0.5 * (1 + erf(z / sqrt(2)))
def bs_call(S, K, T, r, sigma):
"""The Black-Scholes formula, for comparison."""
d1 = (log(S / K) + (r + sigma ** 2 / 2) * T) / (sigma * sqrt(T))
return S * N(d1) - K * exp(-r * T) * N(d1 - sigma * sqrt(T))
def as_bar(K, T, r, sigma, points):
"""The option rewritten as a bar: grid, starting temperature, heating time."""
k = 2 * r / sigma ** 2
tau = 0.5 * sigma ** 2 * T
half = 10 * sigma * sqrt(T) # long enough that the ends do not matter
x = np.linspace(-half, half, points) # x = ln(S/K), so the strike sits at x = 0
u0 = np.maximum(np.exp((k + 1) * x / 2) - np.exp((k - 1) * x / 2), 0)
return k, tau, x, u0
def in_money(S, K, k, tau, x, u):
"""Undo the substitutions: the temperature at ln(S/K), back in money."""
x0 = log(S / K)
return K * exp(-(k - 1) * x0 / 2 - (k + 1) ** 2 * tau / 4) * np.interp(x0, x, u)
def grid_call(S, K, T, r, sigma, points=801):
"""Step Fourier's equation forward from the payoff."""
k, tau, x, u = as_bar(K, T, r, sigma, points)
dx = x[1] - x[0]
steps = ceil(tau / (0.4 * dx ** 2)) # keeps lambda below one half
lam = tau / steps / dx ** 2
for n in range(1, steps + 1):
u[1:-1] += lam * (u[2:] - 2 * u[1:-1] + u[:-2])
t = tau * n / steps
u[0] = 0.0 # far below the strike: worthless
u[-1] = (exp((k + 1) * x[-1] / 2 + (k + 1) ** 2 * t / 4)
- exp((k - 1) * x[-1] / 2 + (k - 1) ** 2 * t / 4))
return in_money(S, K, k, tau, x, u), steps
def average_call(S, K, T, r, sigma, points=4001):
"""Fourier's own solution: average the starting temperatures with bell-curve weights."""
k, tau, x, u0 = as_bar(K, T, r, sigma, points)
weights = np.exp(-(log(S / K) - x) ** 2 / (4 * tau)) / sqrt(4 * pi * tau)
u_now = np.full_like(x, np.sum(weights * u0) * (x[1] - x[0]))
return in_money(S, K, k, tau, x, u_now)
# The one-month call on a £100 share
S, K, T, r, sigma = 100, 100, 30 / 365, 0.04, 0.20
exact = bs_call(S, K, T, r, sigma)
print(f"£100 call: k = {2 * r / sigma ** 2:.0f}, heating time {0.5 * sigma ** 2 * T:.5f}")
print(f" formula £{exact:.4f}; bell-curve average £{average_call(S, K, T, r, sigma):.4f}")
for points in (51, 101, 201, 401, 801, 1601):
value, steps = grid_call(S, K, T, r, sigma, points)
print(f" {points:5,} points, {steps:5,} time steps: £{value:.4f}, {100 * (value - exact):+.2f}p from the formula")
print(" at 10% and 30% volatility: " + ", ".join(f"£{grid_call(S, K, T, r, v)[0]:.2f}" for v in (0.10, 0.30)))
# Time decay, and how much of it is the curvature term
for days in (30, 10, 2):
t = days / 365
d1 = (log(S / K) + (r + sigma ** 2 / 2) * t) / (sigma * sqrt(t))
gamma = exp(-d1 ** 2 / 2) / sqrt(2 * pi) / (S * sigma * sqrt(t))
curvature = 0.5 * sigma ** 2 * S ** 2 * gamma
theta = curvature + r * K * exp(-r * t) * N(d1 - sigma * sqrt(t))
print(f" {days:2} days left: theta {100 * theta / 365:.1f}p a day, of which curvature {100 * curvature / 365:.1f}p")
# The Bitcoin call from the worked example
S, K = 93491, 100000
print("Bitcoin call:")
for v in (0.40, 0.4525, 0.50, 0.60):
print(f" at {v:.2%}: heating time {0.5 * v ** 2 * T:.4f}, grid ${grid_call(S, K, T, r, v, 1601)[0]:,.0f}, "
f"formula ${bs_call(S, K, T, r, v):,.0f}")
print(f" heating time against the share's: {(0.4525 / sigma) ** 2:.1f} times, "
f"or {30 * (0.4525 / sigma) ** 2:.0f} days at 20%")
It prints:
£100 call: k = 2, heating time 0.00164
formula £2.4513; bell-curve average £2.4513
51 points, 8 time steps: £2.4414, -0.98p from the formula
101 points, 32 time steps: £2.4488, -0.25p from the formula
201 points, 126 time steps: £2.4507, -0.06p from the formula
401 points, 500 time steps: £2.4511, -0.01p from the formula
801 points, 2,001 time steps: £2.4512, -0.00p from the formula
1,601 points, 8,001 time steps: £2.4513, -0.00p from the formula
at 10% and 30% volatility: £1.31, £3.59
30 days left: theta 4.4p a day, of which curvature 3.8p
10 days left: theta 7.1p a day, of which curvature 6.6p
2 days left: theta 15.3p a day, of which curvature 14.8p
Bitcoin call:
at 40.00%: heating time 0.0066, grid $1,995, formula $1,995
at 45.25%: heating time 0.0084, grid $2,500, formula $2,500
at 50.00%: heating time 0.0103, grid $2,968, formula $2,968
at 60.00%: heating time 0.0148, grid $3,981, formula $3,981
heating time against the share's: 5.1 times, or 154 days at 20%