What the Feynman-Kac Formula Says
The Feynman-Kac formula represents the solution of a linear parabolic PDE as an expectation over diffusion paths. In derivatives pricing, it is the precise reason a risk-neutral Monte Carlo average and the corresponding pricing PDE describe the same claim.
The formula does not create the risk-neutral measure. That is the job of no-arbitrage arguments and, in Brownian models, Girsanov's theorem. Once a measure and Markov diffusion have been fixed, Feynman-Kac converts between their conditional expectation and a PDE.
Mark Kac's 1949 paper, On Distributions of Certain Wiener Functionals, credits Richard Feynman's path-integral work as an influence. The modern name joins two related ideas, but the rigorous probabilistic formula in this form is Kac's.
The Backward Formula
Let solve, from state ,
where is -dimensional and . Its spatial generator is
Consider the terminal-value problem
Under conditions ensuring a unique non-explosive diffusion, finite expectations and a sufficiently regular solution, Feynman-Kac gives
This version includes a source term . Setting leaves the discounted terminal payoff used most often in finance. The signs are linked: a PDE term produces , while produces a positive running-payoff integral.
A practical classical set of assumptions is that and are Lipschitz in the state with linear growth, is continuous and bounded below, the data have controlled growth, and . Weaker viscosity-solution versions exist, so these are sufficient conditions rather than the only possible ones.
Proof by a Discounted Martingale
Fix and define
and
Itô's formula gives
Since and has finite variation, there is no quadratic-covariation term with . Therefore
The PDE makes the drift zero. Subject to the required integrability, is a true martingale. Taking conditional expectations between and , then using , yields the representation.
The converse needs care. Defining by the expectation does not by itself prove . Regularity theory or a viscosity-solution argument is needed before the classical PDE conclusion follows.
A Heat-Equation Sanity Check
Before adding finance, take , no discount, no source term and terminal function . Starting from ,
so Feynman-Kac gives
The associated backward heat equation is
Direct differentiation verifies the signs:
The terms cancel and the terminal value is correct. Reversing the sign on would fail even this elementary test.
This example also shows why the generator carries a factor of one half. Brownian variance accumulates at one unit per unit time, and Itô's second-order correction is . If instead , the variance contribution becomes and the generator term becomes .
Backward and Forward Equations
Feynman-Kac here uses the backward Kolmogorov equation: are the current time and state, while the terminal payoff is fixed at . The generator acts on the current-state variable .
The forward Kolmogorov equation, also called the Fokker-Planck equation, evolves the transition density towards later time. It uses the adjoint generator . One can sometimes solve a pricing problem by finding that density and integrating the payoff, but that is a different PDE orientation from the terminal-value equation above.
Confusing the two usually produces a sign error in time or places derivatives on the wrong coefficients. A quick diagnostic is the data: a known payoff at maturity calls for the backward equation; a known probability density at the initial time calls for the forward equation.
Black-Scholes as Feynman-Kac
Under the bank-account pricing measure, a stock paying continuous dividend yield follows
For a European payoff , take , and
The value
solves
For a call, . This is the Black-Scholes PDE. The terminal payoff is not differentiable at , so a fully classical solution need not be smooth all the way to maturity. For , the lognormal transition density smooths the value.
Checked Call Example
Take , , , and . Under ,
Feynman-Kac says
Evaluating the lognormal integral gives
The units also line up. and are dimensionless, while the expectation and are in currency.
from statistics import NormalDist from math import exp, log, sqrt def black_scholes_call(s, k, r, q, sigma, tau): normal = NormalDist() d1 = (log(s / k) + (r - q + 0.5 * sigma**2) * tau) / (sigma * sqrt(tau)) d2 = d1 - sigma * sqrt(tau) return s * exp(-q * tau) * normal.cdf(d1) - k * exp(-r * tau) * normal.cdf(d2) print(black_scholes_call(100, 100, 0.05, 0.0, 0.20, 1.0)) # 10.4505835722
A Monte Carlo implementation estimates the expectation; a finite-difference solver estimates the PDE solution. Their numerical errors differ, but their population target is the same.
Running Cashflows and Killing
The source term is financially useful. If a contract pays a continuous cashflow rate until maturity and a terminal amount , its value is the sum of discounted running and terminal payments. The PDE records this as .
The coefficient is often a short rate, but it can also represent killing. If a state-dependent default intensity kills the claim with zero recovery, then under suitable reduced-form assumptions. Recovery payments belong in or in the terminal/boundary data, depending on the contract.
This interpretation is one reason signs matter. Writing in the PDE while retaining negative exponential discounting would describe a different equation.
When the short rate is stochastic, discounting remains inside the expectation:
Replacing this by is generally wrong because the discount factor and payoff can be correlated. A joint Markov state, for example stock and short rate together, supplies the generator and cross-derivative terms needed by the PDE.
Jumps, Boundaries and Path Dependence
For a jump-diffusion, the generator contains an integral. With a Lévy measure and a standard small-jump truncation, a one-dimensional term has the form
The corresponding equation is a partial integro-differential equation. Omitting the truncation without adjusting the drift can make the integral undefined.
Boundaries add another layer. A barrier, stopping time or domain exit requires boundary data and a stopped diffusion. For some path-dependent claims, augmenting the state with a finite-dimensional statistic works: an Asian option can track the running integral and a lookback can track the running maximum. An arbitrary path dependence may be genuinely infinite-dimensional, so "just add a state variable" is not a universal cure.
Semilinear PDEs can be represented by backward stochastic differential equations. Fully nonlinear equations generally require control, second-order BSDEs or other nonlinear expectation machinery. They are extensions of the idea, not the elementary linear Feynman-Kac theorem.
Where the Formula Is Misused
Feynman-Kac assumes a model and a measure; it does not establish that either is economically correct. A beautifully solved PDE can still price under a misspecified volatility process.
The basic formula is linear. American exercise leads to an obstacle problem and an optimal-stopping expectation, not the European terminal-value equation above. Longstaff-Schwartz approximates that stopping problem by regression.
Finally, equality of the mathematical targets does not imply equality of numerical estimates. A coarse PDE grid has truncation and boundary errors. Monte Carlo has sampling error and may have time-stepping bias. Both need independent convergence checks.
Frequently Asked Questions
Is Feynman-Kac a pricing theorem?
It is a probability-to-PDE representation theorem. It becomes a pricing result only after no-arbitrage theory has supplied an appropriate pricing measure and numeraire.
Why is the PDE backward in time?
The payoff is known at maturity , so it is a terminal condition. The conditional value is propagated from back to the current state .
What determines the sign of the discount term?
The factor corresponds to in the backward PDE. Changing one sign requires changing the other.
Does the terminal payoff need to be smooth?
Not necessarily. Vanilla option payoffs have kinks. Classical smoothness can hold before maturity through diffusion smoothing, while viscosity or weak solutions handle less regular data.
Does Feynman-Kac apply to nonlinear PDEs?
The classical expectation formula applies to linear PDEs. Semilinear and fully nonlinear equations need nonlinear generalisations such as BSDE or stochastic-control representations.
When should a quant use PDE rather than Monte Carlo?
PDE methods are attractive for a few Markov state variables and a full value surface. Monte Carlo scales better in dimension and for many path-dependent claims. Feynman-Kac says what they target, not which algorithm is cheaper.
Skip the £25k programme - try the alternative
Master's programmes are slow and expensive. Quantt is a self-paced alternative. Start free with a real lesson and interview practice, then unlock 50+ courses and your personalised plan.
Free to start · No credit card required