Quant Memo
Advanced

Optional Stopping Theorem

If you stop a fair game at a cleverly chosen but non-anticipating time, your expected value is still exactly where you started. The rigorous statement of "you can't beat a fair game," and a shortcut for first-passage problems.

Prerequisites: Martingales, Expected Value

Imagine a perfectly fair game — the kind where your expected wealth never drifts up or down, so at every moment your best guess for tomorrow is exactly today's balance. That's a martingale. Now suppose you're allowed to quit whenever you like, using any rule you want, as long as the rule doesn't peek into the future. Can a clever quitting rule leave you ahead on average? The optional stopping theorem says no: however you time your exit, your expected value at the stop equals your starting value.

E[Mτ]=E[M0].E[M_\tau] = E[M_0].

Here MτM_\tau is the martingale's value at the random time τ\tau you chose to stop, and M0M_0 is where you began. The theorem is both a deep impossibility result — the exact reason no betting system beats a fair game — and a surprisingly practical calculator, because it lets you read off the value of a random process at a random time without tracking every path.

What counts as a legal stopping rule

The catch is the phrase "doesn't peek into the future." A stopping time τ\tau is a quitting rule you can execute in real time: to know whether you've stopped by now, you only need the information you have now. "Stop the first time my bankroll hits $100" is legal. "Stop the day before the peak" is not — you'd need tomorrow's data to obey it. This non-anticipating requirement is precisely why you can't use the theorem to manufacture profit: the profitable rules are exactly the illegal ones.

For a martingale MM and a legal (non-anticipating) stopping time τ\tau, E[Mτ]=E[M0]E[M_\tau] = E[M_0]provided a regularity condition holds. Stopping a fair game at any honestly-timed moment leaves your expectation untouched.

The fine print that makes or breaks it

The theorem is not free — it needs one of a few regularity conditions to rule out pathological, infinitely-patient strategies. Any one of these is enough:

ConditionWhat it saysTypical use
Bounded timeτK\tau \le K for some fixed KKyou must stop within KK rounds no matter what
Bounded steps + finite mean timejumps are capped and E[τ]<E[\tau] < \inftygambler's ruin: ±1\pm 1 steps, finite expected duration
Dominatedthe stopped process stays below some integrable YYprices bounded by an integrable payoff

Skip the check and the theorem can fail loudly — which is the whole lesson of the doubling scheme below.

Worked example: gambler's ruin, two lines

Take a symmetric The Random Walk SnS_n that starts at ii and stops at τ\tau, the first time it hits 00 or NN. Since SnS_n is a martingale and τ\tau satisfies the bounded-steps-plus-finite-mean condition, optional stopping gives E[Sτ]=S0=iE[S_\tau] = S_0 = i. But SτS_\tau can only be 00 or NN, so with p=P(hit N)p = P(\text{hit } N),

E[Sτ]=0(1p)+Np=Np=i    p=iN.E[S_\tau] = 0\cdot(1-p) + N\cdot p = Np = i \;\Longrightarrow\; p = \frac{i}{N}.

The ruin probability drops out with no recursion. Want the expected duration? Use a second martingale, Mn=Sn2nM_n = S_n^2 - n. Optional stopping gives E[Sτ2τ]=i2E[S_\tau^2 - \tau] = i^2, and since E[Sτ2]=N2p=NiE[S_\tau^2] = N^2 p = Ni,

E[τ]=E[Sτ2]i2=Nii2=i(Ni).E[\tau] = E[S_\tau^2] - i^2 = Ni - i^2 = i(N - i).

The art is choosing the right martingale: SnS_n delivers the probability, Sn2nS_n^2 - n delivers the time. Build it, stop it, read off the answer.

The first-passage playbook: construct a martingale, then stop it. Use the walk itself, SnS_n, for hitting probabilities; use Sn2nS_n^2 - n for expected durations. The theorem converts a question about a random endpoint into simple arithmetic at time zero.

Where it fails: the doubling system

The famous "martingale" betting system: on a fair coin, bet $1; if you lose, double to $2, then $4, and so on until your first win, then walk away up $1. Let τ\tau be that first win. At the stop you're always ahead by exactly $1, so E[Mτ]=1E[M_\tau] = 1, yet you started at M0=0M_0 = 0. The theorem appears violated — but it isn't, because none of the conditions hold: τ\tau is unbounded (you might lose arbitrarily many times), the bets grow without limit, and the strategy needs infinite capital to survive the losing streaks. With a real, finite bankroll you almost surely hit a streak that wipes you out, and the expectation snaps back to zero. This is the canonical demonstration that the regularity conditions are the theorem, not decoration.

The doubling system does not beat a fair game. It only seems to because it quietly assumes an unbounded stopping time and an infinite bankroll — exactly the conditions optional stopping forbids. Whenever the theorem gives a "too good" answer, check whether τ\tau is really bounded or the increments are really controlled.

The pricing connection

Optional stopping is the machinery under Risk-Neutral Pricing. Under the risk-neutral measure, a discounted asset price is a martingale, so the value today equals the expected discounted value at any legal future stopping time — maturity for a European claim, or the exercise time for an American one. Pricing an option is, at bottom, applying this theorem to a carefully chosen martingale and reading off its value at time zero. That through-line — from "you can't beat a fair game" to "the price is the discounted expected payoff" — is the same theorem wearing two hats.

Related concepts

Practice in interviews

Further reading

  • Williams, Probability with Martingales, ch. 10
  • Durrett, Probability: Theory and Examples, ch. 4
ShareTwitterLinkedIn