Compact transformers enable fast price prediction from order book events
Event History Over Scale: Compact Transformers for Low-Latency Limit Order Book Forecasting
Computational Engineering, Finance, and Science
Summary
Predicting short-term price changes in markets is tricky because data arrives very fast and models must work quickly. The authors created small and efficient transformer models that look at detailed event histories like orders placed or canceled, instead of just snapshots of the market. These models predict price trends well across different markets while running much faster than larger models. This shows that using detailed event data can help build smaller, quicker models without losing prediction quality.
What this means in practice
- •For quantitative trading teams: Integrate small transformer models processing detailed order events for faster and accurate short-term price trend predictions in equity and intraday electricity markets.
- •For real-time market data engineers: Deploy low-latency lightweight forecasting models on limited hardware to handle rapid market updates with minimal delay.
Authors
David Schaurecker, Lasse B. Strand, Kevin O'Sullivan, Robert Jakob
Abstract
Short-horizon price-trend prediction from limit order books in equity and intraday electricity markets requires models that combine predictive quality with low single-sample latency and a small serialized model size to keep pace with rapid and continuous market updates. We introduce MBOFormer, a 7,203-parameter causal transformer, and MBOFusion, a 14,371-parameter extension with a slow temporal-context branch. Both models process market-by-order (level-3) histories of individual order submissions, cancellations, and executions. We compare them with level-2-based baselines that process sampled order-book snapshots and simple statistics instead of their underlying messages. Across three markets and four prediction horizons, our models achieve the highest mean macro-F1 in eleven of the twelve settings in a comparison against other benchmark models of varying sizes. Both our models achieve sub-millisecond median inference on a single Apple M2 CPU thread and have serialized state dictionaries below 70 kB. MBOFormer is 5.1x-8.1x faster than the million-parameter baselines at comparable predictive quality. Our results show that fine-grained market event history can reduce the need for model size under tight deployment constraints for short-term equity and electricity price forecasting tasks.