Concept

Feature Engineering

Feature Engineering is a Machine Learning concept. The Library holds 3 implementations, each one a working definition you can pull into Quant.

lags. vol-normalized returns

Top Feature Engineering indicators

3 total

What is Feature Engineering?

Feature engineering is the step in a machine-learning pipeline where raw market data is turned into the input variables a model actually learns from. Raw prices are a poor input: they trend, drift, and sit on a different scale for every symbol, so a model fitted on them rarely transfers. Practical features are transformations that make bars comparable, such as lagged returns, volatility-normalized returns, oscillator readings, distances from a moving average expressed in ATR units or as a z-score, and time-of-day or session flags.

Two constraints do most of the work. First, features should be roughly stationary: their distribution should not depend on where in history they were computed, which is why returns and ratios are preferred over raw levels. Second, every feature must be computable strictly from data available at prediction time; a feature that peeks even one bar ahead produces backtests that live trading cannot reproduce. Feature quality typically matters more than the choice of model sitting on top of it.

How traders use it

  • As model inputs: lagged and volatility-normalized returns, oscillator values, and level distances form the feature vector that classifiers such as kNN or logistic regression consume.
  • As a scaling step: min-max scaling or z-scoring puts features on a common range so distance-based learners do not let the largest-scaled input dominate.
  • As leakage control: features are built only from completed bars and past data, so the model sees in training exactly what it would see live.

Related concepts · Features & pipeline

Concept family

Machine Learning

32 concepts mapped · 21 in the Library

Feature Engineering FAQ

Why do machine-learning models use returns instead of raw prices?

Raw prices are nonstationary: their level drifts over time, so patterns learned at one price region do not transfer to another. Returns, ratios, and normalized distances have distributions that are far more stable across history and across symbols, which lets a model trained on the past generalize. Most trading features are therefore built from returns or other scale-free transformations rather than price itself.

What is lookahead bias in feature engineering?

Lookahead bias is any feature that uses information unavailable at the moment of prediction, such as the current bar's close before the bar completes or a value from a repainting calculation. It inflates backtest results that live trading cannot match. The fix is strict: compute every feature from completed, historical data only, and confirm the pipeline behaves identically in simulation and in real time.

Build Feature Engineering your way.

Quant writes, tests, and refines it with you — then it runs on LuxAlgo charting or ports to TradingView.