Definition of martingales
A martingale is a stochastic process that models a "fair game": the best prediction of any future value, given everything you know now, is simply the current value. This concept is central to probability theory and shows up constantly in finance, gambling theory, and statistical inference.
Formally, a discrete-time stochastic process is a martingale with respect to a filtration if all three conditions hold:
- Adapted: is -measurable for all
- Integrable: for all
- Martingale property: for all
The third condition is the defining one. It says that no matter what information you've accumulated, the conditional expectation of the next value equals the current value.
Stopping times
Definition of stopping times
A stopping time is a random variable representing the time at which you decide to stop observing (or acting on) a stochastic process. The key constraint is that your decision to stop can only use information available up to that moment.
Formally, is a stopping time with respect to a filtration if the event is -measurable for all .
Why does this matter? It rules out "clairvoyant" strategies. You can't decide to stop at time based on what happens at time . The decision must depend only on what you've seen so far.
Finite vs infinite stopping times
A stopping time is finite (or almost surely finite) if , meaning the process will eventually stop with probability 1. Examples include:
- The first time a simple random walk hits level , starting from 0 (this is a.s. finite for a symmetric walk on )
- The time a gambler's fortune first reaches a predetermined profit target or ruin level
A stopping time is infinite if . For instance, the first time a random walk on returns to the origin has positive probability of never occurring (since the 3D symmetric random walk is transient). The distinction between finite and infinite stopping times is critical because most stopping theorems require a.s. as a minimum condition.
Martingale convergence theorem
Conditions for convergence
The martingale convergence theorem tells you when a martingale settles down to a well-defined limit as .
Doob's Forward Convergence Theorem: If is a martingale (or supermartingale) satisfying
then there exists a random variable with such that almost surely.
A sufficient (stronger) condition is that the martingale is uniformly bounded: there exists a constant with for all . Uniform boundedness implies the -boundedness condition above.
One subtlety worth noting: almost sure convergence does not automatically give you . For that, you need the stronger condition of uniform integrability, which guarantees convergence in as well.
Proof of convergence theorem
The proof rests on Doob's upcrossing inequality. Here's the core argument in outline:
-
Fix an interval with . Define as the number of times the sequence crosses upward from below to above .
-
Doob's upcrossing inequality bounds this: . For an -bounded martingale, the right side stays bounded as .
-
By the monotone convergence theorem, , so a.s.
-
Since the number of upcrossings is finite a.s. for every rational pair , the sequence cannot oscillate, and therefore it must converge a.s.
Optional stopping theorem
Statement of theorem
The optional stopping theorem (sometimes called Doob's optional stopping theorem) extends the martingale property from deterministic times to random stopping times.
Stopped process result: If is a martingale and is a stopping time, then the stopped process (where ) is also a martingale.
This is always true and requires no extra conditions on . The deeper question is whether you can "pass to the limit" and conclude:
That equality requires additional conditions on .
Conditions for optional stopping
For to hold, you need at least one of the following:
- Bounded stopping time: There exists such that a.s. This is the simplest and most commonly used condition.
- A.s. finite stopping time + uniform integrability: a.s. and the family is uniformly integrable.
- Dominated convergence condition: a.s. and there exists an integrable random variable with for all .
Without these conditions, the theorem can fail. The classic counterexample is the doubling strategy in a fair coin-toss game: a gambler who doubles their bet after each loss has a stopping time (first win) that is a.s. finite, yet because the stopped martingale is not uniformly integrable.

Proof of optional stopping theorem
For the bounded case ( a.s.), the proof is clean:
- Since is a martingale, you have for every (just telescope the conditional expectations).
- Take . Since , you get , so .
For the unbounded case with uniform integrability, the argument uses the fact that a.s. as , and uniform integrability upgrades this to convergence, giving .
Applications of martingale stopping
Gambling and fair games
In a fair game (modeled as a martingale), the optional stopping theorem tells you that no stopping strategy can give you a positive expected profit. If is your fortune at time in a fair game, then for any bounded stopping time .
A concrete application: consider a symmetric random walk starting at , with absorbing barriers at and . Since the walk is a martingale, optional stopping gives , so the probability of reaching before ruin is .
Wald's equation
Wald's equation connects the expected value of a random sum to the expected number of terms.
Let be i.i.d. random variables with finite mean , and let be a stopping time (with respect to the natural filtration of the ) satisfying . Then:
The martingale route to proving this: define . Then is a martingale. Applying the optional stopping theorem (after verifying the necessary conditions) gives , which rearranges to Wald's equation.
Sequential analysis and hypothesis testing
Martingale stopping theorems underpin sequential testing procedures, where data arrive one observation at a time and you want to reach a decision as quickly as possible while controlling error rates.
The Sequential Probability Ratio Test (SPRT), developed by Wald, is the prime example. The likelihood ratio process forms a martingale (under the null hypothesis), and the stopping boundaries are chosen so that the type I and type II error probabilities stay below specified thresholds. The optional stopping theorem is what guarantees the error control works, and Wald's equation helps compute the expected sample size.
Relationship to other concepts
Martingales vs supermartingales
A supermartingale replaces the equality in the martingale property with an inequality:
This models an "unfavorable game" where the process tends to decrease over time. Similarly, a submartingale satisfies .
Both the convergence theorem and the optional stopping theorem have supermartingale analogues. For supermartingales, optional stopping gives the inequality (under appropriate conditions), which is useful for bounding probabilities and expected values.
Stopping times vs Markov times
In older literature, you'll sometimes see the term Markov time used as a synonym for stopping time. In some treatments, a Markov time carries the additional connotation that the process being stopped is Markov, so the stopping decision depends only on the current state rather than the full history.
For Markov chains, the first hitting time of a particular state or set of states is a natural example. The strong Markov property then guarantees that the process "restarts" at the hitting time, which is a powerful tool for analyzing recurrence and transience.
Martingale stopping vs optimal stopping
Optimal stopping problems ask: when should you stop to maximize (or minimize) an expected payoff? This is a decision problem, whereas martingale stopping theorems are structural results about stopped processes.
Classic examples of optimal stopping include:
- The secretary problem: You interview candidates sequentially and must hire one, with no callbacks. The optimal strategy rejects the first candidates, then hires the next one who's the best seen so far.
- American option pricing: The holder of an American option chooses when to exercise. The option price equals the value of an optimal stopping problem, and the Snell envelope (the smallest supermartingale dominating the payoff process) characterizes the solution.
Martingale methods, especially the optional stopping theorem and supermartingale inequalities, are the primary tools for solving these problems.