Financial Mathematics · Lecture 11 of 12

The Black–Scholes PDE and Formula

Delta-hedge away the randomness, demand the riskless return, and a PDE appears. Solve it two ways, via the heat equation and via risk-neutral expectation, and arrive at the formula.

November 15, 2026By Diganta Bhattacharya5 min read

Assumptions

Stock follows GBM with constant σ; constant risk-free rate $r$; no dividends; continuous frictionless trading; short-selling allowed; no arbitrage. Lecture 12 discusses what happens when these fail.

Derivation by delta hedging

Hold one option worth $V(t,S)$ and short $\Delta$ shares: $\Pi=V-\Delta S$. Over $dt$, by Itô (Lecture 8):

$$d\Pi=\Big(V_t+\mu SV_S+\tfrac12\sigma^2S^2V_{SS}-\Delta\mu S\Big)dt+\sigma S\big(V_S-\Delta\big)dW.$$

Choose $\Delta=V_S$. The $dW$ term vanishes, and so does every μ. The portfolio is now riskless over $dt$, so by no-arbitrage it must earn the risk-free rate: $d\Pi=r\Pi\,dt=r(V-SV_S)\,dt$. Equate:

Black–Scholes PDE$$\frac{\partial V}{\partial t}+rS\frac{\partial V}{\partial S}+\frac12\sigma^2S^2\frac{\partial^2V}{\partial S^2}-rV=0,\qquad V(T,S)=\text{payoff}(S).$$

Three remarks. (i) μ has disappeared: two people who disagree about the stock's expected return agree on the option's price. (ii) The PDE is linear, so prices of portfolios add. (iii) Reading it as $\Theta+\tfrac12\sigma^2S^2\Gamma=r(V-S\Delta)$ gives the trader's intuition: theta pays for gamma.

Solution 1: reduce to the heat equation

Substitute $S=Ke^{x}$, $\tau=\tfrac12\sigma^2(T-t)$, $V=K\,e^{\alpha x+\beta\tau}u(\tau,x)$ with $k=2r/\sigma^2$, $\alpha=-\tfrac12(k-1)$, $\beta=-\tfrac14(k+1)^2$. The first-order and zeroth-order terms cancel and

$$u_\tau=u_{xx},$$

the heat equation from Lecture 5 (with diffusion constant 1). Its solution is a Gaussian average of the transformed payoff. Doing the integral gives the formula below. The financial picture: the payoff "diffuses" backward in time and gets smoothed into today's value curve.

Solution 2: risk-neutral expectation

By Lecture 9, $C=e^{-rT}\mathbb E^{\mathbb Q}[(S_T-K)^+]$ with $S_T=S_0e^{(r-\sigma^2/2)T+\sigma\sqrt T Z}$. Split the payoff:

$$C=e^{-rT}\mathbb E^{\mathbb Q}\big[S_T\mathbf 1_{\{S_T \gt K\}}\big]-Ke^{-rT}\,\mathbb Q(S_T \gt K).$$

From Lecture 2 with μ replaced by $r$: $\mathbb Q(S_T \gt K)=N(d_2)$ and $\mathbb E^{\mathbb Q}[S_T\mathbf 1_{\{S_T \gt K\}}]=S_0e^{rT}N(d_1)$. Therefore

Black–Scholes formula$$C=S_0N(d_1)-Ke^{-rT}N(d_2),\qquad P=Ke^{-rT}N(-d_2)-S_0N(-d_1),$$ $$d_{1,2}=\frac{\ln(S_0/K)+\big(r\pm\tfrac12\sigma^2\big)T}{\sigma\sqrt T},\qquad d_1=d_2+\sigma\sqrt T.$$

Reading the formula. $N(d_2)$ is the risk-neutral probability the call finishes in the money. $N(d_1)$ is the call's delta, the number of shares in the replicating portfolio. So $C$ is the cost of holding $N(d_1)$ shares minus a loan of $Ke^{-rT}N(d_2)$, which is exactly the replicating portfolio from the binomial model.

Things to try in the calculator: shrink $T$ towards zero and the value curve collapses onto the payoff. Raise σ and the curve lifts everywhere: options love volatility. Check parity: call − put should equal $S-Ke^{-rT}$ for any σ.

from math import log, sqrt, exp
from statistics import NormalDist
N = NormalDist().cdf
def bs_call(S, K, T, r, sigma):
    d1 = (log(S / K) + (r + sigma**2 / 2) * T) / (sigma * sqrt(T))
    d2 = d1 - sigma * sqrt(T)
    return S * N(d1) - K * exp(-r * T) * N(d2)
bs_call(100, 100, 1, 0.05, 0.2)   # 10.4506

Key takeaways

Exercises

  1. Verify by differentiation that the call formula satisfies the PDE (use S n(d₁) = K e^{−rT} n(d₂)).
  2. Price a call and put with S = 100, K = 110, T = 0.5, r = 4%, σ = 25%, and verify put–call parity.
  3. Show the call price tends to max(S − Ke^{−rT}, 0) as σ → 0 and to S as σ → ∞.