Sigma-Algebras and Filtrations
A sigma-algebra is the list of questions your information can answer; a filtration is that list growing as time passes. Together they are how probability theory writes down "what a trader knows at 10:30 this morning" — the machinery behind martingales, conditional expectation and every no-look-ahead rule in backtesting.
Prerequisites: Probability Spaces, Conditional Expectation
Every backtest bug you have ever chased comes down to one question: what did I actually know at that moment? If your signal at 10:00 quietly used the 10:30 print, the strategy looks brilliant and is worthless. Probability theory has an exact, checkable way to write that down — and once you have it, "no look-ahead" stops being a code-review habit and becomes a condition you can verify.
The idea before any symbols
Imagine a sealed envelope containing the full record of how tomorrow plays out — every tick, in order. You cannot open it. What you can do is ask questions, and at each moment of the day you are allowed a specific set of questions.
At 9:00, before the open, you can ask almost nothing: "will the day happen at all?" (yes) and "will it not happen?" (no). By 10:00, an hour of tape has printed, so you can now ask "did the stock trade above 101 in the first hour?" and get a definite yes or no. By the close, you can ask anything.
A sigma-algebra is that list of answerable questions at one moment. A filtration is the whole sequence of lists, one per moment, each containing everything the previous ones did. Information accumulates; you never un-learn a print. That is the entire idea. The formalism below is just bookkeeping to make it precise.
The bookkeeping
Start with the sample space (capital omega): the set of every complete way the world could turn out. One element is one full scenario, one path through the day.
An event is a subset of — a bundle of scenarios. "The stock closed up" is the set of all in which it closed up. Asking a yes/no question is naming a subset.
A sigma-algebra (script F) on is a collection of subsets satisfying three rules:
- — you can always ask "did something happen?"
- If then , where means "everything not in " — if you can answer a question, you can answer its negation.
- If then — if you can answer each of a list of questions, you can answer "did any of them happen?"
In words: a sigma-algebra is a set of questions that is closed under "not" and "or", so anything you can build out of answerable questions is itself answerable. Rule 3 allows infinitely many at once, which is what "sigma" refers to, and it is exactly what lets you handle questions like "did the price ever touch 105?"
Worked example 1: two coin flips, listed out
Let the stock start at and, each step, either multiply by (up) or by (down). Two steps gives four scenarios:
At time 0 you know nothing. The only answerable questions are the trivial ones:
At time 1 you have seen the first move. The scenarios split into two groups you can tell apart: ("first move was up") and ("first move was down"). Every answerable question is built from those two blocks:
Check the three rules by hand. Rule 1: is in the list. Rule 2: the complement of is , which is in the list; the complement of is , also in the list. Rule 3: , in the list. All three hold, so is a genuine sigma-algebra.
At time 2 everything is resolved and every one of the subsets is answerable, so is the full power set.
Now the payoff. Consider the event "the stock finishes at 96", which is the set . Is it in ? Look at the four-item list: no. So at time 1 you cannot answer "will it finish at 96?" — and you should not be able to, because after one up move it is still open whether the second move goes up or down. The formalism caught it automatically. Notice also that the chain holds: , with 2, 4 and 16 sets. That growing chain is the filtration .
Worked example 2: which quantities are "known" yet
A random variable is -measurable when every question about its value is answerable using . Formally, for each number the set must belong to ; in words, you can always say whether came in at or below any level you name.
Test , the price after one step, against :
- , which is in . ✓
- , which is in . ✓
So is -measurable — sensible, you have seen it. Now test :
- , which is not in the four-set list . ✗
So is not -measurable. Tomorrow's price is not knowable today, and the sets prove it.
What you can do at time 1 is form a best guess, and that is exactly conditional expectation. Let each move be up or down with probability . On the cell :
On the cell : . Both answers equal on that cell, so — the price is a martingale under these probabilities. Note what conditional expectation is: a random variable that is constant on each cell of the partition. It has to be, because it is only allowed to use information you have.
Filtrations for continuous time
The same construction runs with paths instead of four scenarios. Each is now an entire continuous trajectory, and is "everything decided by watching the path up to time ". Run the explorer below and watch several sampled paths. Freeze your eye at the halfway mark: the paths that overlap to the left of that mark are, at that instant, still in the same cell — indistinguishable to you. Everything to the right is still sealed in the envelope.
A process is adapted to when is -measurable for every : its value today uses only today's information. That single word is the formal statement of "no look-ahead", and it is the hypothesis on essentially every theorem in stochastic calculus.
is not a set of outcomes — it is a set of questions you can answer at time . A filtration is a nested chain, for , so information only ever grows. "Adapted" means your process uses no information from the future.
What this means in practice
- Backtesting. Look-ahead bias is using a quantity that is not -measurable. Point-in-time databases, lagged fundamentals and embargoed cross-validation exist to keep features adapted. See look-ahead bias and purged and embargoed CV.
- Exit rules. "Sell when the price first touches 105" is decidable from the path so far, so it is a legitimate stopping time. "Sell at the day's high" is not — you learn the high only at the close, and optional stopping theorems fail loudly on that kind.
- Pricing. Risk-neutral prices are conditional expectations given , and hedging arguments require the hedge ratio to be adapted; otherwise you are trading on information you do not have.
- Why sigma-algebras rather than all subsets. On an uncountable you cannot consistently assign probabilities to every subset. Restricting to a sigma-algebra is what makes a coherent probability measure possible at all — see Lebesgue measure.
" is -measurable" does not mean is a constant, and it does not mean you know what will happen next. It means: if you were told which scenario the world is in, only to the resolution allows, you could still name 's value exactly. The other frequent slip is confusing adapted (value known at time ) with predictable (value known just before ). Trading rules must usually be predictable, not merely adapted — an "adapted" rule that uses the very tick it trades on is still cheating in practice.
For finite , forget the axioms and picture a partition: a sigma-algebra is a way of chopping into cells, and its events are exactly the unions of whole cells. Time passing splits cells into smaller cells. Finer partition, more information.
Practice in interviews
Further reading
- Williams, Probability with Martingales (ch. 1-3)
- Shreve, Stochastic Calculus for Finance II (ch. 2)