Neutralising a Model's Output Against Risk Factors
A model's raw predictions usually carry unintended sector, size, or style tilts absorbed as a byproduct of training — neutralizing those tilts after prediction, before sizing positions, is what keeps a strategy's return attributable to the signal rather than to a hidden factor bet.
Prerequisites: Choosing the Target: Raw, Excess or Residual Returns, Factor Neutralisation
A model trained to predict returns doesn't know or care that it's implicitly learning "small-cap stocks did well this year" if small caps happen to have outperformed during the training period. Its output — a score per stock — can carry that sector, size, or momentum tilt baked in, invisibly, without the researcher having asked for it. Post-prediction risk neutralization is the step that strips those unintended factor bets back out before the scores are turned into positions.
A model's raw prediction score often contains, mixed together with genuine stock-specific information, exposure to known risk factors it was never asked to bet on — projecting the score onto a risk model and keeping only the residual isolates the part of the prediction that is actually idiosyncratic alpha.
Why the model's output isn't automatically clean
Nothing in a typical loss function tells a model "please don't just rediscover that value stocks did well this decade." If value happened to work during the training window, a model with access to any feature correlated with value exposure will happily use it, and its output score will end up tilted toward exactly the stocks a value factor would already favor. Trading that score directly means implicitly re-running a known factor bet through an ML model — with none of the transparency or risk budgeting a dedicated factor strategy would have.
In words: regress the raw score on a matrix of known risk-factor exposures (sector dummies, size, value, momentum, whatever the risk model tracks), and keep only the leftover — the part of the score the known factors can't explain. That leftover is what should actually drive position sizing.
The neutralization is exactly this picture: fit a line (or plane, with many factors) through the raw scores against known factor exposures, and what's left over — the residual, the vertical distance off the fitted line — is the part of the score worth trading.
Worked example
A model's raw scores for 400 stocks have a strong positive correlation (0.6) with the stocks' size-factor exposure — smaller stocks are systematically scored higher, regardless of any stock-specific information the model also picked up.
- Raw score. Sorting on the raw score and going long the top decile, short the bottom, produces a portfolio that is effectively short large caps and long small caps — a bet on the size factor riding along with, and possibly dominating, whatever genuine signal exists.
- Regress out size (and other factors). After regressing the raw score against the stock's size, sector, and other risk-model exposures and taking the residual, the correlation between the neutralized score and size exposure drops to near zero.
- Result. A portfolio built from the neutralized score is far closer to size- and sector-neutral, and its backtested return, though smaller in magnitude than the raw score's backtest, is no longer just a relabeled size-factor trade — its Sharpe ratio, adjusted for the removed factor risk, is often more attractive once size-factor volatility is no longer inflating the raw version's apparent returns.
What this means in practice
Neutralization is typically performed at each rebalance date using the same risk model the desk already uses for portfolio construction, so the neutralized score and the portfolio optimizer are working from a consistent view of what counts as a "known" factor. Skipping this step is one of the most common reasons a promising backtest fails to translate into standalone alpha once combined with other signals that are already exposed to the same factors.
A model backtested on raw scores can show an impressive Sharpe ratio that is mostly a relabeled factor bet — combine it into a book that already runs that factor elsewhere, and the apparent diversification benefit vanishes because both were the same bet wearing different names. Always check a new signal's factor exposures before assuming it adds anything incremental.
Related concepts
Practice in interviews
Further reading
- Grinold & Kahn, Active Portfolio Management (ch. on portfolio construction)
- de Prado, Advances in Financial Machine Learning (ch. on backtesting)