where W is a Brownian motion and the coefficients μ,σ:R→R are Lipschitz continuous. Under this assumption the equation has a unique solution for every starting point, and X is a Markov process: given Xt, the future of X does not depend on the earlier path. Write Et,x[⋅]=E[⋅∣Xt=x].
The generator of X is the operator that gives the expected rate of change of f(X) at a point. For twice continuously differentiable f with compact support,
Lf(x)=h↓0limhE0,x[f(Xh)]−f(x).
Itô's lemma computes it. Integrating df(Xs) over [0,h],
The integrand σf′ is bounded on the support of f, so the Itô integral has mean zero. Taking expectations, dividing by h and letting h→0 (the ds-integrand is continuous) gives
Lf(x)=μ(x)f′(x)+21σ2(x)f′′(x).
The drift contributes a first-derivative term and the diffusion a second-derivative term; the 21σ2 is the Itô correction. Examples: Brownian motion with volatility σ has L=21σ2∂xx; geometric Brownian motion under Q has Lf=rxf′+21σ2x2f′′. The same computation without the limit gives Dynkin's formula, E0,x[f(Xt)]=f(x)+E0,x[∫0tLf(Xs)ds].
The Kolmogorov backward equation
Fix a horizon T and a payoff function g, and define v(t,x)=Et,x[g(XT)]. By the Markov property, v(s,Xs)=E[g(XT)∣Fs] for t≤s≤T, so s↦v(s,Xs) is a martingale. If v is once differentiable in t and twice in x, Itô's lemma gives
A continuous martingale whose ds-part is not identically zero cannot exist, since a process of finite variation that is also a continuous martingale is constant. So the ds-term must vanish, which gives the Kolmogorov backward equation
∂tv+Lv=0on [0,T)×R,v(T,x)=g(x).
It runs backwards: the terminal condition is given at T and the equation is solved towards t=0. If X has a transition density p(t,x;T,y), that density solves the backward equation in (t,x), and in the forward variables (T,y) it solves the Kolmogorov forward (Fokker–Planck) equation
∂Tp=−∂y(μ(y)p)+21∂yy(σ2(y)p).
The backward equation describes how an expected payoff depends on the starting point; the forward equation describes how probability mass spreads out from a fixed starting point.
The Feynman–Kac theorem
Add a discount rate r(x)≥0, continuous. Theorem (Feynman–Kac). Let μ,σ be Lipschitz and let u(t,x), once continuously differentiable in t and twice in x, solve
Assume also that Et,x[∫tT(σ(Xs)∂xu(s,Xs))2ds]<∞, which holds, for example, if σ∂xu is bounded. Then
u(t,x)=Et,x[e−∫tTr(Xs)dsg(XT)].
Proof. Fix (t,x) and set Ds=e−∫tsr(Xv)dv and Ys=Dsu(s,Xs) for s∈[t,T]. The factor D has finite variation, dDs=−r(Xs)Dsds, so the product rule has no cross term. With Itô's lemma for u(s,Xs),
The ds-term is zero because u solves the equation. Since 0<Ds≤1, the integrability assumption makes Y an Itô integral of an L2 integrand, hence a martingale. Therefore u(t,x)=Yt=Et,x[YT]=Et,x[DTg(XT)], using u(T,⋅)=g. □
The proof also shows uniqueness: two solutions in the integrability class equal the same expectation. The converse direction, that the expectation is smooth enough to solve the equation, needs more, for example smooth coefficients and σ bounded away from zero; under such conditions the expectation is the solution. Think of u(s,Xs) as a fair value carried along the path: discounted, it neither drifts up nor down, so its value today is the expected discounted value at maturity.
Feynman–Kac: the solution of ∂tu+Lu−ru=0, u(T,⋅)=g, is u(t,x)=Et,x[e−∫tTr(Xs)dsg(XT)]. The proof is Itô's lemma plus the fact that a dW-integral is a martingale.
The heat equation
Take μ=0, constant σ and r=0. Then XT=x+σ(WT−Wt), and with the time to maturity τ=T−t the theorem reads
This is the heat equation, and the solution is the payoff smoothed by a Gaussian kernel of variance σ2τ. Differentiating the kernel confirms that it solves the equation. Three payoffs have closed forms, with s=στ and d=(x−1)/s:
Square, g(x)=x2: u=x2+σ2τ. Check: ∂τu=σ2 and 21σ2∂xxu=21σ2⋅2=σ2.
Digital, g(x)=1{x>1}: u=Φ(d), the probability that x+σWτ ends above 1.
Call, g(x)=(x−1)+: u=(x−1)Φ(d)+sφ(d), the Bachelier price with zero interest.
Worked numbers at x=1 with τ=0.5 and σ=1, so s=0.5≈0.7071 and d=0: the call is worth sφ(0)=0.7071×0.3989≈0.2821, the digital Φ(0)=0.5, the square 1+0.5=1.5. A Monte Carlo estimate from 2000 draws of Wτ has standard error equal to the payoff's standard deviation over 2000: about 0.4128/44.72≈0.0092 for the call, 0.5/44.72≈0.0112 for the digital and 2.5/44.72≈0.0354 for the square.
The figure solves this heat equation for the chosen payoff: call (x−1)+, digital 1{x>1} or square x2. Against x from −2 to 4 it plots the payoff g (dashed), the exact solution u(τ,x) from the Gaussian integral (line), and Monte Carlo estimates at 13 points x from 2000 draws each (dots). Increase τ or σ and note that the kink of the call and the jump of the digital are smoothed out more, while the square is shifted up by σ2τ. The dots stay on the line within sampling noise. The readouts at x=1 give the exact u, the Monte Carlo estimate and its standard error.
By "Change of measure and Girsanov's theorem", under Q the stock follows dSs=rSsds+σSsdW~s with constant r and σ, and the price of a payoff g(ST) is V(t,S)=Et,SQ[e−r(T−t)g(ST)]. This is a Feynman–Kac expectation with μ(S)=rS, σ(S)=σS and constant discount rate r, so V solves the Black–Scholes equation
∂t∂V+rS∂S∂V+21σ2S2∂S2∂2V−rV=0,V(T,S)=g(S).
For a call, g(S)=(S−K)+, and the expectation is the formula of "The Black–Scholes formula". The real-world drift μ does not appear anywhere, because the generator is taken under Q. The substitution x=lnS turns the generator into (r−21σ2)∂x+21σ2∂xx, which has constant coefficients; after removing the drift and the discounting the equation becomes the heat equation, which is why the Black–Scholes formula is built from the normal CDF N(⋅).
Numerical check with S=K=100, r=5%, σ=20%, T=1: the call price is C=10.4506 with Δ=N(d1)=0.6368, Γ=0.018762 and ∂C/∂t=−6.4140. The terms of the equation are −6.4140+3.1842+3.7524−0.5225=0.0001, zero up to rounding.
Two ways to compute one number
Feynman–Kac gives two routes to the same price. The Monte Carlo route simulates many paths of X under Q, averages the discounted payoffs and reports a standard error that falls like 1/N in the number of paths, whatever the dimension of X. The PDE route discretises x and t on a grid and steps the equation backwards from u(T,⋅)=g with finite differences; one solve gives u at every grid point, and the Greeks come from differences of neighbouring values, but the grid grows exponentially with the dimension of X. In practice PDE methods dominate for one to three state variables and Monte Carlo for more. Any difference between the two answers is numerical error, sampling error on one side and grid error on the other, not a difference in the model.
Summary
A diffusion dX=μ(X)ds+σ(X)dW has generator Lf=μf′+21σ2f′′, computed from Itô's lemma.
v(t,x)=Et,x[g(XT)] solves the Kolmogorov backward equation ∂tv+Lv=0, v(T,⋅)=g; transition densities solve the forward equation in (T,y).
Feynman–Kac: the solution of ∂tu+Lu−ru=0, u(T,⋅)=g, is the discounted expectation of g(XT). Proof: the discounted value e−∫ru(s,Xs) has no drift, so it is a martingale.
With μ=0, constant σ and r=0 it is the heat equation, solved by Gaussian smoothing of the payoff. Under Q with GBM it is the Black–Scholes equation.
Monte Carlo and finite-difference pricing compute the same number from the two sides of the theorem.
The next lesson, "Monte Carlo option pricing", takes the expectation side: it simulates terminal prices under Q and studies the standard error of the average.