The Optional Stopping Theorem

A martingale is a mathematically fair game: whatever has happened so far, your expected next fortune equals your current one. The obvious question is whether cleverness can beat it — can you choose when to walk away so as to come out ahead on average? The optional stopping theorem (OST) delivers the deflating answer: no. If you quit at a stopping time — a rule that can't peek into the future — a fair game stays fair.

\mathbb{E}[M_\tau] = \mathbb{E}[M_0].

The expected value at your chosen stopping time \tau is exactly where you started. No stopping rule creates an edge from a fair game.

Fair in, fair out

The theorem needs a mild condition to rule out "cheating with infinity" — it holds if the stopping time is bounded, or the martingale is bounded, or a suitable integrability condition holds. Under any of these, stopping cannot change the expectation.

Watch it happen. Below, a fair coin drives a random walk that starts at 0 and stops the moment it first reaches +5 or -5. Each individual run ends at +5 or -5 — never at 0 — yet averaged over many runs, the stopped value comes out at essentially 0. Press Run:

// A symmetric ±1 random walk (a fair game / martingale) started at 0, // stopped when it first hits +L or -L. The OST predicts E[stopped value] = 0. const L = 5; const runs = 20000; let total = 0; let hitsUp = 0; for (let r = 0; r < runs; r++) { let x = 0; while (x > -L && x < L) { x += Math.random() < 0.5 ? -1 : 1; // fair step } total += x; // x is now exactly +L or -L if (x === L) hitsUp++; } console.log("average stopped value:", (total / runs).toFixed(3)); // ~ 0 console.log("fraction ending at +" + L + ":", (hitsUp / runs).toFixed(3)); // ~ 0.5

The average is a whisker from zero, and each barrier is hit about half the time — precisely \mathbb{E}[M_\tau] = 0 = M_0. (More generally, starting at 0 between barriers +a and -b, the theorem forces the hitting probabilities so the expectation stays put.)

Why it matters in finance

Under the risk-neutral measure, discounted asset prices are martingales — so the OST is the precise statement that you cannot beat the market by timing alone when there's no arbitrage. It also underpins the pricing of an American option, whose holder chooses an exercise (stopping) time: the theory of optimal stopping decides the best rule and the fair price.

The infamous "martingale" betting system: bet £1 on a fair coin; if you lose, double to £2, then £4, and so on, until you finally win — netting £1, guaranteed. It looks like free money, and it seems to violate optional stopping. The catch is exactly the theorem's fine print: the stopping time (the first win) is unbounded, and the strategy needs unbounded wealth to survive a long losing streak. Cap either your bankroll or the number of rounds — as reality does — and the OST reasserts itself: your expected profit snaps back to zero. The theorem's conditions aren't pedantry; they are the whole reason the game stays fair.