Heterogeneous Treatment Effects and Causal Forests
Different people, funds, or trades respond differently to the same intervention — causal forests estimate how the treatment effect itself varies with observed characteristics, instead of collapsing everything into one average number.
Prerequisites: ATE, ATT and Other Treatment Effect Estimands, Propensity Score Methods
A new order-routing algorithm improves average execution cost by 3 basis points across all trades. That single number hides a lot: maybe it saves 8bps on illiquid small caps and actually costs 1bp extra on liquid large caps. Averaging the two together tells you whether to keep the algorithm, but not who should actually use it. Heterogeneous treatment effect estimation, and causal forests specifically, answer the sharper question: for a given trade, given its characteristics, how much does this treatment actually help?
An analogy: not every patient responds the same
A new drug helps some patients a lot, does nothing for others, and mildly harms a few — but the headline "average effect" is a single positive number that erases that spread. A good doctor doesn't prescribe based on the population average; they use what they know about this patient (age, other conditions) to guess how much this patient will benefit. A causal forest is an automated version of that doctor: instead of estimating one average treatment effect, it grows many decision trees that repeatedly split the data on patient (or trade, or customer) characteristics, each split chosen specifically because it separates observations with different treatment effects — then averages across trees to produce a smooth effect estimate for any given feature vector.
The idea, one symbol at a time
Let denote the conditional average treatment effect (CATE): the expected effect of treatment for units with characteristics (e.g., trade size, spread, time of day). Formally, , where and are the (unobservable together) outcomes under treatment and control. In plain English: is the answer to "how much does treatment help units that look like ?" A causal forest estimates by building trees that split on to maximize heterogeneity in across the resulting groups — the opposite of a standard regression forest, which splits to maximize predictive accuracy of itself. A key technical safeguard is honest splitting: one subsample of the data decides where to split, and a separate subsample estimates the effect within each leaf, which prevents the tree from chasing noise and reporting effects that are really just overfitting.
Worked example 1: a stylized routing split
Suppose a causal forest, trained on 50,000 historical trades with features including order size and average daily volume, finds one dominant split: trades under 5% of average daily volume versus trades above. Within the small-order leaf, the average treatment effect (new algorithm minus old) is bps (saves cost). Within the large-order leaf, bps (costs slightly more, perhaps because the new algorithm is too aggressive and creates market impact on large orders). The pooled average across all trades might report bps — a number that would lead you to roll out the algorithm everywhere, when the honest policy is: use it for small orders, keep the old algorithm for large ones.
Worked example 2: quantifying a covariate gradient
Now suppose within the small-order leaf, the forest further reports as roughly linear in bid-ask spread (in bps): . For a tight-spread stock with : bps. For a wide-spread stock with : bps. The algorithm helps more, not less, as spreads widen — plausible, since a smarter router has more room to add value when there's more spread to save. This kind of gradient, rather than a single number, is what a causal forest is built to surface.
What this means in practice
Heterogeneous treatment effect estimation is what turns "does this thing work?" into "who should get this thing?" — sizing an execution algorithm's rollout by trade type, targeting a marketing discount at the customers it actually moves, or deciding which regime a mean-reversion overlay should be switched on in. It builds directly on the machinery of Average Treatment Effect Variants and Propensity Score Methods but replaces a single number with a function of covariates, which is what Policy Learning and Optimal Treatment Rules then uses to assign treatment.
A causal forest estimates the conditional average treatment effect tau(x) — how much treatment helps units with characteristics x — by growing trees that split on covariates to maximize differences in treatment effect across groups, using honest splitting (separate data for choosing splits and estimating effects) so estimates aren't just overfit noise.
It is tempting to read every leaf-level split as a discovered causal mechanism, but with enough covariates a forest will find some subgroup with an inflated-looking effect purely by chance, even under honest splitting — subgroup effects need their own confidence intervals and, ideally, out-of-sample validation before being treated as real. A striking-looking heterogeneity pattern in one dataset is a hypothesis to test, not a fact to act on immediately.
Related concepts
Practice in interviews
Further reading
- Wager & Athey, 'Estimation and Inference of Heterogeneous Treatment Effects using Random Forests', JASA
- Athey, Tibshirani & Wager, 'Generalized Random Forests', Annals of Statistics