A single stock's return is mostly market and factor noise you have no edge in. Regress that away, and the residual — the stock's private wiggle — is where flow-driven mispricing lives, and it mean-reverts. One residual is untradeable noise; five hundred residuals, each carrying a sliver of edge, compound through breadth into a portfolio with a real information ratio. Stat-arb is reversal from lesson 8.1, industrialised by the fundamental law from lesson 1.9.
Per name, the payers are the same as single-stock reversal: funds meeting redemptions, index trackers rebalancing, investors chasing news — urgent, name-specific flow that pushes one stock away from what its factor exposures justify. The dangerous twist at portfolio scale: in a deleveraging, the counterparty absorbing your exit is another stat-arb book running nearly the same model, which is how a private margin call becomes an industry-wide cascade.
The idea
Take the reversal trade of lesson 8.1 and confront its biggest practical weakness. You buy Tuesday's big loser expecting a bounce — but why was it down? If the whole market fell 3%, your "loser" isn't cheap, it's just high-beta; buying it is a market bet, not a liquidity trade. If energy stocks cratered on an OPEC headline, the oil-and-gas loser on your screen is repricing with its sector. The raw return of a stock is a bundle: market move, sector move, style moves (value having a good week, momentum crashing), and only then — in what's left — the private, name-specific component where a redemption dump or a chased rumour actually shows up. Trading raw returns means trading the whole bundle while pretending you only hold the last piece.
So decompose. Model each stock's return as factor exposures times factor returns, plus a leftover:
where the 's are common drivers — market, sectors, value, momentum, size, however you build them — the 's are stock 's estimated exposures, and is the residual: the part of today's move that none of the common drivers explains. The stat-arb claim is specific: residuals mean-revert. A stock that fell 2% beyond what its factors justify was, more often than not, pushed by flow rather than information, and drifts back over days. Avellaneda and Lee (Avellaneda & Lee 2010) give the canonical public description of this machine — factor removal via principal components, an Ornstein-Uhlenbeck model fitted to each residual, trade the extremes — and report that it worked handsomely in US equities in the 1997–2007 sample, weakening toward the end of it.
Why does the industrial version make sense when the single-pair version (lesson 8.2) was so fragile? One word, and it's the most important word in this lesson: breadth. Recall the fundamental law from lesson 1.9:
Your information coefficient — the correlation between your signal and what actually happens next — is tiny in this game. A residual-reversal signal that's right 51% of the time, an IC of maybe 0.02, is good. On one stock, that edge is statistically invisible; you'd need decades to distinguish it from luck. But the machine takes that 0.02 across 500 stocks, every day, each residual scrubbed of the common factors that would otherwise make the bets overlap. Independence is what the scrubbing buys: raw returns share factor exposure, so 500 raw-return bets might be effectively 30 independent ones; 500 residual bets are much closer to 500. Grinold's law (Grinold 1989) then does the arithmetic: bet-days per year is an IR north of 2 — in theory, before costs, with everything estimated perfectly. Every part of that caveat will tax you, but the shape of the argument is the entire reason stat-arb desks exist: it is a machine for converting microscopic per-bet edges into portfolio-level certainty via volume.
The counterparty story carries over from 8.1 wholesale — you are the warehouse for name-specific urgency — but scale adds a new character to the cast, and August 2007 introduced him violently. Khandani and Lo (Khandani & Lo 2011) reconstructed the week: starting August 6th, 2007, classic long-short equity strategies suffered huge, synchronized losses over three days — while the overall market was nearly flat — and then snapped back almost completely by the 10th. Their diagnosis: some multi-strategy book, hit by losses elsewhere (likely credit), rapidly unwound a large market-neutral equity portfolio; the unwind pushed every residual that book held against every other book holding the same residuals; those books hit their own risk limits and unwound too. Nothing was wrong with any company. The "idiosyncratic" residuals turned out to share a hidden factor: who owned them. When your counterparty stops being a redeeming mutual fund and becomes a mirror image of yourself, mean reversion inverts into momentum until the last levered copy is out.
The maths
Two pieces of machinery: getting residuals, and scoring them.
Getting residuals. You can define factors explicitly (market, sectors, style portfolios) and estimate each stock's betas by time-series regression — transparent, interpretable, and my recommendation for a first build. The alternative, used by Avellaneda-Lee (Avellaneda & Lee 2010), is to let the data define the factors via principal component analysis: take the correlation matrix of returns over a trailing window, extract the top eigenvectors (the first is always "the market"; the next several look like sectors), and regress each stock on those. Either way you arrive at the same object:
Scoring them. Accumulate each stock's residuals into a running level — think of it as the stock's private price path, de-factored — and fit a mean-reverting Ornstein-Uhlenbeck process, exactly as for the pair spread in 8.2:
The trading signal is the s-score: how stretched the residual level is, in units of its own equilibrium volatility:
where is the stationary standard deviation of the OU process — the natural yardstick for "how far is far". The book shorts stocks with high positive s-scores, buys deeply negative ones, exits near zero (Avellaneda-Lee's published thresholds: open around , close around 0.5–0.75), and holds hundreds of such positions simultaneously, each small, factor-neutral in aggregate by construction. Only stocks whose fitted implies a usefully short half-life — their cutoff: reversion faster than about a month — earn a slot; a residual that reverts slowly isn't a signal, it's inventory.
Worked example
Concrete numbers, small enough to check by hand. Suppose the market fell 1.0% today and tech fell a further 0.5%. Stock A (market beta 1.1, tech beta 0.8) returned −2.9%. Its factor-implied return was ; its residual is . Suppose A's accumulated residual level now sits at with fitted , /day (half-life ≈ 14 days), /day. Then and the s-score is — stretched, but shy of a 1.25 entry. Another 80 bp of negative residual tomorrow would trip it: buy A, hedge out its factor exposure, wait for the score to decay toward zero.
The portfolio-level arithmetic is where the design lives. Say each of 500 names carries an average absolute position of 0.2% of gross book, the per-bet IC is 0.02, and residual vol averages 0.9%/day. Per name per day the expected edge is on the order of bp of the position — invisible. Across 500 names it's still only ~1.8 bp of book per day gross — but with residuals near-independent, the volatility of that daily P&L is tiny too, and the ratio (the whole point) annualises respectably. Then subtract reality: at ~20% of the book turning over daily, 250 days a year, every basis point of per-trade cost removes roughly 0.5% of annual return. Institutional costs (sub-bp to ~1 bp) leave a business; 10 bp retail costs remove 5% a year from a strategy whose gross was never much more than that. The same skeleton in code:
# Illustrative daily cycle — real code needs point-in-time everything
F = trailing_pca_factors(returns[-252:], k=15) # fit on PAST window
beta = regress(returns[-252:], F) # exposures, past only
resid = returns.iloc[-1] - beta @ F.iloc[-1] # today's residuals
X = X + resid # accumulate levels
kappa, mu, sigma = fit_ou(X, window=60) # per-name OU fit
s = (X - mu) / (sigma / np.sqrt(2 * kappa))
target = np.where(s < -1.25, +1, np.where(s > 1.25, -1, exit_rule(s)))How you'd test it
Universe. The most liquid 500–1,000 US or developed-market names. The signal is stronger in illiquid stocks for the same reason as in 8.1 — the "signal" there is partly the cost — and the whole design collapses if you can't trade hundreds of names cheaply.
Data. Survivorship-free daily prices with delistings (a 500-name book will hold names that die), point-in-time universe and sector classifications, and clean corporate-action adjustment — a mis-adjusted split creates a monster residual that your model will lovingly buy.
The specific lookahead trap. The factor model itself. PCA fitted on the full sample knows the future: the eigenvectors encode correlations from years your backtest hasn't reached yet, and residuals computed against them are contaminated end to end — this one error can fabricate an entire strategy. Factors, betas, and OU parameters must all come from trailing windows that close before the bar you trade. Second trap, subtler: signals built at the close and "executed" at the same close. The residual-reversal edge decays fast; even close-to-next-open slippage visibly dents it, so backtest the delay you'll actually have.
What cost level kills it. Turnover is the tax collector here (lesson 3.3). With daily rebalancing and ~1-month half-lives, expect 15–25% of gross book turned per day. At that pace the strategy needs per-trade all-in costs at or below the low single-digit basis points — which is the institutional membership card. A retail implementation must slow down: weekly rebalance, wider entry thresholds, fewer names — each step trading away breadth (your IR) to buy cost reduction, and the honest version of that trade-off usually lands near "not worth running live, invaluable to have built."
What a null result looks like. After honest factors and honest delay: per-name IC statistically indistinguishable from zero at your achievable speed, or an IR under 0.5 before costs. Also watch the decade structure — Avellaneda-Lee's own out-of-sample years (2003–2007) were visibly thinner than the late-90s glory years (Avellaneda & Lee 2010); a backtest whose profits all live before 2003 is a history lesson, not a strategy.
What goes wrong
August 2007, forever. The canonical catastrophe deserves restating as a mechanism, because it will recur in every crowded quant trade you ever hold: when many levered books hold the same "idiosyncratic" positions, idiosyncrasy is an illusion — the shared owner is a factor, invisible in returns until someone deleverages (Khandani & Lo 2011). The losses came fast (days), reversed fast, and destroyed anyone forced out at the bottom by their own risk limits. Defences are structural, not statistical: moderate leverage, drawdown rules decided in advance, and the humility to assume your cleverest residual is also in ten other books.
The factor model eats the signal — or leaks it. Too few factors and your "residuals" secretly contain sector bets that trend rather than revert; too many and the model absorbs the very flow-pressure you're trying to trade, leaving pure noise. The choice of is a real hyperparameter with a real overfitting budget (lesson 2.3 applies — count every variant you try).
Estimation noise compounds. Five hundred names times (betas +
- + ) is thousands of estimated parameters refreshed on short windows. Shrinkage (lesson 4.4's toolkit) isn't optional at this parameter count; raw estimates hand the biggest positions to the biggest estimation errors, exactly as raw betas did in lesson 5.5.
Death by a thousand costs. No single failure — just an edge of a few basis points per position meeting spread, slippage, borrow on 250 shorts, and the occasional buy-in. Stat-arb is less a signal than a cost discipline with a signal attached; that is why the surviving practitioners are firms whose true edge is execution (lesson 8.7).
Decay watch
The public blueprint is fifteen-plus years old (Avellaneda & Lee 2010) and the strategy family is far older inside banks and funds; the fast end long ago became infrastructure — the market's de facto liquidity provision layer — while the slow end thinned through the 2000s in plain sight in the published record. Crowding isn't hypothetical here; it has a date, August 6th–10th 2007, when the strategy's own popularity manufactured a three-sigma event out of nothing (Khandani & Lo 2011). Yet the mechanism — urgency pays a fee, breadth aggregates fees — cannot fully decay while markets have impatient participants, and the framework (factor removal, residual scoring, breadth arithmetic) is the single most transferable piece of machinery in this module: you will reuse it for hedging, risk decomposition, and signal evaluation whether or not you ever run the strategy. A reasonable 2026 stance: crowded — build it to learn it, run it live only if your all-in costs genuinely sit in the low single-digit basis points, and hold it with 2007 taped to the monitor.