What a murmuration of starlings taught me about the stock market
There's a video on YouTube — I've watched it probably forty times — of a murmuration of starlings over the Somerset Levels at dusk.
If you haven't seen one: hundreds of thousands of birds, moving together as a single fluid shape. Expanding, contracting, rippling, wheeling. The shape has a kind of intelligence that no individual bird possesses. They're not following a leader. There's no conductor. Each bird is just responding to its seven nearest neighbours.
The result is something that looks, from a distance, almost alive. A single organism made of thousands of individual ones.
Watch a single starling. Follow one bird. It's basically random. It darts, it adjusts, it responds to what's immediately around it. No discernible pattern. Pure noise.
Now pull back.
Individual stocks are the single starling
If you watch a single stock — say, Mastercard — it moves in ways that are genuinely difficult to predict. Earnings, analyst upgrades, macro data, sector rotation, momentum, retail sentiment, hedge fund positioning. Any given day, the move is noise.
Quants have been trying to predict individual stock moves for decades. The best of them get marginal edges, at enormous cost, for brief windows before the market closes the gap.
The single starling is very hard to predict.
Pairs of correlated stocks are the murmuration
But Mastercard doesn't move alone. Visa is right there with it. Same customers. Same economic exposure. Same regulatory environment. When one moves, the other almost always follows.
Together, they move like a murmuration. There's a shape to it. A pattern. A relationship.
Any starling that wanders too far from the flock gets pulled back in. Not by a rule. Not by a mechanism you can point to. Just by the fundamental forces that keep the flock together.
Any stock in a correlated pair that wanders too far from its partner gets pulled back in. Not always immediately. Not always in a straight line. But pulled back.
The distance is measurable. That's the z-score.
When Mastercard drifts two standard deviations from Visa — when the single starling has wandered too far from the flock — the z-score tells you exactly how far it's gone.
The pull is real. That's mean reversion.
The same underlying forces that created the correlation in the first place start pulling the pair back together. Investors notice the valuation discrepancy. Relative value traders move in. The gap closes.
The scanner watches 1,180 murmurations
I built a scanner that watches 1,180 pairs every single day.
Not individual stocks. Pairs. Relationships. Murmurations.
Each night, it calculates the spread for every pair. It checks whether any pair has drifted beyond two standard deviations from its historical mean. When one has — when a starling has wandered too far from the flock — it generates a signal.
I didn't invent the underlying principle. The birds were murmurating long before any of us were watching.
I didn't invent the maths. Z-scores and mean reversion have been in the quant toolkit since the 1980s.
I just built the scanner that watches all 1,180 murmurations every single day and tells you when one of them is out of shape.
"The individual is random. The relationship is predictable. Trade the relationship."
That's the whole thing, really. Forty years of quantitative finance, one paragraph.
The rest is just watching the birds.