Stochastic differential equations · Part 6 of 10

From SDEs to PDEs

· 5 min read

Expectations of functions of a diffusion solve partial differential equations, and solutions of many PDEs can be written as averages over diffusion paths. This post derives the dictionary between the two.

The generator

For the diffusion dXt=b(Xt) dt+σ(Xt) dBtdX_t = b(X_t)\,dt + \sigma(X_t)\,dB_t in one dimension, the generator is the differential operator

Lf(x)=b(x)f′(x)+12σ2(x)f′′(x).\mathcal{L}f(x) = b(x) f'(x) + \frac{1}{2}\sigma^2(x) f''(x).

In dd dimensions, with a=σσ⊤a = \sigma\sigma^\top, it is Lf=b⋅∇f+12∑i,jaij ∂ijf\mathcal{L}f = b \cdot \nabla f + \frac{1}{2}\sum_{i,j} a_{ij}\,\partial_{ij} f. For Brownian motion, L=12Δ\mathcal{L} = \frac{1}{2}\Delta.

The basic computation

Itô’s formula applied to a function u(t,Xt)u(t, X_t) reads

du(t,Xt)=(∂tu+Lu)(t,Xt) dt+σ(Xt) ∂xu(t,Xt) dBt.du(t, X_t) = (\partial_t u + \mathcal{L}u)(t, X_t)\,dt + \sigma(X_t)\,\partial_x u(t, X_t)\,dB_t.

The last term is a (local) martingale. So if uu solves a PDE that makes the dtdt term vanish, then u(t,Xt)u(t, X_t) is a martingale, and taking expectations at two different times links the PDE to the process. Every result below is a variation on this one computation.

Terminal value problems: the backward equation

Fix a time TT and a function gg, and let

u(t,x)=E[g(XT)∣Xt=x].u(t, x) = \mathbb{E}\big[g(X_T) \mid X_t = x\big].

Then uu solves the backward Kolmogorov equation

∂tu+Lu=0for t<T,u(T,x)=g(x).\partial_t u + \mathcal{L}u = 0 \quad \text{for } t < T, \qquad u(T, x) = g(x).

Conversely, if uu is a sufficiently regular solution of this problem, the basic computation shows that u(s,Xs)u(s, X_s) is a martingale on [t,T][t, T], so u(t,x)=E[u(T,XT)∣Xt=x]=E[g(XT)∣Xt=x]u(t, x) = \mathbb{E}[u(T, X_T) \mid X_t = x] = \mathbb{E}[g(X_T) \mid X_t = x]. The equation runs backward in time because its condition is imposed at the final time.

Two extensions follow from the same argument:

  • A source term. The solution of ∂tu+Lu+f=0\partial_t u + \mathcal{L}u + f = 0 with u(T,⋅)=gu(T, \cdot) = g is u(t,x)=E[g(XT)+∫tTf(s,Xs) ds  ∣  Xt=x].u(t, x) = \mathbb{E}\Big[g(X_T) + \int_t^T f(s, X_s)\,ds \;\Big|\; X_t = x\Big].
  • A potential (the Feynman–Kac formula). The solution of ∂tu+Lu−Vu=0\partial_t u + \mathcal{L}u - Vu = 0 with u(T,⋅)=gu(T, \cdot) = g is u(t,x)=E[e−∫tTV(Xs) ds g(XT)  ∣  Xt=x].u(t, x) = \mathbb{E}\Big[e^{-\int_t^T V(X_s)\,ds}\, g(X_T) \;\Big|\; X_t = x\Big]. One interpretation is that the process is killed at rate VV, and the exponential is the probability that it survives until time TT. In finance, VV is an interest rate and the formula is a discounted expected payoff.

Initial value problems and long horizons

When the coefficients do not depend on time, the function v(t,x)=Ex[g(Xt)]v(t, x) = \mathbb{E}_x[g(X_t)], the expectation for the process started at xx, solves the forward-in-time problem

∂tv=Lv,v(0,⋅)=g.\partial_t v = \mathcal{L}v, \qquad v(0, \cdot) = g.

For Brownian motion this says that v(t,x)=E[g(x+Bt)]v(t, x) = \mathbb{E}[g(x + B_t)] solves the heat equation ∂tv=12Δv\partial_t v = \frac{1}{2}\Delta v, which is the probabilistic reading of convolution with the Gaussian heat kernel.

Over an infinite horizon, with discounting at a rate λ>0\lambda > 0,

u(x)=Ex[∫0∞e−λtf(Xt) dt]solvesλu−Lu=f.u(x) = \mathbb{E}_x\Big[\int_0^\infty e^{-\lambda t} f(X_t)\,dt\Big] \quad \text{solves} \quad \lambda u - \mathcal{L}u = f.

Stopping times and boundary value problems

Let DD be a domain and τ\tau the first time XX leaves it. Running the basic computation up to the stopping time τ\tau, and applying the optional stopping theorem from the post on martingales, gives representations of elliptic boundary value problems:

  • u(x)=Ex[g(Xτ)]u(x) = \mathbb{E}_x[g(X_\tau)] solves Lu=0\mathcal{L}u = 0 in DD, with u=gu = g on the boundary ∂D\partial D (the Dirichlet problem);
  • w(x)=Ex[τ]w(x) = \mathbb{E}_x[\tau] solves Lw=−1\mathcal{L}w = -1 in DD, with w=0w = 0 on ∂D\partial D.

For Brownian motion in a domain of Rd\mathbb{R}^d, the first statement says that the harmonic function with boundary values gg, evaluated at xx, is the average of gg over the point where a Brownian motion started at xx first hits the boundary.

Example: Brownian motion on an interval

Start a Brownian motion at a point x∈(0,a)x \in (0, a) and stop it when it first hits 00 or aa.

Which end does it reach first? The probability u(x)u(x) of reaching aa first solves 12u′′=0\frac{1}{2}u'' = 0 with u(0)=0u(0) = 0 and u(a)=1u(a) = 1, so

Px(hit a before 0)=xa.\mathbb{P}_x(\text{hit } a \text{ before } 0) = \frac{x}{a}.

How long does it take? The expected exit time solves 12w′′=−1\frac{1}{2}w'' = -1 with w(0)=w(a)=0w(0) = w(a) = 0, so

Ex[τ]=x(a−x).\mathbb{E}_x[\tau] = x(a - x).

Starting in the middle, it takes a2/4a^2/4 on average. That is the diffusive scaling again: an interval twice as long takes four times as long to escape.

With drift. For dXt=μ dt+dBtdX_t = \mu\,dt + dB_t, the generator is μu′+12u′′\mu u' + \frac{1}{2}u'', and the same boundary value problem gives

Px(hit a before 0)=1−e−2μx1−e−2μa.\mathbb{P}_x(\text{hit } a \text{ before } 0) = \frac{1 - e^{-2\mu x}}{1 - e^{-2\mu a}}.

As μ→0\mu \to 0, this recovers x/ax/a. The function 1−e−2μx1 - e^{-2\mu x} that appears here is the scale function of the process, which plays the starring role in the next post.

The forward equation

The backward equation describes expectations as functions of the starting point. The density p(t,y)p(t, y) of XtX_t evolves instead by the adjoint operator, in the Fokker–Planck (or forward Kolmogorov) equation:

∂tp=L∗p=−∂y(b p)+12∂y2(σ2p).\partial_t p = \mathcal{L}^* p = -\partial_y\big(b\,p\big) + \frac{1}{2}\partial_y^2\big(\sigma^2 p\big).

A stationary density solves L∗π=0\mathcal{L}^* \pi = 0. For the Langevin diffusion dXt=∇log⁡π(Xt) dt+2 dBtdX_t = \nabla \log \pi(X_t)\,dt + \sqrt{2}\,dB_t, the probability flux −π∇log⁡π+∇π-\pi\nabla\log\pi + \nabla\pi is identically zero, which is a one-line proof that π\pi is its stationary distribution.

Why the dictionary is useful

Read from right to left, these formulas turn a PDE into a Monte Carlo problem: simulate paths and average them, which works in dimensions where grid-based solvers are hopeless. Read from left to right, they turn probabilistic questions about exit times, hitting probabilities and prices into differential equations that can sometimes be solved exactly.

← All posts in Stochastic differential equations