Feynman-Kac Formula
A PDE becomes an average over random paths: u(t,x) = E [e^-r(T-t)g(X_T) | X_t = x ].
The idea
Theorem (Feynman–Kac formula).
Let $dX = \mu(X)\,dt + \sigma(X)\,dW$ be an Itô process, and fix a horizon $T$, a payoff function $g$ and a rate $r$. If $u$ solves $u_{t} + \mu(x)\,u_{x} + \tfrac{1}{2}\sigma(x)^{2}\,u_{xx} - r\,u = 0, \qquad u(T, x) = g(x),$ then $u(t, x) = \mathbb{E}\big[e^{-r(T-t)}\,g(X_{T}) \mid X_{t} = x\big].$
The two sides are different kinds of object, and that is what makes the statement useful. The left side is deterministic: a condition on the slopes and curvatures of an unknown function, with no randomness in it, and for most choices of $\mu$ and $\sigma$ it has no closed-form solution. The right side is an average over the futures of a random process, and we can estimate it by running many paths and averaging the discounted payoff at their endpoints. Feynman–Kac says the two are the same number, so whichever side is tractable answers the other: an intractable equation becomes a simulation, and an intractable expectation becomes an equation.
The correspondence is term by term. The drift $\mu$ of the process is the coefficient of $u_{x}$; the volatility enters as $\tfrac{1}{2}\sigma^{2}$ against $u_{xx}$; the discount rate $r$ is the coefficient of $u$; and the payoff $g$ is the terminal condition. Given either side, this dictionary produces the other.
Ways to work on it
- Walkthrough. The plainest case first (Brownian motion and the backward heat equation), then the general formula and the option-pricing equation it yields.
- Proof. Itô's lemma on e^-rtu(t, X_t): the dt terms are the PDE itself, so they cancel and a martingale is left.
- Practice. Evaluate the expectation side, translate an SDE into its PDE and back, and set up the simulation the formula licenses.
- Hardest. Price a nonlinear contract on a lognormal stock by both routes, and see why volatility adds value.
Not sure where to start? Take the ten-question placement test.