CONTENTS

Optional Stopping Theorem

Motivation: why this matters in quant finance

The Optional Stopping Theorem (OST) is the sharpest form of "a fair game stays fair." Formally: if (Mn)(M_n) is a martingale and τ\tau is a stopping time satisfying one of a short list of regularity conditions, then E[Mτ]=E[M0]\mathbb{E}[M_\tau] = \mathbb{E}[M_0].
In one sentence: you cannot cheat a martingale by choosing a clever exit time. The theorem sits at the heart of arbitrage arguments, gambler's-ruin computations, and the pricing of barrier and American options. It is also where "naive" probabilistic intuition most commonly goes wrong — the theorem has tight integrability hypotheses that are easy to miss, and its failure mode (the symmetric random walk that eventually hits 11) is a standard counter-example worth memorising.

In quant finance, OST is the tool that converts "this process is a martingale" into "my expected P&L at exit is zero" — the universal no-free-lunch statement. Every closed-form ruin probability, hitting-time distribution, and barrier-option price that has a slick derivation routes through it.

The informal idea

A martingale is a fair game: E[Mn+1Fn]=Mn\mathbb{E}[M_{n+1} \mid \mathcal{F}_n] = M_n. "Fair" means zero expected profit per step. The natural question: can I add a stopping rule — "exit when something happens" — to engineer a positive expected profit?

Intuitively, no. If at every step the expected next move is zero, then no matter when you exit, your expected final value should equal your starting value. This is the OST.

The subtlety: "no matter when you exit" is too strong. There are stopping rules that exploit unboundedness. Classic example: symmetric random walk SnS_n starting at 00, exit at τ=inf{n:Sn=1}\tau = \inf\{n : S_n = 1\}. The walk is recurrent, so τ<\tau < \infty a.s. and Sτ=1S_\tau = 1 a.s., so E[Sτ]=10=E[S0]\mathbb{E}[S_\tau] = 1 \ne 0 = \mathbb{E}[S_0].

What happened? The exit time τ\tau is a stopping time, but has infinite expected value (E[τ]=\mathbb{E}[\tau] = \infty). The strategy "bet until you're up 11 unit, then quit" works — eventually — but requires infinite expected time and an infinite credit line. The OST's hypotheses are designed to rule out exactly this pathological regime.

Formal statement

Discrete-time OST

Let (Mn)n0(M_n)_{n \ge 0} be a martingale with respect to a filtration (Fn)(\mathcal{F}_n), and τ\tau a stopping time. Then E[Mτ]=E[M0]\mathbb{E}[M_\tau] = \mathbb{E}[M_0] provided any one of the following holds:
  1. τ\tau is bounded: τK\tau \le K a.s. for some deterministic constant KK.
  2. MM is bounded: MnK|M_n| \le K a.s. for some KK (equivalently, MM bounded on {nτ}\{n \le \tau\}).
  3. E[τ]<\mathbb{E}[\tau] < \infty and martingale has bounded increments: E[τ]<\mathbb{E}[\tau] < \infty and there exists CC with Mn+1MnC|M_{n+1} - M_n| \le C a.s. for all nn.
  4. Uniform integrability: (Mnτ)(M_{n \wedge \tau}) is uniformly integrable (subsumes (1)–(3)).

Why these hypotheses

The stopped process (Mnτ)(M_{n \wedge \tau}) is always a martingale (no condition), so E[Mnτ]=E[M0]\mathbb{E}[M_{n \wedge \tau}] = \mathbb{E}[M_0] for every fixed nn. The OST question is whether limnE[Mnτ]=E[limnMnτ]=E[Mτ]\lim_n \mathbb{E}[M_{n \wedge \tau}] = \mathbb{E}[\lim_n M_{n \wedge \tau}] = \mathbb{E}[M_\tau]. The limit-and-expectation interchange requires uniform integrability (or one of the sufficient conditions above).

Continuous-time OST

For a continuous-time right-continuous martingale (Mt)(M_t) and a stopping time τ\tau, the analogous statement holds under analogous conditions (bounded τ\tau, bounded MM, or uniform integrability of (Mtτ)(M_{t \wedge \tau})).

Canonical applications

Application 1 — Gambler's ruin for a symmetric walk

Let SnS_n be a symmetric random walk starting at k{0,1,,N}k \in \{0, 1, \ldots, N\}, stopped at τ=inf{n:Sn{0,N}}\tau = \inf\{n : S_n \in \{0, N\}\} — the first exit time from (0,N)(0, N).

  • τ\tau is finite almost surely (a recurrent walk exits any bounded interval).
  • The stopped process SnτS_{n \wedge \tau} is bounded between 00 and NN, so OST (condition 2) applies.
  • E[Sτ]=k\mathbb{E}[S_\tau] = k by OST.
  • Sτ{0,N}S_\tau \in \{0, N\}, so E[Sτ]=NP(Sτ=N)\mathbb{E}[S_\tau] = N\cdot\mathbb{P}(S_\tau = N). Setting the two equal:
P(hit N before 0, starting at k)=k/N.\mathbb{P}(\text{hit $N$ before $0$, starting at $k$}) = k/N.

This is the gambler's ruin formula in three lines.

Application 2 — Gambler's ruin for a biased walk

For a biased walk with P(Xi=+1)=p\mathbb{P}(X_i = +1) = p, P(Xi=1)=q=1p\mathbb{P}(X_i = -1) = q = 1 - p and p1/2p \ne 1/2, the walk SnS_n is no longer a martingale, but the process Mn=(q/p)SnM_n = (q/p)^{S_n} is (see the exponential-martingale exercise for the discrete-time martingales lesson).

Apply OST to MnM_n at τ=inf{n:Sn{0,N}}\tau = \inf\{n : S_n \in \{0, N\}\}. Stopped process is bounded (between (q/p)0=1(q/p)^0 = 1 and (q/p)N(q/p)^N), OST applies, and E[Mτ]=M0=(q/p)k\mathbb{E}[M_\tau] = M_0 = (q/p)^k. Since Sτ{0,N}S_\tau \in \{0, N\}:

E[Mτ]=P(hit 0)1+P(hit N)(q/p)N.\mathbb{E}[M_\tau] = \mathbb{P}(\text{hit $0$})\cdot 1 + \mathbb{P}(\text{hit $N$})\cdot (q/p)^N.

Letting ρ=q/p\rho = q/p and P_N := \mathbb{P}(\text{hit Nbeforebefore0}), solve:

PN=ρk1ρN1.P_N = \frac{\rho^k - 1}{\rho^N - 1}.

The classic biased-gambler's-ruin formula. For p<1/2p < 1/2 (ρ>1\rho > 1): PNρkNP_N \to \rho^{k-N} as NN \to \infty — you will almost certainly ruin yourself playing against an unfavourable game, even starting far from the origin.

Application 3 — Expected hitting time for a random walk

Still with the symmetric walk SnS_n starting at k(0,N)k \in (0, N) and τ=inf{n:Sn{0,N}}\tau = \inf\{n : S_n \in \{0, N\}\}, use the martingale Nn:=Sn2nN_n := S_n^2 - n (see Doob's decomposition exercise). OST condition (3) applies: increments are bounded (Nn+1Nn2max(Sn,1)+12N+1|N_{n+1} - N_n| \le 2\max(S_n, 1) + 1 \le 2N + 1 on {τ>n}\{\tau > n\}), and E[τ]<\mathbb{E}[\tau] < \infty (provable separately).
E[Nτ]=k20=k2andE[Nτ]=E[Sτ2]E[τ]=P(Sτ=N)N2E[τ].\mathbb{E}[N_\tau] = k^2 - 0 = k^2 \quad\text{and}\quad \mathbb{E}[N_\tau] = \mathbb{E}[S_\tau^2] - \mathbb{E}[\tau] = \mathbb{P}(S_\tau = N)\cdot N^2 - \mathbb{E}[\tau].

Using P(Sτ=N)=k/N\mathbb{P}(S_\tau = N) = k/N:

E[τ]=kNN2k2=k(Nk).\mathbb{E}[\tau] = \frac{k}{N}N^2 - k^2 = k(N - k).

Expected exit time is k(Nk)k(N - k) — quadratic in the distance to the barriers, maximal at the midpoint. This drives the "time between stops" estimates in drawdown risk.

Application 4 — Discounted asset price is a Q\mathbb{Q}-martingale; hence, no arbitrage across any bounded stopping time

Under the risk-neutral measure Q\mathbb{Q}, discounted prices S~n=ernΔtSn\tilde S_n = e^{-rn\Delta t}S_n are a martingale. For any bounded stopping time τ\tau (e.g. a trader's exit rule with a hard time cap), OST gives EQ[S~τ]=S~0\mathbb{E}^{\mathbb{Q}}[\tilde S_\tau] = \tilde S_0. No strategy on (S~n)(\tilde S_n) can generate risk-neutral expected profit — the no-free-lunch theorem, encoded in OST.

When OST fails — the symmetric-walk-hits-one example

Let SnS_n be a symmetric random walk starting at 00 and let τ=inf{n:Sn=1}\tau = \inf\{n : S_n = 1\}. Facts:

  • τ<\tau < \infty a.s. (symmetric walk on Z\mathbb{Z} is recurrent).
  • Sτ=1S_\tau = 1 a.s., so E[Sτ]=1\mathbb{E}[S_\tau] = 1.
  • But E[S0]=0\mathbb{E}[S_0] = 0.

OST fails because none of the conditions hold:

  • τ\tau is not bounded.
  • SnS_n is not bounded.
  • Increments are bounded but E[τ]=\mathbb{E}[\tau] = \infty.
  • (Snτ)(S_{n \wedge \tau}) is not uniformly integrable.
The naive interpretation of this failure is "doubling-up works": play long enough and you'll be up +1+1 unit. This is true in expectation over time, but requires infinite expected time and an infinite credit line. Real traders have finite patience and finite capital, which re-introduces OST's hypotheses and forces expected P&L back to zero.

Proof via uniform integrability (sketch)

The stopped process (Mnτ)(M_{n \wedge \tau}) is always a martingale, so E[Mnτ]=E[M0]\mathbb{E}[M_{n \wedge \tau}] = \mathbb{E}[M_0] for every nn. We want E[Mτ]=E[M0]\mathbb{E}[M_\tau] = \mathbb{E}[M_0], which requires:

limnE[Mnτ]=E ⁣[limnMnτ]=E[Mτ].\lim_{n \to \infty}\mathbb{E}[M_{n \wedge \tau}] = \mathbb{E}\!\left[\lim_{n \to \infty} M_{n \wedge \tau}\right] = \mathbb{E}[M_\tau].

Uniform integrability is the exact condition for this interchange (Vitali's theorem). Each sufficient condition in the theorem implies uniform integrability:

  • Bounded τ\tau: the stopping occurs by a fixed time, so Mnτ=MτM_{n \wedge \tau} = M_\tau for nKn \ge K.
  • Bounded MM: a uniformly bounded sequence is trivially uniformly integrable.
  • Bounded increments + E[τ]<\mathbb{E}[\tau] < \infty: MnτM0+Cτ|M_{n \wedge \tau}| \le |M_0| + C\tau, and E[τ]<\mathbb{E}[\tau] < \infty suffices for uniform integrability by dominated convergence.

Common confusions and pitfalls

"OST says E[Mτ]=E[M0]\mathbb{E}[M_\tau] = \mathbb{E}[M_0] for any martingale and any stopping time." Emphatically no. The hypotheses are required. The symmetric-walk-hits-one example is the sharpest counter-example; know it.
"If τ<\tau < \infty a.s., OST applies." Finite τ\tau a.s. is not enough — you need E[τ]<\mathbb{E}[\tau] < \infty (at minimum) plus bounded increments, or uniform integrability. Recurrent walks on unbounded state spaces are the canonical exception.
"OST only works for positive martingales." OST works for any martingale under its hypotheses. The sign of MM doesn't matter; what matters is control of the stopped process's tail.
"OST gives you the distribution of MτM_\tau." Only its mean. Distributional information requires additional tools — martingale CLT, explicit hitting-time distributions, stochastic comparison. OST is the most elementary of a family of moment identities.
"If I have a non-trivial martingale strategy in a real market, OST must be violated." No — real-world markets are not martingales under the real-world measure P\mathbb{P}. They are martingales under Q\mathbb{Q}. A strategy can have positive EP\mathbb{E}^{\mathbb{P}} P&L (alpha) while still respecting OST under Q\mathbb{Q} (no arbitrage).

Where this goes next

  • Stopping Times: Foundational definitions; OST is the payoff theorem.
  • Martingales (Discrete Time): The class of processes to which OST applies.
  • Brownian Motion: Continuous-time hitting-time problems; closed-form distributions for Brownian first-exit times come from continuous-time OST.
  • Martingale I: Fundamental theorem of asset pricing; OST applied to discounted prices proves no-arbitrage.
  • Barrier Options: Knock-in/knock-out options valued as expectations of stopped payoffs under Q\mathbb{Q} — OST and hitting-time distributions are the core machinery.
  • American Options and Optimal Stopping: The optimal exercise problem is a stopping-time optimisation where OST provides the key dual characterisation.

References

  • Lawler, G. F. (2023). Stochastic Calculus: An Introduction with Applications. Ch. 1 §1.3 (Optional sampling theorem), Ch. 4 §4.1 (Martingales and local martingales).

Exercises

Test your understanding with 3 exercises for this lesson.