Cointegration

AlphaNova
3 min readJan 24, 2025

--

Let’s chat about this arcane beast called cointegration. Back in the day, it was all the rage — still makes appearances on the CVs of noobs bragging about their “cointegration strategy” on stock pairs or baskets.

Confession: I used to be one of those noobs. Let me break it down in plain English, though, because this thing is an academic’s fever dream of complexity.

I once explained it to a super sharp hedge fund manager — guy loved it. Can’t say the metaphor is 100% mine; I cobbled it together from random blogs, but it clicks.

Here’s the gist: Picture a strategy where you trade one asset long and another short, banking on the idea that the pair will eventually snap back to some mean.

Now, that sounds like basic correlation, right? Nope. Not even close — at least not if you’re the kind of math-obsessed nerd who takes stats seriously. Some pairs might be super correlated mathematically but not cointegrated, and vice versa. The math isn’t hard, but the nuance? That’s the real trick.

So here’s the metaphor: Imagine two nerds in a park, magically connected like quantum-entangled weirdos. Every time one makes a move, the other “senses” it and adjusts, even if they’re 100 meters apart. Over time, no matter where they wander, you can kinda predict their next steps relative to each other. Call it “correlation of moves.” It’s how some market relationships work — like how the S&P 500 is oddly correlated with AUD/JPY. Risk-on, risk-off vibes.

Now flip the script: Two drunks, same park, but they’re chained at the ankles with some elastic rope. Their moves are a mess — zero correlation. Pure randomness. But here’s the kicker: After hours of staggering around, they’re still close to each other. That’s cointegration.

In finance, the purest examples of cointegration are dual-listed assets (same stock on different exchanges) or cash vs. futures. Everything else? Cointegrated until it’s not. The moment that chain snaps — watch out. But calling something “temporarily cointegrated”? Yeah, no.

For truly cointegrated pairs, like NKY futures across exchanges, it’s less about fancy math and more about optimizing servers and maybe dabbling in physics. Fun fact: Some dude (Harvard guy, I think) even got a patent for applying Special Relativity to trading arbitrage on dual listings. Wild.

On my end, I got swept up in the hype — built pipelines to scan for pairs, test for temporary cointegration, calibrate Ornstein-Uhlenbeck processes, all that jazz. Got geeky with Dickey-Fuller tests, even tried flipping Bayes’ Theorem to invert p-values and estimate the probability a pair isn’t cointegrated. Cool in theory. In practice? A rabbit hole of overfitting. And yep, there’s that word again: overfitting.

Look, going long some assets and shorting others isn’t a bad trading style. It’s my vibe. But whether you’re chasing correlation, cointegration, or some ranking scheme, beware: these strategies are negatively skewed. That means you’ll rake in small wins most of the time, then get clobbered by rare, massive losses. Facts.

It’s funny how nerds get tribal over this stuff. Correlation folks vs. cointegration folks vs. ranking folks — it’s like analog vs. digital, geometry vs. computer science. At the end of the day? All of it works. Until it doesn’t.

--

--

AlphaNova
AlphaNova

No responses yet