Skip to content
GetProfitable
Search
Dictionary

Feature engineering

Turning raw market data into the inputs a model sees. In finance this is where nearly all the value and nearly all the leakage lives.

Good features are stationary, comparable across instruments, and available at the moment of decision. Raw price fails all three; a 20-day z-score of price relative to its own moving average passes all three.

Typical families: trend and momentum measures over several horizons, volatility ratios, volume and liquidity measures, spread and microstructure measures, cross-sectional ranks within the universe, and calendar context. Cross-sectional ranking is especially useful because it removes market-wide moves for free.

The discipline that matters is availability. For every feature, write down the exact timestamp at which its value is final and assert that the model only reads it after that time. Half of all spectacular machine-learning backtests die honestly at this step.

Related: normalisation, data-leakage, label, feature-importance

See it drawn

Original diagrams for the ideas on this page. Illustrative, not real market data.

Bid-ask spread in an order bookSell orders stacked above buy orders with a gap between the best of each.SELLERS (asks)50.0690050.051,40050.0460050.011,10050.002,30049.99800spread = 0.03BUYERS (bids)
The bid-ask spread. Buy orders sit below, sell orders above, and the gap between the best bid (50.01) and best ask (50.04) is the spread you pay to cross. Bar length shows the size resting at each price.

Educational only, not advice. Spotted an error? Post in Site Feedback.