Phase 9 - Lesson 9.5

The Feynman–Kac Theorem and the PDE Connection

How a conditional expectation solves a partial differential equation, and vice versa.

⏱ 50 min● Advanced🔗 Prereqs: 9.2, 9.3
↖ Phase 9 hub
Builds on: 9.2 Itô and 9.3 SDEs give the tools; 9.4 set up \(\mathbb{Q}\).
Leads to: 9.6 identifies this PDE as the Black–Scholes equation.

Learning Objectives

Click a status chip to cycle: Not started → In progress → Studied → Practiced → Needs review → Mastered.

Key Vocabulary

Feynman–Kac
The identity: the solution of a linear parabolic PDE equals an expectation over a diffusion path.
Value function
The function \(v(t,x)=\E[\text{payoff}\mid X_t=x]\) (possibly discounted) that solves the PDE.
Terminal condition
The payoff \(v(T,x)=h(x)\) that anchors the backward PDE at maturity.
Killing / discount rate
The \(-rv\) term; it discounts (or ‘kills’) value at rate \(r\) along the path.
Infinitesimal generator
The operator \(\mathcal{L}=a\partial_x+\tfrac12 b^2\partial_{xx}\) governing the diffusion's dynamics.
Parabolic PDE
A PDE of heat-equation type: first order in time, second order in space.

Intuition & Motivation

Intuition
Two seemingly different questions - ‘solve this diffusion PDE’ and ‘average this payoff over random paths’ - have the same answer. The bridge is Itô: if \(v(t,X_t)\) (discounted) is a martingale, then its expected future value equals its present value, which is a conditional expectation; and ‘being a martingale’ means its Itô drift vanishes, which is precisely a PDE. Expectation and PDE are two faces of the same coin.

The theorem

Theorem - Feynman–Kac
Suppose \(dX_u=a(u,X_u)\,du+b(u,X_u)\,dW_u\) and define \(v(t,x)=\E\big[e^{-\int_t^T r\,du}\,h(X_T)\mid X_t=x\big].\) Then \(v\) solves the terminal-value PDE
\[v_t+a(t,x)\,v_x+\tfrac12 b(t,x)^2 v_{xx}-r\,v=0,\qquad v(T,x)=h(x).\] (9.7)

Read it backward in time from the payoff \(h\) at \(T\). The operator \(\mathcal{L}v=a v_x+\tfrac12 b^2 v_{xx}\) is the generator of the diffusion; the \(-rv\) term does the discounting.

Worked Example - Deriving the PDE via Itô
1
Consider the discounted value \(M_t=e^{-\int_0^t r\,du}\,v(t,X_t)\). By construction (tower property) \(M_t\) is a martingale.
2
Apply Itô to \(v(t,X_t)\): \(dv=(v_t+a v_x+\tfrac12 b^2 v_{xx})dt+b v_x\,dW.\)
3
Then \(dM=e^{-\int r}\big[(v_t+a v_x+\tfrac12 b^2 v_{xx}-r v)dt+b v_x\,dW\big].\)
4
A martingale has zero drift. Setting the \(dt\) coefficient to zero gives PDE (9.7); the surviving \(dW\) term is the martingale part.
Worked Example - Sanity check on the heat equation
1
Take \(a=0,\ b=1,\ r=0\), so \(X=W\) and (9.7) becomes \(v_t+\tfrac12 v_{xx}=0\) with \(v(T,x)=h(x)\).
2
Feynman–Kac says \(v(t,x)=\E[h(W_T)\mid W_t=x]=\E[h(x+W_{T-t})]\), an average against a \(\Normal(0,T-t)\) kernel.
3
That is the classical solution of the (backward) heat equation by Gaussian convolution - exactly matching (9.7).

Predict the drift

Predict first: In the Feynman–Kac PDE used for pricing, is the drift coefficient \(a\) the physical drift \(\mu\) or the risk-free rate \(r\)?
Key Idea
Because pricing expectations are taken under \(\mathbb{Q}\), the \(a\) in (9.7) is the risk-neutral drift \(rx\) for a stock. This is why an option's price does not depend on the stock's real-world expected return \(\mu\).
Common Mistakes to Avoid
  • Solving the PDE forward in time. It is a terminal-value problem: integrate backward from \(v(T,\cdot)=h\).
  • Dropping the \(-rv\) term - that omits discounting and misprices.
  • Using the physical drift \(\mu\) in the PDE when pricing; it must be the risk-neutral drift \(r\).
  • Forgetting \(v_t\); the value function depends on time-to-maturity, which is the whole dynamic.
Quant Practitioner Tips
  • Memorize the pattern: martingale \(\Leftrightarrow\) zero Itô drift \(\Leftrightarrow\) PDE. It recurs throughout pricing.
  • Feynman–Kac lets you price by Monte Carlo (average paths) OR by PDE solvers - pick whichever is cheaper for the problem.
  • The generator \(\mathcal{L}=a\partial_x+\tfrac12 b^2\partial_{xx}\) is worth recognizing on sight; Itô always produces it.

Knowledge Check

Q1 Medium
Feynman–Kac says the solution of \(v_t+av_x+\tfrac12 b^2 v_{xx}-rv=0,\ v(T,\cdot)=h\) equals:
\(\E[h(X_T)\mid X_t=x]\)
\(\E[e^{-\int_t^T r\,du}h(X_T)\mid X_t=x]\)
\(h(x)\)
\(e^{-r(T-t)}h(x)\)
Q2 Easy
The PDE arises from Itô because a martingale must have:
Zero volatility
Zero drift
Constant value
Positive drift
Q3 Medium
When Feynman–Kac is used for option pricing, the drift in the PDE is:
The physical drift \(\mu\)
The risk-free rate \(r\)
Zero
The dividend yield

Practical Exercise

Let \(dX=\theta(m-X)dt+\sigma\,dW\) (an Ornstein–Uhlenbeck process) and \(v(t,x)=\E[X_T\mid X_t=x]\). (a) Write the Feynman–Kac PDE (here \(h(x)=x,\ r=0\)). (b) Guess \(v(t,x)=m+(x-m)e^{-\theta(T-t)}\) and verify it solves the PDE.

▶ Show full solution

(a) \(v_t+\theta(m-x)v_x+\tfrac12\sigma^2 v_{xx}=0\), \(v(T,x)=x\).

(b) With \(v=m+(x-m)e^{-\theta(T-t)}\): \(v_x=e^{-\theta(T-t)}\), \(v_{xx}=0\), \(v_t=-\theta(x-m)e^{-\theta(T-t)}\). Substitute: \(-\theta(x-m)e^{-\theta(T-t)}+\theta(m-x)e^{-\theta(T-t)}+0=0\) since \(\theta(m-x)=-\theta(x-m)\). And \(v(T,x)=m+(x-m)=x\). Verified; this is the mean-reversion formula.

After the reveal, answer for yourself: How does the \(e^{-\theta(T-t)}\) factor encode mean reversion toward \(m\)?

Lesson Summary

Feynman–Kac equates the solution of a linear parabolic PDE with a discounted expectation over diffusion paths. Apply Itô to the (discounted) value function and force zero drift: the \(dt\) term is the PDE \(v_t+av_x+\tfrac12 b^2 v_{xx}-rv=0\), the \(dW\) term is its martingale part. In pricing, the drift is the risk-neutral \(r\), so option prices ignore \(\mu\).

Retrieval Practice

Close the lesson and answer from memory before checking. This is deliberate, effortful recall - the single highest-yield study action.

▶ Show retrieval prompts & answers
Q: State the Feynman–Kac correspondence in one sentence.
A: The solution of \(v_t+av_x+\tfrac12 b^2 v_{xx}-rv=0\) with terminal data \(h\) equals the discounted expectation \(\E[e^{-\int_t^T r}h(X_T)\mid X_t=x]\).
Q: How does the PDE fall out of Itô?
A: Apply Itô to the discounted value function; since it is a martingale its drift must vanish, and the zero-drift condition is exactly the PDE.

Completion Checklist

Confidence / mastery rating
Personal notes

Source References

This lesson synthesizes and paraphrases concepts from the sources below. No copyrighted text, problem sets, or solutions are reproduced. Return to the originals for full depth.