Feature Engineering is 80% of Success

Feature engineering matters more than model choice. Here are 50 features that consistently improve predictions.

Price Features (10)

  1. Log returns
  2. Price ratio (close/open)
  3. High-low ratio
  4. Close-to-close range
  5. Gap (open vs previous close)
  6. Price momentum (5, 10, 20 days)
  7. Price acceleration
  8. Price volatility (5, 20 day)
  9. Price percentile (20 day)
  10. Distance from moving average

Volume Features (10)

  1. Volume ratio (current/average)
  2. On-Balance Volume (OBV)
  3. Volume-Price Trend (VPT)
  4. Accumulation/Distribution
  5. Chaikin Money Flow
  6. Volume-weighted average price (VWAP)
  7. Volume spike (2x average)
  8. Volume dry up (0.5x average)
  9. Volume trend (20 day)
  10. Volume correlation with price

Technical Indicators (15)

  1. RSI (14)
  2. MACD signal line
  3. MACD histogram
  4. Bollinger Band position
  5. ATR (14)
  6. Stochastic %K
  7. Stochastic %D
  8. Williams %R
  9. CCI
  10. ADX
  11. Parabolic SAR
  12. Ichimoku Cloud position
  13. CMF
  14. Force Index
  15. TRIX

Statistical Features (10)

  1. Skewness (20 day)
  2. Kurtosis (20 day)
  3. Z-score of returns
  4. Hurst exponent
  5. Autocorrelation (1 lag)
  6. Autocorrelation (5 lag)
  7. Entropy
  8. Correlation with market
  9. Beta
  10. Alpha

Time Features (5)

  1. Day of week
  2. Month
  3. Quarter
  4. Week of month
  5. Days to expiry

SEBI Disclaimer

Feature engineering for trading involves risk of loss. This article is for educational purposes only.

Validation: Feature Stability and Coverage

Before you model anything, every one of the 50 features must pass three mechanical checks. The first is coverage: the feature must be defined at every timestamp in the training window, with explicit rules for NaNs, bad ticks and truncated days. The second is stability: compute the feature's distribution per quarter; if the mean or variance shifts structurally, your model will silently retrain a wrong baseline. The third is look-back discipline: features must only see data available at the prediction time, which for a daily Indian model means closing at 15:30 IST, not the 17:00 revised feeds.

Leakage Audit: The Five Classic Leaks

A feature set is only as honest as its leakage audit:

  1. Same-bar leakage: using today's close to predict today's close; shift the target by one bar minimum.
  2. Rescaling leakage: standardising the whole series before splitting the train/test.
  3. Filter leakage: dropping rows using information from the full sample.
  4. Indicator leakage: indicators that internally use future values, such as rolling mean over the whole window.
  5. Target leakage in engineered bars: constructing the target from the same raw series used to build a feature.

Apply a strict rule at engineering time: write one function that takes a cutoff timestamp, not a full frame, and every feature is computed inside that function.

Feature Store and Reproducibility

Retail quants over-invest in model code and under-invest in the feature layer. A simple feature store with these properties removes weeks of debugging:

  • Features are computed once and cached with a version hash tied to the source data snapshot.
  • Recompute happens on a schedule, not on ad-hoc notebook runs.
  • Every feature is documented with units, timeframe and a worked example.

A good rule is that your research should be reproducible by re-running one command; if you cannot do that, your machine-learning is anecdote, not analysis.

Interaction Blow-Up and Dimensionality Control

50 base features exploding into pair-wise products gives 1,275 interactions and a mountain of noise. Handle it in two stages:

  • Rank base features first with a fast model's impurity importance.
  • Only create interactions among the top 15, from different families, e.g. momentum crossed with volatility rather than two momentum variants.

For the Nifty daily frame, momentum-times-volatility and volume-change-times-return-imbalance are the interactions that consistently earn their complexity; the rest mostly add variance.

Production Recompute Rules

Research features and live features drift apart unless you enforce parity:

  1. Keep one shared code path; a notebook copy is the number one divergence source.
  2. Replay last week's features through the live path and diff against research output.
  3. Monitor per-feature drift with a Kolmogorov-Smirnov test against the training window, and alert on the top decile of drift.

Features are the thing you actually trade; the model is only a consumer of them. Treating the feature layer as production-grade infrastructure is what separates a 50-feature toy from a 50-feature system.

Proven Feature Families

Group features into five buckets: price transforms, volume patterns, volatility clusters, calendar effects and positioning signals. Keep each family capped so no single group dominates the model's variance. Feature selection should be stability-based, keeping only those that stay meaningful across three separate market regimes.

Start First with a Ten-Feature Kit

Before wiring all fifty, prove a minimal set on the daily Nifty frame: log return, distance from the 20-day mean, RSI-14, ATR(14), volume ratio to its 20-day average, 20-day realised volatility, return skewness, beta to the index, day of the week and days to expiry. These ten cover price, volume, volatility and calendar edges with the smallest leakage surface and the easiest reviews.

Keep the kit running for a full quarter and record each feature's quarterly mean and variance before adding any of the remaining forty. A distribution that silently reshapes itself in the first three months is a model risk, not a data quirk, and a feature that is unstable at ten will only be harder to trust at fifty. Depth built on a shaky foundation multiplies debugging hours, not accuracy; prove the ten before you spend on the forty.