Machine learning in HFT
◆still alphaNot a fifth strategy family but a toolkit across all of them. Genuine lift on feature-rich, high-sample problems (microstructure signals, news NLP) and overpromised everywhere else.
See it move
What to notice. ML in HFT is short-horizon prediction on microstructure features – and more model is not more edge. Crank complexity: in-sample accuracy keeps rising while out-of-sample peaks early and then decays (the bias–variance trap), and the inference latency climbs until the model is too slow to trade on the hot path at all. The 2026 edge is a well-fit, fast model – and the same models now power the surveillance that catches spoofing and stuffing.
What does machine learning actually do in HFT?
Machine learning in HFT does three jobs: it predicts the next short-horizon price move from book state, it classifies order flow and trades (sign inference, toxicity), and it detects anomalies and manipulation. It learns patterns from microstructure features that are hard to specify by hand. It does not find alpha on its own, and it rarely runs inside the microsecond trade decision itself.
The order book is rich, noisy and fast-changing. Some of its structure, such as how imbalance precedes the next tick or how flow clusters before a move, is predictable but tediously non-linear, and ML is good at learning a messy mapping from many weak features to a short-horizon target where hand-coding the rule is impractical. It is a function approximator on microstructure, not an oracle.
It is also a toolkit rather than a fifth strategy family alongside market making, arbitrage, directional and event trading: a way of building the signals and classifiers those strategies rely on. A fourth area sits off the trading loop entirely, in research and news, where large language models are now useful. The realistic gains are incremental improvements to signals you could partly build by hand, not a step change. For the wider view see what AI changes for HFT.
Short-horizon price prediction
The flagship application predicts the next move over micro-horizons, from the next tick to a few seconds, using current and recent book state. Models from logistic regression and gradient-boosted trees up to LSTMs, CNNs and order-book transformers map microstructure features to a sign or a small return, and the output feeds a simple, fast trading rule rather than the model itself.
The closer the horizon is to "the next event", the more the task overlaps with classical microstructure signals such as the microprice and order-flow imbalance, and the less a deep model adds over a well-built simple one. The published evidence points the same way. Kolm, Turiel and Westray (2023) tested 115 Nasdaq stocks and found that simple off-the-shelf networks trained on stationary order-flow inputs beat models trained on raw book states, with a useful forecast horizon of about two average price changes. Zhang, Zohren and Roberts (2019) showed with DeepLOB, a CNN plus LSTM on raw book levels, that deep models can extract structure across levels and beat earlier methods on a standard benchmark, with stable out-of-sample accuracy over a year of London Stock Exchange quotes.
That benchmark is Prata and co-authors (2024), run in the open LOBCAST framework. Read the results as a caution: published accuracy on one dataset is not a lasting trading edge. This prediction work belongs with order flow and information: ML estimates the same conditional expectations covered there rather than tapping a separate source of edge. The same decay shows up at slower horizons. Krauss, Do and Huck (2017) applied deep nets, boosted trees and random forests to S&P 500 stocks at a daily horizon over 1992–2015; an ensemble earned over 0.45% a day before transaction costs, with profits declining in later years.
Order-flow and trade classification
ML sharpens the classification problems microstructure depends on: inferring whether a trade was buyer- or seller-initiated, classifying order-flow type, and labelling flow as informed or uninformed. Better classification feeds every downstream signal (OFI, VPIN, Kyle's lambda), so it has leverage across the whole stack.
Trade-sign inference is the canonical case. Rule-based classifiers are good but imperfect. Ellis, Michaely and O'Hara (2000) measured them on Nasdaq and found the quote rule correct 76.4% of the time, the tick rule 77.66% and the Lee–Ready rule 81.05%, with all of them doing poorly on trades inside the quotes. Every signed-flow signal inherits that error. ML classifiers that use local book and trade context can reduce it on the hard cases, and a small accuracy gain propagates into more reliable OFI and VPIN. Informed-versus-uninformed labelling overlaps with the toxicity work below, since separating informed from noise flow is the market maker's core problem (adverse selection). The caveat is that "was this flow informed?" is observable only afterwards, which makes supervised training leak future information unless handled with care.
Toxicity, manipulation and anomaly detection
ML suits detection problems: flagging toxic flow, which is adverse-selection risk, and spotting manipulation patterns and anomalies in the tape. These are surveillance and defensive uses, protecting the market maker or supporting compliance and venue surveillance.
Toxicity detection extends the VPIN measure of flow toxicity. A model on bucketed order-flow and book features can give a market maker an earlier, richer "the flow is turning toxic, widen or pull" signal than a single gauge (PIN and VPIN). This reduces adverse selection rather than predicting direction. On the surveillance side, classifiers and anomaly detectors flag the signatures of spoofing, layering and quote stuffing, which is one way surveillance teams catch them (spoofing and layering, market manipulation).
Leakage appears here in its sharpest form. Detection labels are often assigned with hindsight, for example an event later ruled manipulative, so the training data quietly encodes the future. Sound detection systems are validated out of time and out of sample for exactly this reason, the discipline taught in backtesting and simulation.
Features from microstructure
HFT models live or die on their features, and the good ones come from microstructure: order-flow imbalance, book imbalance and the microprice, queue position and depth, trade signs and durations, and recent realised volatility. Once the features are right the model is often the easy part.
The canonical set: order-flow imbalance (OFI), which Cont, Kukanov and Stoikov (2014) show explains most short-interval price changes through a linear relation within the same interval; book imbalance and the microprice, an imbalance-weighted fair value; queue state, meaning depth and your place in line, which governs fill probability; durations and event-time features such as clustering and intensity; and signed trade flow with realised volatility, feeding toxicity and regime features. Be careful with that OFI result. It describes explanation within an interval, not prediction of the next one. Easley, López de Prado, O'Hara and Zhang (2021) found, across 87 liquid futures contracts, that some features with strong explanatory power predict poorly, and some with weak explanatory power predict well.
Why deep learning is hard at HFT latencies
Because the trade decision on the hot path has a budget of microseconds or less, and a deep network's forward pass does not fit inside it. The standard architecture keeps ML off the hot path: models compute signals near-line or off-line, and a small, fast, deterministic rule, often on an FPGA, acts on them.
Accuracy and inference latency trade off, so you cannot have maximum model complexity and minimum latency on the same code path. The hot-path budget, often single-digit microseconds and bound by the FPGA, is described on colocation and FPGA.
The corollary for model choice is that at true HFT latencies the winner is often the simplest model that captures the signal. It runs faster, overfits less and is easier to validate. Move the horizon out to seconds, minutes or the portfolio layer and the latency constraint relaxes, so deep models and LLMs become reasonable. The objection applies to the high-frequency decision, not to ML in trading in general.
The practical picture, including LLMs
In 2026 ML is a standard part of the quant stack. It is incrementally useful for signals and classifiers, central to surveillance, and increasingly used around trading, with LLMs parsing news, speeding up research and generating code. It compounds a good process and does not rescue a bad one.
LLMs fit off the trading loop: machine-readable news and event extraction, which means turning filings, releases and headlines into structured signals for news trading, plus research and tooling work such as literature review, hypothesis generation and faster feature development. An LLM call takes milliseconds to seconds, never microseconds, so it sits off the critical path by nature.
What AI does not change: it does not win the latency race (see latency arbitrage, where the wire is bought, not learned), it does not create capacity where impact and crowding cap it (capacity and alpha decay), and it does not exempt anyone from the cost stack. It lowers the cost of building and researching, which is part of the case for going independent, but it raises the bar too, because everyone has the same tools. Treat any claim that ML is a self-contained money machine as a red flag.
Overfitting is the default outcome
At HFT horizons the signal-to-noise ratio is tiny and the data, though abundant, is highly autocorrelated and regime-dependent, so a flexible model fits noise unless you actively prevent it. The discipline that prevents it is the content of the backtesting and simulation guide.
Returns at micro-horizons are almost all noise, and a model with enough capacity will explain the noise of the training period and call it skill. Add multiple testing, where trying enough features, models and hyperparameters makes the best one look great by chance, and a beautiful in-sample result is the expected outcome of a sloppy search. Bailey and López de Prado (2014) formalised the correction as the deflated Sharpe ratio, which adjusts for selection bias, backtest overfitting and non-normal returns.
The square-root-of-log term is the standard approximation for the expected maximum of N independent standard normals, used in the deflated-Sharpe literature.
Worked example
A short-horizon order-book classifier, with illustrative accuracies and latencies chosen to make the overfitting and latency points concrete. Task: predict the sign of the next mid-move over the next 10 book events on a liquid name. Features: OFI over the last 20 events, book imbalance, microprice deviation, recent realised volatility, and trade-sign run-length, five engineered microstructure features.
A logistic-regression baseline reaches out-of-sample directional accuracy of about 56%, against 50% for a coin flip. Inference is a dot product, on the order of nanoseconds, so it can sit very near the hot path. Gradient-boosted trees on the same features reach about 57.5%, with inference in the hundreds of nanoseconds to microseconds: off the hot path, but feasible near-line. A book-level LSTM or CNN on raw 10-level book history reaches about 58.5% when validated honestly out of time, a real but modest gain of about 2.5 points over the linear model. Its inference takes tens of microseconds, so its signal must be precomputed and handed to a fast rule.
The deep model bought roughly 2 to 2.5 real points at the cost of much higher latency and far more overfitting exposure. Whether that is worth it depends on your validation discipline and your latency budget, and on the hot path the answer is usually to ship the linear model. Reproduce the overfitting collapse in the backtesting guide by toggling the out-of-sample split and the multiple-testing slider.
Sources
- Zhang, Z., Zohren, S. and Roberts, S. (2019). "DeepLOB: Deep convolutional neural networks for limit order books". IEEE Transactions on Signal Processing 67(11), 3001–3012. doi.org/10.1109/TSP.2019.2907260
- Cont, R., Kukanov, A. and Stoikov, S. (2014). "The price impact of order book events". Journal of Financial Econometrics 12(1), 47–88. doi.org/10.1093/jjfinec/nbt003
- Kolm, P. N., Turiel, J. and Westray, N. (2023). "Deep order flow imbalance: Extracting alpha at multiple horizons from the limit order book". Mathematical Finance 33(4), 1044–1081. doi.org/10.1111/mafi.12413
- Prata, M. et al. (2024). "LOB-based deep learning models for stock price trend prediction: a benchmark study". Artificial Intelligence Review 57(5). doi.org/10.1007/s10462-024-10715-4
- Ellis, K., Michaely, R. and O'Hara, M. (2000). "The accuracy of trade classification rules: Evidence from Nasdaq". Journal of Financial and Quantitative Analysis 35(4), 529–551. doi.org/10.2307/2676254
- Easley, D., López de Prado, M., O'Hara, M. and Zhang, Z. (2021). "Microstructure in the machine age". Review of Financial Studies 34(7), 3316–3363. doi.org/10.1093/rfs/hhaa078
- Bailey, D. H. and López de Prado, M. (2014). "The deflated Sharpe ratio: Correcting for selection bias, backtest overfitting and non-normality". Journal of Portfolio Management 40(5), 94–107. doi.org/10.3905/jpm.2014.40.5.094
- Krauss, C., Do, X. A. and Huck, N. (2017). "Deep neural networks, gradient-boosted trees, random forests: Statistical arbitrage on the S&P 500". European Journal of Operational Research 259(2), 689–702. doi.org/10.1016/j.ejor.2016.10.031