Tutorials › Stochastic Calculus › Proof by Stopping at the Boundary

The Feynman-Kac Formula · Tutorial 398 of 600

Proof by Stopping at the Boundary

Learn how discounted Itô’s formula, stopped at the first boundary hit or a deterministic horizon, gives a Dirichlet representation and when the horizon can be sent to infinity.

Advanced 12 min read

What You'll Learn

  • State the finite-horizon Dirichlet Feynman–Kac formula and its regularity assumptions
  • Apply discounted Itô’s formula up to the minimum of the exit time and a fixed horizon
  • Verify why the stopped stochastic integral has zero expectation
  • Derive an elliptic boundary representation and identify conditions for taking the infinite-horizon limit
  • Check the discount sign and starting-point convention in explicit examples
  • Distinguish conclusions that require finite exit from those supplied by positive discounting

Stopping at the Boundary

A Dirichlet problem prescribes values on the boundary of a spatial domain. A diffusion started inside the domain eventually samples those boundary values when it exits. The Feynman–Kac argument makes this connection precise: apply Itô’s formula to a candidate PDE solution along the diffusion, discount the process, and stop at the earlier of the exit time and a fixed time horizon. The stopping is essential. It is what makes the boundary data enter the calculation without requiring an unbounded-time optional-stopping argument.

Work on a filtered probability space \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{P})\) carrying a standard \(d\)-dimensional Brownian motion \(\mathbf{B}_t\). Let \(D\) be a bounded domain in \(\mathbb{R}^n\), and let \(X_0=x\in D\) solve \(dX_s=\mu(X_s)\,ds+\sigma(X_s)\,d\mathbf{B}_s\), where \(\mu\) takes values in \(\mathbb{R}^n\) and \(\sigma\) is an \(n\times d\) matrix. Assume the coefficients are globally Lipschitz and satisfy a linear growth bound; these conditions give a unique strong solution. The operator used below is \(\mathcal{L}f=\sum_i\mu_i\partial_i f+\tfrac12\sum_{i,j}(\sigma\sigma^{\mathsf T})_{ij}\partial_{ij}f\). The drift is \(\mu\), and the diffusion coefficient is \(\sigma\).

Definition: The exit time is \(\tau=\inf\{s\ge0:X_s\notin D\}\), with \(\inf\varnothing=\infty\). For continuous paths, if \(\tau<\infty\), then \(X_\tau\in\partial D\). All expectations in this tutorial are under \(\mathbb{P}\). The stochastic integrals below are Itô integrals, not Stratonovich integrals; no Stratonovich-to-Itô correction is being used.

The Finite-Horizon Dirichlet Formula

Fix a horizon \(T>0\) and a discount rate \(\rho\ge0\). Suppose \(u\) is bounded and \(C^{1,2}\) on a neighborhood of \([0,T]\times\overline D\), and satisfies \(u_t+\mathcal{L}u-\rho u=0\) on \([0,T)\times D\). Let \(g\) and \(h\) be its boundary and terminal values: \(u(s,z)=g(s,z)\) for \(z\in\partial D\), and \(u(T,z)=h(z)\) for \(z\in\overline D\). Assume compatibility at the terminal boundary, \(g(T,z)=h(z)\) for \(z\in\partial D\). These assumptions make the formula meaningful even when \(\tau=T\).

Theorem: For \(x\in D\), with \(H=T\) and \(X_0=x\), $$ u(0,x)=\mathbb{E}\!\left[e^{-\rho\tau}g(\tau,X_\tau)\mathbf{1}_{\{\tau\le T\}}+ e^{-\rho T}h(X_T)\mathbf{1}_{\{\tau>T\}}\right]. $$ The same identity holds from any starting time \(t\in[0,T]\), replacing \(T\) by \(T-t\), the initial value by \(u(t,x)\), and the time arguments of \(u\) and \(g\) by their corresponding shifted times.

Proof. Start at time zero and set \(\theta=\tau\wedge T\). Apply Itô’s formula to \(e^{-\rho s}u(s,X_s)\), stopped at \(\theta\). The time-dependent function is \(F(s,y)=e^{-\rho s}u(s,y)\). Its derivatives are \(F_s=e^{-\rho s}(u_t-\rho u)\), \(\nabla F=e^{-\rho s}\nabla u\), and \(D^2F=e^{-\rho s}D^2u\). The second-order term in Itô’s formula is explicitly \(\tfrac12 e^{-\rho s}\sum_{i,j}(\sigma\sigma^{\mathsf T})_{ij}\partial_{ij}u\,ds\). Thus $$ e^{-\rho\theta}u(\theta,X_\theta) =u(0,x)+\int_0^\theta e^{-\rho s}(u_t+\mathcal{L}u-\rho u)(s,X_s)\,ds +\int_0^\theta e^{-\rho s}\nabla u(s,X_s)^{\mathsf T}\sigma(X_s)\,d\mathbf{B}_s. $$ The drift integral is zero: before exit, \(X_s\in D\), and there the PDE holds. The stochastic integrand, written as \(H_s=\mathbf{1}_{\{s<\tau\}}e^{-\rho s}\sigma(X_s)^{\mathsf T}\nabla u(s,X_s)\) for \(0\le s\le T\), is progressively measurable. Boundedness of \(\sigma\) on \(\overline D\) and of \(\nabla u\) on the finite time strip gives \(\mathbb{E}\int_0^T|H_s|^2\,ds<\infty\). Hence it belongs to \(\mathcal{L}^2\), and its Itô integral is a square-integrable martingale. In particular, its expectation at \(T\) is zero: its initial value is zero and the martingale conditional-expectation identity gives \(\mathbb{E}[\int_0^T H_s\,d\mathbf{B}_s]=0\). This is a true martingale, not merely a local martingale.

On \(\{\tau\le T\}\), continuity and the boundary condition give \(e^{-\rho\theta}u(\theta,X_\theta)=e^{-\rho\tau}g(\tau,X_\tau)\). On \(\{\tau>T\}\), \(\theta=T\) and the terminal condition gives \(e^{-\rho\theta}u(\theta,X_\theta)=e^{-\rho T}h(X_T)\). If \(\tau=T\), the first case applies and compatibility gives the same value as the terminal condition. Taking expectations proves the identity. Starting at \(t\) follows by applying the same calculation on the interval \([t,T]\). \(\square\)

The quadratic term in this calculation is the Itô correction: \(dB_t\,dB_t=dt\), while \(dB_t\,dt=0\) and \(dt\,dt=0\). It is not the ordinary chain rule. The stopped integral is controlled in \(L^2\), so no optional-stopping claim for a possibly unbounded stopping time is needed.

Worked Example: Checking the Discount Sign

Take standard Brownian motion in any bounded domain \(D\), use any \(\rho\ge0\), and set \(u(t,z)=e^{\rho t}\). The boundary and terminal data are the restrictions \(g(t,z)=e^{\rho t}\) and \(h(z)=e^{\rho T}\). Compute the PDE terms: \(u_t=\rho e^{\rho t}\), \(\nabla u=0\), and \(D^2u=0\), so \(\mathcal{L}u=0\) and \(u_t+\mathcal{L}u-\rho u=0\). The finite-horizon theorem applies, since \(u\) and its derivatives are bounded on every fixed strip \([0,T]\times\overline D\).

On \(\{\tau\le T\}\), the boundary contribution is \(e^{-\rho\tau}e^{\rho\tau}=1\). On \(\{\tau>T\}\), the terminal contribution is \(e^{-\rho T}e^{\rho T}=1\). These events partition the sample space, so the right side equals \(1=u(0,x)\). Check: this pathwise calculation confirms the negative sign in the discount factor. Using \(e^{+\rho s}\) instead would produce \(e^{2\rho\tau}\) or \(e^{2\rho T}\), not \(1\).

From a Finite Horizon to an Elliptic Boundary Representation

For a time-independent boundary problem, let \(v\) be bounded and \(C^2\) on a neighborhood of \(\overline D\), with \((\mathcal{L}-\rho)v=0\) in \(D\) and \(v=g\) on \(\partial D\). The finite-horizon argument applied to \(u(s,z)=v(z)\) gives, for every \(T>0\),

$$ v(x)=\mathbb{E}\!\left[e^{-\rho\tau}g(X_\tau)\mathbf{1}_{\{\tau\le T\}}+ e^{-\rho T}v(X_T)\mathbf{1}_{\{\tau>T\}}\right]. $$
Theorem: If \(\rho>0\), the elliptic Dirichlet representation is $$ v(x)=\mathbb{E}\!\left[e^{-\rho\tau}g(X_\tau)\mathbf{1}_{\{\tau<\infty\}}\right]. $$ If \(\rho=0\), the same formula holds provided \(\mathbb{P}(\tau<\infty)=1\). Under the corresponding condition, the representation also implies uniqueness among bounded classical solutions with the same boundary data.

Proof. Write \(M=\sup_{\overline D}|v|\) and \(G=\sup_{\partial D}|g|\), both finite. If \(\rho>0\), the absolute value of the terminal term is at most \(Me^{-\rho T}\), which tends to zero. The boundary term converges pointwise as \(T\to\infty\) to \(e^{-\rho\tau}g(X_\tau)\mathbf{1}_{\{\tau<\infty\}}\) and is bounded in absolute value by \(G\), so dominated convergence applies. If \(\rho=0\) and \(\tau<\infty\) almost surely, the terminal term is bounded by \(M\mathbf{1}_{\{\tau>T\}}\), whose expectation tends to zero because \(\mathbb{P}(\tau>T)\to0\). The boundary term again converges and is bounded by \(G\), so dominated convergence gives the stated formula. For uniqueness, subtract two bounded classical solutions with the same boundary values. Their difference has zero boundary data and satisfies the same homogeneous PDE. The representation gives zero at every \(x\in D\), under the same discount or exit assumption. \(\square\)

Positive discount and almost-sure finite exit play different roles. Positive discount kills the residual terminal term even if the diffusion may never exit. With zero discount, boundedness alone does not kill that term; the stated proof needs almost-sure finite exit.

Worked Example: A Harmonic Coordinate in the Unit Disk

Let \(D=\{(z_1,z_2):z_1^2+z_2^2<1\}\), let \(X_s=x+\mathbf{B}_s\) be two-dimensional Brownian motion started at \(x=(1/3,0)\), and take \(\rho=0\). Set \(v(z_1,z_2)=z_1\). Its derivatives are \(\partial_1v=1\), \(\partial_2v=0\), and every second derivative is zero. For Brownian motion, \(\mathcal{L}=\tfrac12\Delta\), so \(\mathcal{L}v=0\). On the boundary take \(g(z)=z_1\).

To check the finite-exit hypothesis, if \(\tau>n\) for an integer \(n\ge1\), then \(X_n\in D\), so \(B_n^1\in(-1-\tfrac13,1-\tfrac13)=(-\tfrac43,\tfrac23)\). The normal density of \(B_n^1\sim N(0,n)\) is at most \(1/\sqrt{2\pi n}\); the interval has length \(2\). Therefore \(\mathbb{P}(\tau>n)\le 2/\sqrt{2\pi n}\to0\), proving \(\tau<\infty\) almost surely. The elliptic representation now yields \(\mathbb{E}[X_\tau^1]=v(x)=1/3\). Check: if the starting point is instead \((0,0)\), the same calculation gives \(\mathbb{E}[X_\tau^1]=0\), consistent with reflection symmetry of the disk and Brownian motion. No unbounded-time optional-stopping theorem is being presumed; the conclusion follows by taking the limit in the finite-horizon identity.

A Finite-Horizon Heat Example

Worked Example: A Killed Brownian Heat Mode

Let \(D=(0,1)^2\), \(X_s=(x,y)+\mathbf{B}_s\) for standard two-dimensional Brownian motion started at zero, and let \(\tau\) be the first exit from \(D\). Define \(u(t,z_1,z_2)=e^{\pi^2t}\sin(\pi z_1)\sin(\pi z_2)\). For fixed \(T\), this function and its derivatives are bounded on \([0,T]\times\overline D\); no boundedness on the infinite time strip is asserted or needed.

Writing \(\phi(z_1,z_2)=\sin(\pi z_1)\sin(\pi z_2)\), the derivatives are \(u_t=\pi^2u\), \(\partial_{11}u=-\pi^2u\), \(\partial_{22}u=-\pi^2u\), and \(\partial_{12}u=\pi^2e^{\pi^2t}\cos(\pi z_1)\cos(\pi z_2)\). Brownian motion has \(\mathcal{L}=\tfrac12\Delta\), so the Itô correction is \(\tfrac12(\partial_{11}u+\partial_{22}u)=-\pi^2u\), and \(u_t+\mathcal{L}u=0\). The boundary value is zero on every side of the square. The terminal value is \(h(z)=e^{\pi^2T}\phi(z)\). With \(\rho=0\), the finite-horizon formula therefore gives $$ \sin(\pi x)\sin(\pi y) =e^{\pi^2T}\mathbb{E}\!\left[\sin(\pi X_T^1)\sin(\pi X_T^2)\mathbf{1}_{\{\tau>T\}}\right]. $$ The payoff uses \(X_T\), the diffusion started at \((x,y)\), not the Brownian increment \(\mathbf{B}_T\) alone.

Check: at \((x,y)=(1/2,1/2)\), the left side is \(\sin(\pi/2)\sin(\pi/2)=1\), so the expectation on the right is \(e^{-\pi^2T}\). This tends to \(1\) as \(T\downarrow0\), in agreement with the starting value. The calculation uses only the finite-horizon argument; the factor \(e^{\pi^2t}\) grows without bound as \(t\to\infty\), so this candidate does not meet a bounded-on-the-infinite-strip assumption.

Common Pitfall: Stopping Is Not Optional

A tempting but incorrect calculation is to write the PDE drift cancellation and immediately assert that the resulting process has constant expectation at an unbounded exit time. A local martingale need not be a true martingale, and optional stopping requires hypotheses that such a calculation may not establish. Here the finite-horizon proof instead uses \(\tau\wedge T\), where the stochastic integrand is square-integrable and the integral is a true martingale. Only after that identity is proved do we let \(T\) increase, and the terminal term is handled by discounting or by a separate finite-exit assumption.

Another sign error is to use \(e^{+\rho s}\) when the PDE is \(u_t+\mathcal{L}u-\rho u=0\). The product rule gives drift \(e^{-\rho s}(u_t+\mathcal{L}u-\rho u)\) for \(e^{-\rho s}u(s,X_s)\), which is exactly zero. Thus the discount in the representation is \(e^{-\rho\tau}\). The measure remains \(\mathbb{P}\) throughout; no risk-neutral measure \(\mathbb{Q}\) or change of measure is involved.

Check Your Understanding

For each question, identify the hypothesis that justifies the step as well as the resulting expression.

  1. For the finite-horizon PDE, compute the drift in Itô’s formula for \(e^{-\rho s}u(s,X_s)\). Which PDE makes it vanish?
  2. Why is the stopped stochastic integral a true martingale under the theorem’s assumptions, rather than only a local martingale?
  3. What happens to the terminal remainder as \(T\to\infty\) when \(\rho>0\)?
  4. When \(\rho=0\), which additional condition in the elliptic result ensures that the terminal remainder tends to zero?
  5. In the square heat example, why must the terminal payoff use \(X_T=(x,y)+\mathbf{B}_T\) rather than \(\mathbf{B}_T\) alone?