Skip to content

Feature engineering

Turning raw data into predictive variables — the step that separates signal from noise in quant models.

Cite this entry

This reference cites the Cyclepedia entry. The documents it draws on are listed in the entry’s sources.

On this page

Who this is for — Anyone building ML models for markets: feature quality often beats algorithm choice. Raw data rarely suffices.

Feature engineering is the process of creating, transforming and selecting input variables from prices, volume, fundamentals or alternative data — normalization, lags, rolling stats, interactions, regime encoding.

In plain terms — Prep ingredients before cooking the model: make explicit what the market «hides» in raw ticks.


Examples in finance

Family Typical features
Price/volume Return, rolling vol, RSI-like, order-flow proxy
Structure Distance from MA, breakout flag, range compression
Macro Surprise vs consensus, yield curve slope
Text

Good features are interpretable, stable over time and computable without future information — otherwise data leakage kicks in.


Healthy pipeline

  1. Define horizon and target (direction class, return regression…)
  2. Generate features only with data available at time t
  3. Validate with temporal split / walk-forward
  4. Monitor drift and overfitting

Common mistake — Hundreds of features without selection — model memorises the past (overfitting) and fails live.

Example — Predict 5-bar forward return: features = return lags 1–5, ATR(14)/close, volume z-score 20 — all computed with `.shift()` to avoid look-ahead.

Card

  • Principle: fewer sensible features > many random ones.
  • Test: OOS + ablation (drop one feature at a time).
  • Hub: AI & markets.

Sources