
Free first chapter
Order Flow, Cross-Asset Signals, and Model-Ready Pipelines
Read the first chapter in your browser. It's free, with no account and no email needed.
Free to read. No account required.
Many traders who use machine learning keep swapping models while feeding them the same mediocre features. This book argues that better inputs often matter more than better algorithms, and shows you how to design them.
Feature Engineering for Traders takes you from foundational price and volatility features to an advanced feature stack. You will learn how to select, evaluate, and prune features, and how to do so without sliding into leakage, redundancy, or feature bloat. Several chapters go deep on order flow, including advanced order flow features and ways of detecting institutional activity. You will build cross-asset and temporal features that give a model wider context.
The final chapter shows how to shape features for different model families.
A production-oriented feature engineering system that spans price, order flow, cross-asset, sentiment, and model-specific feature pipelines.
Most traders who use machine learning spend their time swapping model families — trying random forests, then gradient boosting, then neural networks — while feeding all of them the same mediocre features. The returns from better features almost always exceed the returns from better models. This book teaches you to design, evaluate, and prune feature stacks that actually improve trading models without drifting into leakage, redundancy, or feature bloat.
The scope starts with foundational price and volatility features and moves through order flow, microstructure, institutional-activity detection, cross-asset signals, and model-specific pipeline design. By the end, you will have a feature engineering workflow that produces traceable, testable inputs for any model family you choose to deploy.
Read linearly on the first pass. Later chapters assume you already understand the difference between useful features, descriptive clutter, and silent leakage.
Use a Python environment with standard data, statistics, visualization, and modeling libraries.
Keep raw data, intermediate feature tables, feature-generation code, and evaluation reports organized so every feature can be traced back to the transformations that created it.
Work through examples and exercises rather than treating the book as a catalog of formulas. Chapters 1 through 3 establish the core feature-engineering framework. Chapters 4 through 6 focus on order flow and institutional-style flow signals. Chapters 7 and 8 generalize the feature layer across related assets, time structure, and model families. Every feature introduced is evaluated against the question: does this actually help the model, or does it just look informative?
A quant researcher at a mid-sized fund spends three weeks building a gradient-boosted model to predict next-day equity returns. The model uses closing prices, volume, and a handful of technical indicators pulled from a charting library. On the validation set, the results look reasonable. In live trading, the model drifts within weeks. The researcher discovers the problem is not the model. The problem is that closing prices, raw volume, and default indicator settings carry far less usable information than the researcher assumed. The features looked like data. They were not yet information.
This chapter builds the first layer of a defensible feature set: the foundational features that transform raw market bars into representations a model can use across instruments, time periods, and volatility regimes. Every feature introduced here must earn its place by improving what the model can distinguish, not by adding columns to a dataframe.
Most trading models begin with OHLCV bars: open, high, low, close, and volume. These five fields summarize what happened during a time interval, but the summary is lossy. A model trained on raw closing prices learns price levels, not price behavior. A model trained on raw volume learns absolute activity, not relative activity. The distinction matters because markets change regimes, instruments trade at different scales, and the same closing price carries different meaning in calm and volatile periods.
Consider two trading days for the same equity. On both days, the close is $150. On the first day, the high was $151 and the low was $149. On the second day, the high was $158 and the low was $143. The closing price is identical, but the intraday range, the implied volatility, and the position of the close within the range are radically different. A model that sees only the close treats these days as equivalent. A model that sees derived features can distinguish them.
The goal of foundational feature engineering is to extract this kind of structural information from raw bars and present it in a form that a supervised learning model can use.
Foundational features are the first layer of engineered inputs derived from raw market data. They capture price structure, volume context, and volatility state. Every later feature layer in this book builds on top of this foundation.
A standard OHLCV bar provides five numbers per time interval. From these five numbers, a model can learn:
What a model cannot learn directly from raw bars includes:
Each of these missing pieces is a feature waiting to be built. The next sections construct them systematically.
The consequences of using raw bars without derived features show up in specific, predictable ways:
Free to read. No account required.