From PDE to Price: Solving Black-Scholes and Delta Hedging

Solve LV=0\mathcal{L}V=0, go risk-neutral, then hedge with Δ=V/S\Delta = \partial V/\partial S so dΠt=rΠtdtd\Pi_t = r\Pi_t dt.

5/15/2023

This is the capstone for the series: we turn the PDE into a price, swap to the risk-neutral lens, and sanity-check the hedge.


Attention Conservation Notice

read the warning

Final post in the five-part series--math-heavy, implementation-light, complete derivation.


Recap (where we have been)

  1. We built Brownian motion as a random-walk limit: /brownian-motion-as-a-symmetric-random-walk-limit.
  2. We framed SDEs and argued for geometric Brownian motion (GBM): /stochastic-differential-equations-geometric-brownian-motion.
  3. We used Ito's Lemma to understand transforms of diffusions: /itos_lemma.
  4. We produced the Black-Scholes PDE by delta-hedging a small portfolio: /black-scholes-pde.

Today we close the loop: solve the PDE, hop into the risk-neutral world, write down the closed form, and tie it back to hedging.


The PDE we need to solve

For a European price V(t,S)V(t,S) with maturity TT and payoff Φ(ST)\Phi(S_T), the Black-Scholes PDE (no dividends, constant r,σr,\sigma) is

Vt+12σ2S22VS2+rSVSrV=0,V(T,S)=Φ(S).\frac{\partial V}{\partial t} + \tfrac{1}{2}\sigma^2 S^2 \frac{\partial^2 V}{\partial S^2} + rS\frac{\partial V}{\partial S} - r V = 0,\qquad V(T,S)=\Phi(S).

We'll solve it two ways:

  • transform to the heat equation (classical PDE route), and
  • apply a change of measure (risk-neutral route / Feynman-Kac).

Same destination, two viewpoints. Two proofs keep us honest; they're the algebraic version of diversification.


Route A: Heat-equation transform (the classical solve)

Set time-to-maturity τ=Tt\tau = T-t and work with the call C(t,S;K)C(t,S;K) where Φ(S)=(SK)+\Phi(S)=(S-K)^+. Define the log-moneyness

x=ln ⁣SK,x = \ln\!\frac{S}{K},

and the re-scaled function

u(x,τ)=eαx+βτC(t,S;K)K.u(x,\tau) = e^{\alpha x + \beta \tau}\,\frac{C(t,S;K)}{K}.

Choose α,β\alpha,\beta to cancel the first-derivative and zero-order terms in the PDE. A standard calculation gives

α=12rσ2,β=(12σ2α2+rαr).\alpha = \frac{1}{2} - \frac{r}{\sigma^2},\qquad \beta = -\left(\frac{1}{2}\sigma^2\alpha^2 + r\alpha - r\right).

With that choice, uu satisfies the heat equation

uτ=12σ22ux2,\frac{\partial u}{\partial \tau} = \tfrac{1}{2}\sigma^2 \frac{\partial^2 u}{\partial x^2},

with terminal condition

u(x,0)=eαx(ex1)+.u(x,0) = e^{\alpha x}(e^x - 1)^+.

The heat equation solution is a Gaussian convolution. Evaluate the convolution, undo the change of variables, and out drops the Black-Scholes formula:

C(t,S;K)=SN(d1)KerτN(d2),C(t,S;K) = S\,N(d_1) - K e^{-r\tau} N(d_2), d1,2=ln(S/K)+(r±12σ2)τστ,τ=Tt,d_{1,2} = \frac{\ln(S/K) + (r \pm \tfrac{1}{2}\sigma^2)\tau}{\sigma\sqrt{\tau}},\qquad \tau=T-t,

where N()N(\cdot) is the standard normal CDF. The put follows by put-call parity,

P(t,S;K)=KerτN(d2)SN(d1).P(t,S;K) = K e^{-r\tau} N(-d_2) - S N(-d_1).

PDE intuition. The change of variables strips out drift and discounting so only diffusion remains in log-moneyness. It's the same bell curve from the random-walk limit humming in a new key.

Black-Scholes call surface (K = 100, r = 3%, sigma = 25%)

Route B: Risk-neutral valuation (the probabilistic solve)

From post #2, under the physical measure P\mathbb P,

dSt=μStdt+σStdWt.dS_t = \mu S_t\, dt + \sigma S_t\, dW_t.

Define the market price of risk θ=(μr)/σ\theta = (\mu - r)/\sigma. Girsanov's theorem says the density process

Λt=exp ⁣(θWt12θ2t)\Lambda_t = \exp\!\Bigl(-\theta W_t - \tfrac{1}{2}\theta^2 t\Bigr)

tilts P\mathbb P to a new measure Q\mathbb Q so that

WtQ=Wt+θtW_t^{\mathbb Q} = W_t + \theta t

is a Brownian motion under Q\mathbb Q. Under Q\mathbb Q, the stock has drift rr:

dSt=rStdt+σStdWtQ.dS_t = r S_t\, dt + \sigma S_t\, dW_t^{\mathbb Q}.

Feynman-Kac then yields the valuation formula

V(t,S)=erτEQ[Φ(ST)St=S].V(t,S) = e^{-r\tau}\, \mathbb E^{\mathbb Q}\bigl[\Phi(S_T)\mid S_t=S\bigr].

For a European call, ST=Sexp ⁣((r12σ2)τ+στZ)S_T = S \exp\!\bigl((r-\tfrac{1}{2}\sigma^2)\tau + \sigma\sqrt{\tau}\,Z\bigr) with ZN(0,1)Z\sim\mathcal N(0,1) under Q\mathbb Q. Compute the expectation explicitly to recover the same C=SN(d1)KerτN(d2)C = S N(d_1) - K e^{-r\tau} N(d_2).

Measure-change intuition. Risk premiums move from the drift into the measure. Pricing becomes "discount the payoff under a world where every asset earns rr." In that world, volatility is the only knob the option cares about; μ\mu vanishes like a stage prop.

5010015020025000.0050.010.015
Physical densityRisk-neutral densityTerminal price densities (physical vs risk-neutral)Parameters: S0=100, K=100, sigma=25%, tau=1y

Delta hedging, replication, and where the PDE came from

Reprising the portfolio from post #4, hold +1 option and Δt-\Delta_t shares with Δt=V/S\Delta_t = \partial V/\partial S. Ito + the product rule give

dΠt=dVtΔtdSt=(Vt+12σ2St22VS2)dt.d\Pi_t = dV_t - \Delta_t\, dS_t = \Bigl(\frac{\partial V}{\partial t} + \tfrac{1}{2}\sigma^2 S_t^2 \frac{\partial^2 V}{\partial S^2}\Bigr)dt.

The dWtdW_t term vanishes by construction. No instantaneous risk \Rightarrow no-arbitrage dΠt=rΠtdt\Rightarrow d\Pi_t = r \Pi_t dt \Rightarrow the PDE above. Solve the PDE and the delta that makes the hedge work is, mechanically,

Δcall(t,S)=CS=N(d1),Δput(t,S)=Δcall1=N(d1)1.\Delta_{\text{call}}(t,S) = \frac{\partial C}{\partial S} = N(d_1),\qquad \Delta_{\text{put}}(t,S) = \Delta_{\text{call}} - 1 = N(d_1) - 1.

In discrete time the hedge is imperfect. Over a small Δt\Delta t,

P&Lhedged12Γ(ΔS)2ΘΔtfinancing,\text{P\&L}_{\text{hedged}} \approx \tfrac{1}{2}\,\Gamma\,(\Delta S)^2 - \Theta\,\Delta t - \text{financing},

where Γ=2V/S2\Gamma=\partial^2 V/\partial S^2 and Θ=V/t\Theta=-\partial V/\partial t. With continuous rebalancing and no costs this error vanishes; with discrete rebalancing and frictions it does not--which is where real trading lives.

00.20.40.60.81020406080100−1−0.50
SpotOption (theoretical)Delta hedge portfolioHedging errorDelta hedge backtest (mu 6%, r 3%, sigma 25%, weekly rebalance)Hedging error

Greeks at a glance (for intuition, not worship)

Let ϕ()\phi(\cdot) be the standard normal pdf.

  • Delta. Δ=N(d1) \Delta = N(d_1) (call), N(d1)1N(d_1)-1 (put). Sensitivity to spot. It is the replicating weight.
  • Gamma. Γ=ϕ(d1)Sστ. \Gamma = \dfrac{\phi(d_1)}{S\sigma\sqrt{\tau}}. Curvature in spot; source of hedging error when you hedge discretely.
  • Vega. V=Vσ=Sϕ(d1)τ. \mathcal V = \dfrac{\partial V}{\partial \sigma} = S \phi(d_1)\sqrt{\tau}. Sensitivity to implied vol; symmetric for calls and puts.
  • Theta. Θcall=Sϕ(d1)σ2τrKerτN(d2). \Theta_{\text{call}} = -\dfrac{S\phi(d_1)\sigma}{2\sqrt{\tau}} - r K e^{-r\tau} N(d_2). Time decay (typically negative).
  • Rho. ρcall=τKerτN(d2). \rho_{\text{call}} = \tau K e^{-r\tau} N(d_2). Sensitivity to rates (small unless long-dated).

Connection. Θ+12σ2S2Γ=r(VSΔ)\Theta + \tfrac{1}{2}\sigma^2 S^2 \Gamma = r(V - S\Delta). It's the PDE rearranged--the "theta-gamma-carry" identity traders scribble on whiteboards.

00.20.40.60.81−0.200.20.40.6
DeltaGammaTheta (per day)Greek timeline (S=100, K=100, sigma=25%, r=3%)

Interpretations worth keeping

  • Replication. The option is the present value of a self-financing stock+cash strategy that reproduces the payoff. That's "no arbitrage" in plain clothes.
  • Risk-neutrality. Prices are discounted Q\mathbb Q-expectations. Pick the bank account as numeraire and everything earns rr on average; switch numeraires if a forward or bond makes life easier.
  • Diffusion worldview. The heat-equation proof says Black-Scholes is a diffusion with Gaussian smoothing in log-space. That's why the log shows up in d1,d2d_1,d_2, and why the CLT from post #1 keeps humming in the background.

Extensions (the small print)

  • Continuous dividends (or carry qq). Replace rr with rqr-q in drift terms and SS with SeqτS e^{-q\tau} in the formula: C=SeqτN(d1)KerτN(d2)C = S e^{-q\tau} N(d_1) - K e^{-r\tau} N(d_2) with d1,2d_{1,2} using rqr-q.
  • Forwards as numeraire. Pricing in the forward measure makes moneyness ln(F/K)\ln(F/K) central, with F=Se(rq)τF = S e^{(r-q)\tau}. It cleans up term-structure effects and generalizes well.
  • Beyond GBM. Smiles and skews reveal that markets want stochastic/local volatility and jumps. Black-Scholes is the zeroth-order approximation around which we perturb and calibrate.

Extra notes

  • Library of identities. With ZN(0,1)Z\sim\mathcal N(0,1), N(z)=1N(z)N(-z)=1-N(z) and ϕ(z)=12πez2/2\phi(z)=\frac{1}{\sqrt{2\pi}}e^{-z^2/2}. Handy when massaging Greeks or parity.
  • Feynman-Kac links the routes. The PDE solution and the Q\mathbb Q-expectation are the same object; FK is the bridge between calculus and probability.
  • On limitations. Continuous rebalancing, zero costs, constant σ\sigma, lognormal tails, complete markets. Realistic models relax at least one. More realism = more work, and usually better hedges.
  • Series map. If you landed here first, start at /brownian-motion-as-a-symmetric-random-walk-limit, then /stochastic-differential-equations-geometric-brownian-motion and /itos_lemma; the PDE machinery lives in /black-scholes-pde.