Quant Memo
Core

Feature Neutralization

Stripping a known, unwanted exposure — sector, market beta, size — out of a feature or prediction before it reaches the model, so the model is forced to learn from what's left rather than just rediscovering a factor you already know about.

Prerequisites: Regularization as a Prior

Suppose a feature meant to capture a firm's earnings quality turns out, on inspection, to just be a proxy for which sector a stock is in — tech firms always score high, utilities always score low. A model trained on that raw feature isn't learning anything about earnings quality; it's rediscovering "is this a tech stock," which you already knew and could have modeled directly and more robustly. Feature neutralization is the fix: regress the feature (or the model's prediction) against known exposures you don't want it riding on, and keep only what's left over — the residual.

The mechanics: regress out, keep the residual

Neutralization is ordinary linear regression used as a filter rather than a predictor. Fit the feature xx against a set of exposures ZZ you want to remove (sector dummies, market beta, size, or any prior factor):

x=Zβ+εx = Z\beta + \varepsilon

Every symbol here: xx is the raw feature for each stock, ZZ is a matrix of the unwanted exposures, β\beta is the fitted sensitivity of xx to those exposures, and ε\varepsilon is the residual — what's left of xx after its relationship with ZZ is subtracted out. You then use ε\varepsilon, not xx, as the model's input. In plain English: you're asking "of this feature's variation, how much is just riding on things I already understand, and how much is genuinely new information?" — and keeping only the new information.

Worked example: neutralizing a value score against sector

A "value score" feature has these raw values across five stocks, three of which are tech and two of which are utilities:

StockSectorRaw scoreSector averageNeutralized
ATech0.80.70.1
BTech0.60.7−0.1
CTech0.70.70.0
DUtility0.30.35−0.05
EUtility0.40.350.05

Here neutralization is done the simple way — subtract each stock's sector mean — which is exactly what a regression on sector dummies alone would produce. Notice the raw score makes it look like tech stocks (0.6–0.8) beat utilities (0.3–0.4) outright, but that gap is entirely explained by sector. The neutralized column shows the real, sector-independent signal: stock A stands out within tech, and stock E stands out within utilities, which is the comparison a cross-sector model actually needs to learn from.

tech (raw) utility (raw) neutralized
Left: raw scores separate cleanly by sector, drowning out the within-sector signal. Right: after neutralization, both sectors' residuals sit around the same level, leaving only the sector-independent variation.

What this means in practice

Neutralization is standard practice in quant equity research precisely because so many promising-looking features turn out to be disguised sector, size, or momentum bets — regressing those out before feeding a feature to a model (or before evaluating a factor's returns) forces an honest answer to "does this add anything new." It's also used on the output side: neutralizing a model's final predictions against known factors before portfolio construction, so the resulting book doesn't inherit unintended sector or beta tilts.

Feature neutralization regresses a feature against known, unwanted exposures and keeps only the residual — the part of the feature's variation that isn't just a repackaging of something you already know. It prevents models from getting credit for rediscovering sector, size, or beta bets rather than learning something genuinely new.

Related concepts

Practice in interviews

Further reading

  • de Prado, Advances in Financial Machine Learning, ch. 8
ShareTwitterLinkedIn