Causal Discovery from Observational Data
A family of algorithms that try to infer which variables cause which, using only patterns of correlation and conditional independence in historical data — no randomized experiment required.
Prerequisites: Correlation vs Causation, Confounding and the Backdoor Criterion
A backtest shows that a sentiment score, a volume spike, and a next-day return are all pairwise correlated. Which one causes which? You can't run a randomized trial on the market — you can't force sentiment to be high on some days and low on others while holding everything else fixed. Causal discovery is the attempt to recover a plausible causal structure anyway, purely from the statistical fingerprints left behind in observational data: which variables are independent of which others, and which become dependent (or independent) once you condition on a third variable.
An analogy: reconstructing a family tree from resemblances
Imagine you're handed photos of ten strangers and told to guess who is whose parent, sibling, or cousin, without any birth records. You can't observe the family tree directly, but you can look at patterns of resemblance: two people who look alike are probably related; but if a third person resembles both, and the resemblance between the first two vanishes once you account for the third, that third person is probably the actual parent and the other two are siblings who resemble each other only through the parent. Causal discovery algorithms do exactly this with variables instead of faces: they read off relatedness (correlation) and, crucially, conditional relatedness (does the correlation vanish once you control for a third variable?) to infer who is "related" to whom, and in which direction.
The mechanics, one piece at a time
The main tool is testing conditional independence: two variables and are conditionally independent given a set , written , if knowing makes carry no further information about . Algorithms like the PC algorithm start with every variable connected to every other, then remove an edge between and whenever some conditioning set makes them independent — in plain English, if controlling for other variables makes two things statistically unrelated, there's probably no direct causal arrow between them. What survives is a skeleton: a graph of variables that remain dependent no matter what you control for.
The second step, orienting edges, uses a specific pattern called a collider: if (both and cause , with no direct link between and ), then and are marginally independent but become dependent once you condition on . This is the opposite of the usual case, and it's the one fingerprint in observational data that can pin down a causal direction without an experiment. Finding this signature — independent alone, dependent once you condition — is how the algorithm decides which variable is the "collider" (the effect) rather than a cause.
Worked example 1: three trading signals
Suppose historical data shows momentum () and analyst-revision () are each correlated with next-day return (), but and are uncorrelated with each other on their own. Once you condition on (e.g., split the sample into up-days and down-days), and become correlated within each subgroup. That's the collider pattern: . In plain terms, momentum and analyst revisions are each independently informative about tomorrow's return, but neither one causes the other — the apparent link between them only shows up once you slice the data by the outcome they jointly influence.
Worked example 2: spotting a hidden common cause
Now suppose a data vendor's data-quality flag is correlated with both reported volume and reported volatility , and once you condition on alone — no other variable achieves this. That pattern (a single conditioning variable that screens off two others from each other) points to sitting on the causal path between them, or being their common cause: perhaps low-quality data days mechanically inflate both reported volume and volatility together. The algorithm doesn't prove this, but it flags as the variable to investigate before trusting and as independently informative features.
What this means in practice
In quant research, causal discovery is used to prune spurious feature relationships before they're fed to a model, to distinguish a genuinely predictive signal from one that only correlates with the outcome through a shared driver, and to build the kind of causal graph that a full backdoor-adjustment analysis (see Confounding and the Backdoor Criterion) needs as its starting point. It's exploratory, not confirmatory — it proposes candidate structures consistent with the data, which then need domain reasoning or, ideally, a natural experiment to confirm.
Causal discovery algorithms infer a causal graph's structure by testing which variables are statistically independent, and which pairs of otherwise-independent variables become dependent once you condition on a third — that specific "independent alone, dependent when conditioned" pattern is the only signature in observational data that can reveal a causal direction.
These algorithms find a structure consistent with the observed independence patterns, not necessarily the true causal structure — several different causal graphs can produce identical statistical fingerprints (this is called Markov equivalence), and unmeasured confounders can masquerade as direct causal links. Treat the output as a set of hypotheses to test, never as proven causal claims, especially in finance where hidden common drivers like regime or liquidity conditions are the rule rather than the exception.
Related concepts
Practice in interviews
Further reading
- Spirtes, Glymour, Scheines, Causation, Prediction, and Search
- Pearl, Causality, ch. 2