Quant Memo
Advanced

The Feynman-Kac Theorem

The bridge between PDEs and expectations, why the solution of a parabolic PDE equals a discounted expectation of a diffusion's terminal payoff, derived by making a discounted process a martingale, and why it makes the Black-Scholes PDE and the pricing integral the same thing.

Prerequisites: Itô's Lemma, Risk-Neutral Pricing

Feynman-Kac is the theorem that says two apparently different objects are the same: the solution of a certain partial differential equation, and the expected value of a payoff along a random path. It is the reason Black-Scholes can be derived either as a PDE (via delta-hedging) or as a discounted risk-neutral expectation, Feynman-Kac guarantees the two routes give the identical price. It is the formal dictionary between the analyst's world of PDEs and the probabilist's world of expectations, and it underlies every Monte-Carlo-versus-PDE choice a quant makes.

The statement

Let XtX_t be a diffusion dXt=μ(Xt,t)dt+σ(Xt,t)dWtdX_t = \mu(X_t,t)\,dt + \sigma(X_t,t)\,dW_t, and suppose u(x,t)u(x,t) solves the backward parabolic PDE

ut+μ(x,t)ux+12σ2(x,t)2ux2r(x,t)u=0,\frac{\partial u}{\partial t} + \mu(x,t)\frac{\partial u}{\partial x} + \tfrac12\sigma^2(x,t)\frac{\partial^2 u}{\partial x^2} - r(x,t)\,u = 0,

with terminal condition u(x,T)=ϕ(x)u(x,T) = \phi(x). Then uu has the probabilistic representation

u(x,t)=E ⁣[etTr(Xs,s)dsϕ(XT)    Xt=x].\boxed{\,u(x,t) = \mathbb{E}\!\left[\,e^{-\int_t^T r(X_s,s)\,ds}\,\phi(X_T)\;\Big|\;X_t = x\right].\,}

The PDE and the expectation are two faces of the same function. The differential operator L=μx+12σ2xx\mathcal{L} = \mu\,\partial_x + \tfrac12\sigma^2\,\partial_{xx} is the generator of the diffusion; the ru-ru term is discounting; the terminal condition is the payoff.

Derivation: discount, then martingalize

The proof is a one-line application of Itô's lemma plus the observation that a driftless Itô process is a martingale. Define the discounted process

Mt=e0tr(Xs,s)dsu(Xt,t).M_t = e^{-\int_0^t r(X_s,s)\,ds}\,u(X_t, t).

Apply Itô, treating the discount factor and u(Xt,t)u(X_t,t) as a product (the discount factor has finite variation, so no extra covariation term):

dMt=e0trds[(ut+μux+12σ2uxxru)=0 by the PDEdt+σuxdWt].dM_t = e^{-\int_0^t r\,ds}\Big[\underbrace{\big(u_t + \mu u_x + \tfrac12\sigma^2 u_{xx} - r\,u\big)}_{=\,0\ \text{by the PDE}}\,dt + \sigma u_x\,dW_t\Big].

The entire dtdt drift is precisely the left side of the PDE, which is zero. So dMt=erσuxdWtdM_t = e^{-\int r}\sigma u_x\,dW_t, a driftless process, hence (under integrability) a martingale. The martingale property Mt=E[MTFt]M_t = \mathbb{E}[M_T \mid \mathcal{F}_t] then gives, using u(XT,T)=ϕ(XT)u(X_T,T) = \phi(X_T),

e0trdsu(Xt,t)=E ⁣[e0Trdsϕ(XT)Ft].e^{-\int_0^t r\,ds}\,u(X_t,t) = \mathbb{E}\!\left[e^{-\int_0^T r\,ds}\,\phi(X_T)\,\Big|\,\mathcal{F}_t\right].

Divide by the discount to time tt and set Xt=xX_t = x to recover the boxed formula. The PDE was exactly the condition that makes the discounted value a martingale, which is the same condition as no-arbitrage pricing.

Why the Black-Scholes PDE equals a discounted expectation

Specialize to the Black-Scholes setting: under the risk-neutral measure Q\mathbb{Q}, the stock has generator with drift rSrS and diffusion σS\sigma S, and constant discount rr. Feynman-Kac with μ=rS\mu = rS, σX=σS\sigma_X = \sigma S, ϕ(S)=(SK)+\phi(S) = (S-K)^+ says the solution of

Vt+rSVS+12σ2S2VSSrV=0,V(S,T)=(SK)+V_t + rS\,V_S + \tfrac12\sigma^2 S^2 V_{SS} - rV = 0, \qquad V(S,T) = (S-K)^+

is exactly

V(S,t)=er(Tt)EQ[(STK)+St=S].V(S,t) = e^{-r(T-t)}\,\mathbb{E}^{\mathbb{Q}}\big[(S_T - K)^+ \mid S_t = S\big].

The delta-hedging derivation produces the PDE; Feynman-Kac converts it to the expectation, which the lognormal integral evaluates to SN(d1)Ker(Tt)N(d2)SN(d_1) - Ke^{-r(T-t)}N(d_2). The two "derivations" of Black-Scholes are not independent results, Feynman-Kac is the theorem that makes them provably identical.

Both directions

The dictionary runs both ways, and quants exploit each:

  • PDE \to expectation: when a diffusion is easy to simulate but the PDE is high-dimensional or the payoff is path-dependent, price by Monte Carlo of the expectation. This is why Feynman-Kac is the theoretical license for Monte Carlo pricing.
  • Expectation \to PDE: when the state space is low-dimensional (one or two factors) and you want the whole solution surface, boundary behaviour, or early-exercise (American) features, solve the PDE by finite differences. The curse of dimensionality decides: PDEs win in 1–3 factors, Monte Carlo wins in high dimension.

Worked example

Price a claim paying ϕ(ST)=ST2\phi(S_T) = S_T^2 (a "power" payoff) under Q\mathbb{Q} with dS=rSdt+σSdWdS = rS\,dt + \sigma S\,dW. Rather than solve the PDE, use the expectation side directly. Since ST=S0exp((r12σ2)T+σWT)S_T = S_0\exp((r-\tfrac12\sigma^2)T + \sigma W_T),

V0=erTEQ[ST2]=erTS02e2(r12σ2)TE[e2σWT]=erTS02e(2rσ2)Te2σ2T=S02e(r+σ2)T.V_0 = e^{-rT}\mathbb{E}^{\mathbb{Q}}[S_T^2] = e^{-rT}S_0^2\,e^{2(r-\frac12\sigma^2)T}\,\mathbb{E}[e^{2\sigma W_T}] = e^{-rT}S_0^2\,e^{(2r-\sigma^2)T}\,e^{2\sigma^2 T} = S_0^2\,e^{(r+\sigma^2)T}.

You can verify this solves the Black-Scholes PDE with terminal condition S2S^2, the two agree, which is Feynman-Kac in action. Notice the price grows with σ2\sigma^2: a convex payoff is long volatility, exactly as the PDE's 12σ2S2VSS\tfrac12\sigma^2 S^2 V_{SS} term (with VSS=2>0V_{SS} = 2 > 0) predicts.

What breaks in practice

  • Regularity and growth conditions. The clean theorem needs μ,σ\mu,\sigma Lipschitz and ϕ\phi of controlled growth; kinked payoffs like (SK)+(S-K)^+ are handled in the viscosity/weak sense, and blow-up payoffs can make the expectation infinite even when the PDE looks fine.
  • Early exercise breaks the equivalence. American options are a free-boundary PDE (variational inequality), and the naive Feynman-Kac expectation must be replaced by an optimal-stopping representation, u=supτE[erτϕ(Xτ)]u = \sup_\tau \mathbb{E}[e^{-r\tau}\phi(X_\tau)], the source of all the difficulty in American/Bermudan pricing.
  • Jumps. With jumps the "PDE" becomes a partial integro-differential equation (PIDE) and the generator gains a non-local term; standard Feynman-Kac is for pure diffusions.
  • Dimensionality. The theorem is exact in any dimension, but solving the PDE numerically suffers the curse of dimensionality above ~3–4 factors, forcing the Monte Carlo (expectation) route.

In interviews

State the correspondence: the solution of the discounted backward PDE ut+μux+12σ2uxxru=0u_t + \mu u_x + \tfrac12\sigma^2 u_{xx} - ru = 0 with terminal ϕ\phi equals the discounted expectation E[erϕ(XT)]\mathbb{E}[e^{-\int r}\phi(X_T)]. The derivation they want is the martingale argument: apply Itô to the discounted u(Xt,t)u(X_t,t), note the drift is the PDE and vanishes, so the process is a martingale, then take expectations. The payoff line: this is why the Black-Scholes PDE and the risk-neutral pricing integral are the same object, and why you can price either by finite-difference PDE or by Monte Carlo, the choice being dimensionality. A good closer is the American caveat: early exercise turns it into optimal stopping, which Feynman-Kac in its basic form does not cover.

Related concepts

Practice in interviews

Further reading

  • Shreve, Stochastic Calculus for Finance II (Ch. 6)
  • Øksendal, Stochastic Differential Equations (Ch. 8)
  • Karatzas & Shreve, Brownian Motion and Stochastic Calculus
ShareTwitterLinkedIn