TL;DR
A martingale is a random process that plays a fair game. Read its value as your fortune after each round. Given everything that has happened so far, your expected fortune after the next round equals your fortune now. There is no average drift up and no average drift down. The word comes from a doubling betting system, and the idea now sits underneath much of probability theory.
Where you'll see it: in the theory of fair games, in the pricing of financial assets (where prices discounted for interest are martingales under a standard pricing measure), and in proofs about how long random algorithms run and how far they stray from their average behaviour.
Intuition
A fair game
Start with 10 dollars. Flip a fair coin: win one dollar on heads, lose one dollar on tails. Your fortune after the flip is random, but its average is 10, the same as before. Whatever happened in earlier flips, the next flip has an average change of zero. The sequence of fortunes is a martingale.
Change the coin so heads comes up 60% of the time, and the average change is now positive every round. That game is a submartingale: it favours you. A game that favours the house is a supermartingale. The martingale is the boundary case of a game that favours nobody.
The present is the best forecast
The defining feature is not that the future is unpredictable. It is that the best forecast of the next value, given the full history, is the current value. Like a forecast that says "tomorrow's expected temperature is today's temperature", it commits to a centre and says nothing about the direction of the next step.
This matters because it is a statement about averages. A single path of a martingale can go up a lot or down a lot. The claim is only that across all the ways the next step could go, the probabilities balance out.
Why it is worth a name
Many quantities that are not fair in an obvious way become fair after a correction. Remove a known drift and what is left may be a martingale. Once a process is known to be a martingale, a small set of powerful theorems applies, and those theorems tell you things like "no clever stopping rule can turn a fair game into a profitable one". That last point is the heart of why martingales matter.
The structure of information over time is shown below. Each step reveals a little more of the story, and a martingale's forecast depends only on what has been revealed so far.
flowchart LR F0[Time 0: nothing revealed yet] --> F1[Time 1: first step known] F1 --> F2[Time 2: first two steps known] F2 --> F3[Later times: more steps known]
The math
Information over time
Let be the collection of events you can answer yes or no to, using only what has happened up to and including step . The sequence is called a filtration. It grows, because nothing is forgotten. A process is adapted to the filtration if its value is known by time , that is, is determined by the information in .
Definition
A sequence of random variables adapted to a filtration is a martingale if
- for every , and
- for every .
The second condition uses conditional expectation. The average of the next value is taken given the whole history , not just given the current value . Conditioning on alone is a weaker property, and it does not give the theorems below.
Replace the equality with and you have a submartingale. Replace it with and you have a supermartingale. Equivalently, a martingale is a process whose increments have zero conditional mean: .
The constant mean
A martingale has the same average at every time. Take expectations of the second condition, and use the law of total expectation (the average of a conditional average is the overall average):
Repeating this step gives for every . The average fortune in the coin game stays at 10, as the intuition promised.
Example process: the symmetric random walk
Let be independent steps, each equal to or with probability one half. Let and . The filtration is everything the first steps reveal.
Since is known from and the next step is independent of the past with mean zero,
So is a martingale. The square is not. Expand the square of the next position:
using always. Then satisfies . The square grows by exactly one on average each step, and subtracting removes that drift. This is the discrete version of a fact about random walks and Brownian motion: the process is a martingale in continuous time.
Example process: the Pólya urn
An urn starts with one red ball and one blue ball. Draw a ball at random, return it, and add one more ball of the same colour. Let be the number of red balls and the total, so after draws . The red fraction is .
After the next draw, the red count is with probability and stays otherwise, and the total becomes . So
Here the numerator over the common denominator is , which cancels the factor . The red fraction is a martingale. It lies between 0 and 1, and a bounded martingale always converges to a limit, so the red fraction settles to a random value rather than to a fixed number.
Stopping times and optional stopping
A stopping time is a rule for deciding when to stop that uses only the information so far: the event must be known from . "Stop when you are ahead by 10 dollars" is a stopping time. "Stop on the day just before the price falls" is not, because it needs the future.
The optional stopping theorem, in its bounded form, says: if is a martingale and is a stopping time that never exceeds a fixed number , then
No strategy that stops using only the past can turn a fair game into a profitable one, as long as the stopping time is bounded. A second common version allows an unbounded provided it is finite with probability 1 and the martingale stopped at stays between two fixed numbers. The gambler's ruin example below uses the second version. Without conditions like these the theorem can fail, and that is how the doubling paradox in the tradeoffs section arises.
Worked examples
- Start with dollars.
- After one flip, is 11 or 9, each with probability one half. So .
- After two flips, is 12, 10, 10 or 8, each with probability one quarter. So .
- Interpretation: a single path can end at 8 or 12, but the average is pinned at 10 at every step. No betting pattern changes that average.
- Start with 1 red and 1 blue, so .
- After the first draw, the urn has 2 red and 1 blue with probability 1/2, giving . It has 1 red and 2 blue with probability 1/2, giving .
- Check the martingale property at the first step: .
- Now condition on (the urn has 2 red and 1 blue). A red draw gives 3 red out of 4, so , with probability . A blue draw gives 2 red out of 4, so , with probability .
- Then .
- Interpretation: whatever the early draws were, the expected next red fraction equals the current one. The fraction drifts randomly but does not drift on average.
Start a symmetric random walk at and stop as soon as it reaches 0 or 10. Call the stopping time . The walk is a martingale. The time is not bounded by a fixed number, but it is finite with probability 1 and the walk stopped at never leaves , so the second version of optional stopping applies.
- Let be the probability the walk reaches 10 before 0. At the stopping time, is 10 with probability and 0 with probability .
- Optional stopping gives .
- Compute the left side: .
- Solve: , so .
- Interpretation: starting at 3 in a 0-to-10 interval, the walk has a 30% chance of hitting 10 first. The general answer is , which is the line plotted below.
- P(reach 10 before 0) = a/10
Tradeoffs and failure modes
A martingale is a model of fairness, so the real question is when the model is wrong and when its theorems do not apply.
| Situation | What goes wrong | Better choice |
|---|---|---|
| Doubling bets after each loss (the historical "martingale" system) | Each bet is fair, yet the total risk is huge. | Count the chance of ruin, not only the expected gain (see below). |
| A stopping rule that peeks at the future | Optional stopping fails and the expected gain is no longer zero. | Stop only on information available at the time. |
| Unbounded stopping times or heavy-tailed steps | The simple theorem can fail, as in the doubling case. | Check integrability conditions, or use a bounded horizon. |
| Assuming zero drift for real data | Real prices and signals have trends. | Model the drift explicitly, as a submartingale or after detrending. |
| Conditioning on the current value only | The property can fail in general. | Condition on the full history, as the definition requires. |
The doubling strategy shows the trap. Bet 1 dollar, then 2 after a loss, then 4, and so on, stopping at the first win. If the first win comes at round , the bets lost total and the win returns , so the net gain is exactly +1. If the first rounds all lose, which has probability , the net loss is . The expected net gain is
The expected gain is zero, as a fair game should be. But with you win 1 dollar with probability about 0.999, and you lose 1023 dollars with probability about 0.001. The strategy is fair on average and deadly in practice. If you play only up to round , the stopping time is bounded and the theorem gives exactly this zero. Playing until the first win is unbounded and the stopped fortune has no lower limit, so the theorem's conditions fail, and the guaranteed +1 is not a free lunch because it needs unlimited funds.
History
The word "martingale" was used in 18th-century France for the doubling betting system above, and the gambler's version of the idea is older than its mathematics. The mathematical term was introduced by Jean Ville in the late 1930s, as part of the work that made probability a study of random processes. Paul Lévy had earlier studied processes with a similar fair-game property, and Joseph Doob built most of the core theory in the 1940s. His 1953 book Stochastic Processes made martingales central, including the convergence theorem for bounded martingales and the optional stopping results.
Martingales came into finance around 1979 to 1981, when Harrison, Kreps and Pliska showed that the absence of arbitrage can be expressed as the existence of a martingale pricing measure. That gave the theory its most famous practical use, and it is why the phrase "fair price" in finance means something precise.
Check yourself
QuestionRecall: state the two conditions for a sequence to be a martingale with respect to a filtration .Show answer
The sequence must be adapted to the filtration, with for every . Also, for every : given the whole history up to step , the expected next value equals the current value.
QuestionComputation: a symmetric walk starts at 4 and stops on reaching 0 or 10. What is the probability it reaches 10 first?Show answer
Let be that probability. Optional stopping gives , and is 10 with probability and 0 otherwise, so and . This is the general formula with and .
QuestionWhy: the doubling strategy has zero expected gain on every bet. Why can it still ruin a gambler?Show answer
The expected gain is zero, but the distribution is extremely lopsided. Most of the time the gambler gains a small amount, and with small probability the loss is enormous. The bankroll needed to survive the rare long losing streak grows exponentially, and the stopping rule (stop at the first win) has no bound on the losses along the way, so the optional stopping theorem's conditions fail and it does not protect against this. Expected value alone hides the risk.
QuestionApplied: a rule says to keep betting on a fair coin until you are 3 dollars ahead, or until 100 flips have passed, whichever comes first. Starting from 0 dollars, is the expected final fortune 0?Show answer
Yes. The rule is a stopping time, and it is bounded by 100 flips, so the bounded optional stopping theorem applies. The expected final fortune equals the starting fortune of 0. The 100-flip limit is what makes the result hold: without it, the rule is the unbounded case and the theorem would not guarantee the answer.