Quant Memo
Core

Microstructure Features for Short-Horizon Models

Predicting returns minutes or seconds ahead requires features built from the order book and trade tape itself, not the slower fundamental and price-history features that work for longer-horizon models.

Prerequisites: Designing a Cross-Sectional Feature Set, Depth At Touch And The Shape Of The Book

A model predicting whether a stock will outperform over the next month can happily use quarterly earnings, valuation ratios, and analyst estimates as features — all of that information updates slowly and is available well before the prediction window starts. A model predicting the next thirty seconds of price movement has none of that luxury: earnings don't change minute to minute, so the only information available is what's happening right now in the order book and the trade tape.

Short-horizon prediction has to be built from features that update at the same speed as the target — order-book imbalance, recent trade flow, and quote dynamics — because fundamental and slow price-history features simply don't contain information at the timescale the model needs to predict.

What actually carries information at short horizons

At short horizons, the most useful features describe the current supply-and-demand pressure visible in the order book: how much size sits on the bid versus the ask near the top of the book (order-book imbalance), how quickly quotes are being added and cancelled, and whether recent trades have been hitting the bid or lifting the offer more often (trade-flow imbalance). These features are noisy individually but update fast enough to say something about price movement seconds to minutes ahead — the timescale a fundamental feature simply cannot address.

Distribution · normal
-2.000.002.00μvalue →
Within ±1σ 68.3%mean μ 0.00std σ 1.00

Order-book imbalance is typically constructed to be centered near zero when buying and selling pressure are balanced, spreading out toward the tails exactly when one side dominates — which is the moment the feature is actually informative about near-term direction.

Worked example

A researcher builds a feature — bid-ask volume imbalance, defined as (bid size minus ask size) divided by (bid size plus ask size) at the top of the book — and tests its relationship with the next 60 seconds of price change on a liquid large-cap stock.

  1. Feature construction. At a moment when the bid has 8,000 shares resting and the ask has 2,000, the imbalance is (80002000)/(8000+2000)=0.6(8000-2000)/(8000+2000) = 0.6 — strongly skewed toward buying pressure.
  2. Historical relationship. Sorting all such snapshots into deciles by this imbalance value, the top decile (strongly bid-heavy) shows a small but consistent positive average price move over the next 60 seconds, while the bottom decile (ask-heavy) shows the opposite.
  3. Combining with trade flow. Adding a second feature — the fraction of the last 50 trades that hit the bid versus lifted the offer — and conditioning on both together produces a stronger, cleaner separation between deciles than either feature alone, because order-book imbalance captures resting intent while trade flow captures what has actually just executed.

What this means in practice

Because these features are extremely fast-moving, short-horizon models need equally fast, carefully engineered data pipelines — feature computation itself must not introduce latency that eats into the prediction horizon it's trying to exploit. Backtests also need to account for the fact that these features are correlated with the trader's own likely market impact: a large imbalance may partly reflect other participants reacting to information the model doesn't have direct access to, not a free, independent edge.

Microstructure features are especially prone to look-ahead bias from imprecise timestamps — using a trade or quote update that technically wasn't available until a few milliseconds after the model's decision point can make a backtest look profitable purely from information leakage that a live system would never have. Every feature's timestamp needs to be checked against exactly when it would have been observable in real time.

Related concepts

Practice in interviews

Further reading

  • Cont, Kukanov & Stoikov, 'The Price Impact of Order Book Events'
  • de Prado, Advances in Financial Machine Learning (ch. on microstructural features)
ShareTwitterLinkedIn