Feynman-Kac Formula
The Feynman-Kac formula says that the expected discounted value of a future payoff solves a partial differential equation (PDE) in today’s state and time. It also says that a solution of that PDE is such an expected value. Let follow the Itô process , let be a payoff paid at time , and let be a constant discount rate. The expected payoff discounted to time , given that the process is at at time , is
The expectation uses the dynamics given by and . Then solves the PDE
Conversely, a solution of this PDE with final condition equals the expectation, so there is only one such solution. Both directions need regularity conditions. The coefficients and must change at a bounded rate as changes, and grow at most in proportion to . These conditions give the process a unique solution that stays finite. The payoff and the solution must grow at most like a power of . The forward direction also needs to have the partial derivatives in the PDE. The PDE is the condition under which has no drift, which makes it a martingale. With , , and the PDE is the 2.3.3e Black-Scholes-Merton Equation, and is the risk-neutral price. With , , and it is the heat equation.
Not Taught in Lecture
The name Feynman-Kac and the general formula go beyond IEOR 221. Module 8 derives the Black-Scholes-Merton case. It turns the BSM equation into the heat equation, solves that equation with a Gaussian kernel, and reads the solution as a discounted risk-neutral expectation.
Intuition
The Black-Scholes-Merton call price can be found in two ways. The first hedges the call, which gives the BSM equation, and solves that equation with the payoff as the final condition. The second averages the payoff over stock prices that grow at the risk-free rate and discounts the average, as in 2.3.3f Black-Scholes-Merton Formula. Both give . One route solves a differential equation, and the other computes an integral. The Feynman-Kac formula explains why they give the same function.
A tree shows the link in discrete time. On a binomial tree, the value at each node is the discounted average of the two values one step later. Applied node by node, backward from , this rule gives the discounted expected payoff at the root. Take the simplest case. A variable starts at and moves up or down by in each of three steps, with probability each. The payoff at is , and there is no discounting.
\usepackage{tikz}
\begin{document}
\definecolor{hot}{HTML}{D9483B}
\definecolor{cold}{HTML}{2F80ED}
\begin{tikzpicture}[>=latex]
\draw (0.00,0.000) -- (2.30,1.150); \draw (0.00,0.000) -- (2.30,-1.150);
\draw (2.30,-1.150) -- (4.60,0.000); \draw (2.30,-1.150) -- (4.60,-2.300);
\draw (2.30,1.150) -- (4.60,2.300); \draw (2.30,1.150) -- (4.60,0.000);
\draw (4.60,-2.300) -- (6.90,-1.150); \draw (4.60,-2.300) -- (6.90,-3.450);
\draw (4.60,0.000) -- (6.90,1.150); \draw (4.60,0.000) -- (6.90,-1.150);
\draw (4.60,2.300) -- (6.90,3.450); \draw (4.60,2.300) -- (6.90,1.150);
\fill (0.00,0.000) circle (2pt); \node[above] at (0.00,0.020) {$0$}; \node[cold,below] at (0.00,-0.020) {$3$};
\fill (2.30,-1.150) circle (2pt); \node[above] at (2.30,-1.130) {$-1$}; \node[cold,below] at (2.30,-1.170) {$3$};
\fill (2.30,1.150) circle (2pt); \node[above] at (2.30,1.170) {$1$}; \node[cold,below] at (2.30,1.130) {$3$};
\fill (4.60,-2.300) circle (2pt); \node[above] at (4.60,-2.280) {$-2$}; \node[cold,below] at (4.60,-2.320) {$5$};
\fill (4.60,0.000) circle (2pt); \node[above] at (4.60,0.020) {$0$}; \node[cold,below] at (4.60,-0.020) {$1$};
\fill (4.60,2.300) circle (2pt); \node[above] at (4.60,2.320) {$2$}; \node[cold,below] at (4.60,2.280) {$5$};
\fill (6.90,-3.450) circle (2pt); \node[above] at (6.90,-3.430) {$-3$}; \node[hot,below] at (6.90,-3.470) {$9$};
\fill (6.90,-1.150) circle (2pt); \node[above] at (6.90,-1.130) {$-1$}; \node[hot,below] at (6.90,-1.170) {$1$};
\fill (6.90,1.150) circle (2pt); \node[above] at (6.90,1.170) {$1$}; \node[hot,below] at (6.90,1.130) {$1$};
\fill (6.90,3.450) circle (2pt); \node[above] at (6.90,3.470) {$3$}; \node[hot,below] at (6.90,3.430) {$9$};
\node at (0.00,4.40) {$t = 0$};
\node at (2.30,4.40) {$t = 1$};
\node at (4.60,4.40) {$t = 2$};
\node at (6.90,4.40) {$T = 3$};
\draw[->,thick] (6.90,-4.40) -- (0,-4.40);
\node[below] at (3.45,-4.45) {each value of $f$ is the average of the two values one step later};
\node[right] at (7.60,0.450) {above a node: $x$};
\node[cold,right] at (7.60,-0.050) {below: $f(x,t)$};
\node[hot,right] at (7.60,-0.550) {at $T$: $g(x) = x^2$};
\end{tikzpicture}
\end{document}At the values are , , , and . One step earlier, the node at has value . Every node has value plus the number of steps left, so . The root value is , the variance of a sum of three steps of . The rule at each node reads . This is a difference equation that links at neighboring points, the discrete version of a PDE.
Now shrink the steps. Over a short time , moves by with mean and variance about . The averaging rule with discounting is . Expanding to second order in , as in Itô’s lemma, gives
All terms are evaluated at , and the expansion uses and . Subtracting , dividing by , and letting leaves the PDE in the callout.
The formula is named after the physicist Richard Feynman and the mathematician Mark Kac, who found the link in the late 1940s. It turns an expectation into a PDE, and a PDE back into an expectation. In the callout, the time step gives . The average over the next move gives and . Discounting gives , and the payoff gives the final condition.
Properties
(Black-Scholes-Merton Case) The drift used in the expectation is read off the PDE, so the real drift cannot enter the price.
The BSM equation is
Read it with the pattern of the callout. The coefficient of is the drift , and the coefficient of is . So the expectation runs over , a stock that grows at the risk-free rate. This is risk-neutral valuation, , so the PDE price and the risk-neutral price are the same function. The real drift cancels in the hedging argument, so it is absent from the PDE and therefore from the expectation. If the PDE had instead, the formula would give the real-world expected payoff discounted at , which allows arbitrage. The coefficients and grow in proportion to , and call and put payoffs grow at most like , so the conditions hold.
(Heat Equation) With , , and , the formula solves the heat equation by a Gaussian average.
Here , and the PDE is . In the time to expiry it becomes , the heat equation, with as the starting temperature profile. Given , the value is normal with mean and variance . So the formula gives the solution as a Gaussian average,
The weight is the normal density centered at , and it spreads out as grows. So is smooth for every , even when has a corner. The 2.3.3e Black-Scholes-Merton Equation note turns the BSM equation into this heat equation by a change of variables. That is why a call price is a smooth curve before expiry even though its payoff has a kink at .
(Growth Conditions) Without a bound on growth, the PDE can have solutions that are not the expectation.
The heat equation with final condition has the solution , which matches the expectation . It also has other solutions, which grow faster than for every constant . The converse direction of the formula rules them out by requiring to grow at most like a power of . In the proof below, this bound is what lets the Itô integral keep its mean of zero. For pricing, it means that a numerical PDE solver needs boundary values that match the growth of the true price. A call price grows like for large , so solvers set at the upper edge of the grid and at .
(Two Numerical Routes) The formula gives two ways to compute a price: simulate the expectation, or solve the PDE on a grid.
Monte Carlo simulation draws independent values of and averages the discounted payoffs. By the law of large numbers the average converges to . By the central limit theorem its error is about normal with standard error , where is the sample standard deviation of the discounted payoffs. Halving the error takes four times as many draws. When has no closed form, each path is built from Euler steps, which adds a bias that shrinks with the step size. A PDE solver instead works backward from on a grid of and values. Its simplest version replaces each derivative by a difference between neighboring grid points, which gives an averaging rule like a tree. PDE solvers are fast and accurate for one or two state variables. They also handle early exercise, by comparing the value with the exercise payoff at each grid point. Monte Carlo is used when there are many state variables. Its error rate does not depend on the number of variables, while the number of grid points grows exponentially with it.
(Discounting at a Variable Rate) When the discount rate depends on the state, the formula discounts along each path, and the PDE has .
Replace by , the discount factor accumulated along the path. The same proof gives the PDE with in place of . Bond pricing with a random short rate uses this form. In the Vasicek model of 7.7 Ornstein-Uhlenbeck Process, the state is the short rate itself, with and . A zero-coupon bond that pays at has price
and solves
The last term discounts at the current short rate. For pricing, , , and must describe the rate under risk-neutral probabilities. With , this PDE has the closed-form solution , where
At both and are zero, so .
Derivation
We prove the converse direction first. Suppose solves the PDE with . Fix and start the process at . Apply Itô’s lemma to for between and . The factor is not random and contributes , so
All terms are evaluated at . The PDE makes the bracket zero at every point. Integrating from to leaves only the Itô integral,
Under the growth conditions, this Itô integral has mean zero (7.4 Ito Integral). Take expectations given and use :
Multiplying by gives .
For the forward direction, define by the expectation and assume it has the derivatives in the PDE. The process is the forecast at time of the fixed quantity , because is Markov. Forecasts of a fixed quantity, updated as information arrives, form a martingale, so has no drift. By Itô’s lemma the drift of is times the left side of the PDE, evaluated at . This drift must be zero wherever the process can be, which gives the PDE. At the forecast is the payoff itself, so .
Examples
(Easy) A Squared Wiener Payoff
A contract pays dollars at years, where is a Wiener process. There is no discounting. At the process is at .
Find , check that it solves with , and find the value of the contract now. Given , write . The increment has mean and variance , and it does not depend on the path so far. So The middle term is zero because the increment has mean . Write subscripts for partial derivatives. Then and , so . At , . The value now is 0.8^2 + 1.5 = \2.14x^2f = x^2f_t + \frac{1}{2}f_{xx} = 1$. It ignores the variance still to come.
(Medium) A Forward Contract Two Ways
A stock trades at \7530%\mu = 12%r = 5%K = $72S_T - K$.
Price the forward by solving the BSM equation and by the risk-neutral expectation. Then show what goes wrong if the expectation uses . The payoff is linear in , so try . Then and , and the BSM equation becomes This holds for every only if and . The final condition gives and . So and , and . With the numbers, , so f = 75 - 69.35 = \5.65$.
Under risk-neutral probabilities, . The expected payoff is , and discounting gives e^{-0.0375} \times 5.87 = \5.65$. The two routes agree, and the volatility plays no role in either.
The real-world mean is . Its discounted expected payoff is e^{-0.0375}(82.06 - 72) = \9.69\mu S,f_SrS,f_S$9.69$5.65$69.35$72$4.04$ today with no risk.
(Hard) A Cash-or-Nothing Digital Call
A stock trades at \6025%5%Q = $100K = $62$, and nothing otherwise.
Price the digital as a risk-neutral expectation, check that the price solves the BSM equation, and check the expectation by Monte Carlo simulation. . The payoff is . Under risk-neutral probabilities, , as in the derivation of the 2.3.3f Black-Scholes-Merton Formula. So Here is the standard normal CDF, written in 2.2c.3 Gaussian Distribution. With the numbers, , , and . So and . The discount factor is , and f = 100 \times 0.9632 \times 0.4655 = \44.84$.
Write
For the PDE, let be the standard normal density and . Since and ,
In , the factor contributes , and . Substitute into the left side of the BSM equation. The two terms cancel. What is left is times
The first equality uses . As , if and if , so . With the numbers, , , and . They sum to per year, and .For Monte Carlo, draw standard normals with NumPy’s
default_rng(221). Set and average . The estimate is \44.8796.32\sqrt{0.4655 \times 0.5345} = 48.0548.05/\sqrt{n} = $0.0480.68\mu = 12%r0.5620$54.13$, which is wrong for the reason shown in the (Medium) example.
See Also
- 2.3.3e Black-Scholes-Merton Equation, the PDE case that prices options.
- 2.3.3b Risk-Neutral Valuation, the expectation side of the formula.
- 2.3.3c Binomial Tree, the discrete-time version of the backward averaging rule.
- 2.3.6.1b Binary Options, for the cash-or-nothing digital call of the (Hard) example and its replication.
- 4.5 Martingales, since the discounted value process is a martingale.
- 7.7 Ornstein-Uhlenbeck Process, whose Vasicek bond prices solve the PDE with a variable rate.
- 7.5 Ito’s Lemma, the tool in the proof.