Quant Memo
Core

Confounding in Financial Data

A confounder is a hidden variable that drives both a strategy's signal and its outcome, making a correlation look like a tradeable edge when it is really just two effects of the same underlying cause.

Prerequisites: Overfitting

A researcher finds that stocks with more analyst coverage tend to outperform. Tempting conclusion: buy stocks getting more analyst attention. But analysts do not cover companies at random — they cover larger, more liquid, better-run companies, and those same characteristics (size, liquidity, quality) independently predict lower volatility and steadier returns. Analyst coverage did not cause the outperformance. Both analyst coverage and outperformance are downstream of company quality. Trade the coverage signal directly and you are really just trading a noisier, more expensive proxy for quality.

This is confounding: a variable ZZ (company quality) that causally affects both the thing you are using as a signal (XX, analyst coverage) and the outcome you care about (YY, returns), producing a correlation between XX and YY with no direct causal link between them at all.

Why correlation alone cannot tell you this

A backtest measures correlation between signal and outcome, full stop. It cannot distinguish "XX causes YY" from "ZZ causes both XX and YY" from pure "XX and YY happen to move together by chance." All three produce the identical statistical signature in historical data — the same non-zero correlation, the same apparently profitable backtest. Confounding is dangerous precisely because it survives every purely statistical check; you find it by reasoning about the mechanism, not by running another regression on the same data.

Z company quality X analyst coverage Y stock return observed correlation, not causal
Z causes both X and Y. The dashed X–Y line is what a backtest sees; the solid arrows are what actually happened. Trading on X captures Z's effect only partially and unreliably.

Worked example

A researcher backtests a signal: stocks whose CEOs bought shares on the open market in the past month subsequently outperform by 2% over the following quarter, statistically significant across 800 events. Before trading it, consider the confound: insider buying tends to cluster right after a stock has already fallen sharply — CEOs buy the dip. If post-drawdown stocks mechanically mean-revert somewhat regardless of insider activity (a separate, well-documented effect), then "recent large drawdown" is a confounder ZZ: it drives both the insider-buying signal XX and part of the subsequent return YY. Controlling for the size of the prior drawdown — comparing insider-buying stocks only against other stocks with a similarly-sized recent drawdown — is the direct test. If the 2% edge shrinks toward zero once drawdown is held fixed, the original signal was mostly confounding, not insider information; if it survives, drawdown was not the whole story.

A confounder inflates or fabricates an association between two variables that have no direct causal link between them. The fix is not a fancier correlation test — it is identifying the plausible common cause and controlling for it, or finding a source of variation in XX that has nothing to do with ZZ.

Where quants meet this

Confounding is the standing threat behind almost every cross-sectional "anomaly" search: liquidity confounds size effects, sector membership confounds many factor exposures, macro regime confounds nearly everything measured over a period that spans a crisis. Double Machine Learning and formal treatment-effect estimation are the systematic tools for adjusting out known confounders at scale; instrumental variables handle the harder case where the confounder is unobserved entirely.

Controlling for a variable that is not actually a confounder but instead sits between XX and YY on the causal path — a "mediator" — can destroy a real effect rather than reveal a fake one. Distinguishing a confounder (a common upstream cause) from a mediator (a downstream consequence) requires a hypothesis about mechanism; the data alone will not tell you which one you are looking at.

Confounding by regime is the financial-data special case

Most fields worry about confounders that vary across individuals in a cross-section. Financial time series has a version that is easy to miss: a macro regime — a rate-hiking cycle, a period of unusually low volatility, a bull market — can confound a relationship measured only over the years that regime happened to dominate. A momentum strategy backtested over a decade that was mostly a strong bull market will show momentum "working," but bull-market conditions may be a confounder driving both momentum's apparent success and the overall positive drift of the market, rather than momentum having genuine, regime-independent predictive power. The test is the same as anywhere else: does the relationship survive when you condition on regime, looking separately within bull markets, bear markets and sideways markets, rather than pooling years that were never structurally comparable to begin with.

Randomisation as the gold-standard fix

Outside of finance, the cleanest way to eliminate confounding entirely is randomisation: assign treatment by coin flip, and by construction no confounder — measured or not — can differ systematically between treated and untreated groups, because the assignment did not depend on anything about the individual. True randomised experiments are rare in markets (you cannot randomly assign which stocks get analyst coverage), which is precisely why quant research leans so heavily on the statistical adjustments — matching on observed confounders, double machine learning, natural experiments where some real-world event mimics random assignment — that this whole domain is built around. Every one of those methods is best understood as an attempt to approximate, after the fact, what a coin flip would have guaranteed for free.

Related concepts

Practice in interviews

Further reading

  • Pearl, Causality, ch. 1–3
  • Angrist & Pischke, Mostly Harmless Econometrics, ch. 3
ShareTwitterLinkedIn