Feature engineering is the process of transforming raw data into meaningful inputs for quantitative models. It involves selecting, cleaning, normalizing, and combining variables to improve predictive power.
Examples include creating momentum indicators from prices, profitability ratios from financial statements, or volatility measures from returns.
Good feature engineering often matters more than complex algorithms. Well-designed features capture economic intuition and reduce noise.
Quant workflows emphasize stability, interpretability, and robustness when engineering features. Overly intricate transformations increase the risk of overfitting.
Feature engineering bridges domain knowledge and machine learning, converting financial intuition into systematic signals.
From raw data to model inputs
| Raw data | Example features |
|---|---|
| Prices | 12-1 month momentum, 60-day volatility, distance from the 200-day average |
| Financial statements | Return on equity, profit margins, debt to equity, cash flow compared with profit |
| Analyst estimates | Change in forecasts over three months, dispersion between analysts |
| Volume and trades | Average daily traded value, share of days with no trades |
Common transformations
- Ratios and changes: turning levels into growth rates or margins.
- Standardising: converting values to comparable scores. See z-score normalization.
- Handling extremes: capping outliers so one value does not dominate.
- Relative scoring: comparing each stock with its sector or peers. See factor neutralization.
- Lagging: using only data that was available on the decision date.
A point that is easy to miss: reporting dates
A company's quarterly results are published weeks after the quarter ends. A feature built from a quarter's profit must be assigned to the date the result was announced, not the date the quarter ended. Otherwise a backtest uses numbers nobody had at the time, and the results look better than they could have been.
Other pitfalls
- Too many features. Each extra feature gives a model more room to fit noise. See overfitting.
- Leakage. A feature that accidentally contains future information produces results that cannot be repeated.
- Missing and changed data. Companies stop reporting, restate figures or change definitions, and each case needs a rule.
- No economic reason. Features that have no logic behind them are more likely to be coincidences. See correlation vs causation.
Features are tested on data not used to build them. See out-of-sample testing and PCA in quant finance, which can reduce many features to a few.
Frequently asked questions
What is feature engineering?
It is the work of turning raw data, such as prices and financial statements, into clean, comparable inputs, called features, that a model can use.
Why does the reporting date matter?
Because results are published after the period they cover. Using the period-end date instead of the announcement date lets a backtest see information that was not yet public.
Is more features always better?
No. More features give a model more room to fit noise. Features with a sound economic reason and good testing are preferred.
How are features checked?
By testing them on data that was not used to build them, checking they behave sensibly across periods, and reviewing how they handle missing or restated data.