Separate direct and mediated causal effects in a fictional execution-policy model, and see why randomised treatment does not remove mediator–outcome confounding.
Mediation analysis
Mediation analysis studies how an exposure or intervention affects an outcome through an intermediate variable, called a mediator. For a quant evaluating an execution policy, it separates “did the policy change trading cost?” from “how much of that change passed through execution intensity?” The second question requires stronger causal inference assumptions than a comparison of average costs.
A policy, a mechanism and a cost
Consider a fictional execution experiment. Let X=0 denote a baseline schedule and X=1 an accelerated schedule. Let M be a centred execution-intensity score, measured after assignment but before the final cost is measured. Let Y be centred implementation shortfall in basis points of parent-order notional; a positive change means higher cost.
Assume the following structural equations describe interventions, rather than merely fitting historical observations:
M=2X+u,Y=3X+4M+v.
Here u and v are independent, zero-mean disturbances, independent of randomised X. Their distributions stay unchanged when X is set externally. Assume no interference between experimental orders. There is no XM interaction: one extra score point changes cost by 4 bp under either schedule.
Changing X from 0 to 1 increases M by 2 points. The mediated route therefore adds 2×4=8 bp. Holding the mediator fixed leaves a 3 bp direct increase. Substitution checks the total:
Y=3X+4(2X+u)+v=11X+4u+v.
Thus the intervention adds 11 bp in total: 3 bp directly and 8 bp through the chosen score. These are consequences of the fictional model, not estimated trading costs. “Direct” means outside this mediator; it can include other unmodelled mechanisms, rather than an instantaneous physical effect.
Fictional causal execution model: changing policy X from 0 to 1 raises intensity M by 2 score points; each point adds 4 bp of shortfall. The mediated effect is 8 bp, direct effect 3 bp and total effect 11 bp.
Original fictional path diagram. The arrows state the assumed causal structure; the calculation does not establish that real execution data follow it.
Which direct effect?
Using the potential outcomes framework, write M(x) for the mediator under policy x, and Y(x,m) for the outcome if both policy and mediator were set to x,m. Population-average effects for the change from 0 to 1 include:
Target
Definition
Question
Total effect
E[Y(1,M(1))−Y(0,M(0))]
What changes when the whole policy changes?
Controlled direct effect at m
E[Y(1,m)−Y(0,m)]
What changes if everyone’s mediator is fixed to the same m?
Natural direct effect
E[Y(1,M(0))−Y(0,M(0))]
What changes while each order retains its baseline mediator value?
Natural indirect effect at policy 1
E[Y(1,M(1))−Y(1,M(0))]
What changes through the mediator while policy stays at 1?
The last two sum to the total effect by adding and subtracting the same counterfactual outcome. They compare hypothetical worlds; the same order’s M(0) and M(1) are not jointly observed. Controlled and natural effects answer different questions. Pearl’s original formulation distinguishes them explicitly.
In the additive example, the controlled direct effect is 3 bp for every m, the natural direct effect is 3 bp, and the natural indirect effect is 8 bp. With an interaction, the controlled direct effect can depend on m, and the indirect effect can depend on which policy is held fixed. The displayed natural-effect pair still decomposes the total; the simple coefficient product need not describe every indirect-effect contrast.
Why two regressions are not enough
Fitting M on X, then Y on X and M, gives associations. Interpreting their coefficients causally requires a defensible design. A standard identification route assumes sufficient pre-treatment adjustment for exposure–mediator, exposure–outcome and mediator–outcome confounding, plus consistency, suitable overlap and no interference. Natural effects require additional counterfactual restrictions; familiar assumptions also exclude mediator–outcome confounders caused by the exposure. These requirements are stronger than a good regression fit.
Randomising X helps with exposure assignment. It does not randomise M: unrecorded market stress may increase both intensity and shortfall. The coefficient on M then mixes its effect with stress. Under the appropriate identification assumptions, linearity and no exposure–mediator interaction justify the simple product method. Imai, Keele and Tingley explain this connection and sensitivity analysis for violations.
The distinction between an endogenous slope and a structural effect is developed in Endogeneity and Instrumental Variables (public preview; full lesson requires membership). It supports the regression warning here, rather than providing a mediation identification strategy.
The danger of controlling for what the policy changes
Including M blocks the mediated route, so its adjusted X coefficient is not generally a total effect. It is not automatically a direct effect either. If hidden stress affects both M and Y, conditioning on M can open the collider path X→M←stress→Y.
A harder case arises if the policy changes market conditions L, which subsequently affect both intensity and cost. Adjusting for L as though it were a baseline control does not generally identify natural effects; omitting it does not solve the confounding. This is post-treatment bias, not a request to add every available regressor. VanderWeele, Vansteelandt and Robins show why exposure-induced mediator–outcome confounding obstructs the usual natural-effect identification and discuss alternative effect definitions.
For an execution study, specify the timing, mediator, outcome horizon and target contrast before fitting. Report uncertainty and sensitivity to hidden confounding; a precise coefficient product cannot compensate for an unidentified mechanism.
Practice: a randomised policy, a confounded mediator
In another fictional model, X is randomised independently of zero-mean hidden stress U:
M=X+U,Y=2X+3M+2U.
There are no interactions. What are the structural direct, indirect and total effects of changing X from 0 to 1? Would the coefficient on X in a regression of Y on X and M recover the direct effect?
Answer. The direct effect is 2 outcome units, the indirect effect is 1×3=3, and the total is 5. But U=M−X, so the observed equation becomes Y=5M. With nondegenerate independent variation in X and U, the adjusted X coefficient is therefore 0, not 2. Randomisation identifies the total contrast here; it does not remove hidden mediator–outcome confounding. The accompanying numerical check verifies this with all four equally likely combinations of X∈{0,1} and U∈{−1,1}.
Sources
Pearl, J. (2001), Direct and Indirect Effects, §§3.2–3.6: controlled and natural effects, identification and decomposition.
Imai, K., Keele, L. and Tingley, D. (2010), A General Approach to Causal Mediation Analysis, pp. 311–315: counterfactual definitions, sequential ignorability, coefficient products and interactions.