arXiv:2610.02917q-fin.CPOct 2026

Manuscript Offprint

arXiv:2610.02917

Event History Over Scale: Compact Transformers for Low-Latency Limit Order Book Forecasting

David Schaurecker, Lasse B. Strand, Kevin O'Sullivan, Robert Jakob

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

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.1×−8.1×5.1 \times -8.1 \times 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.

1 Introduction

Short-horizon price-trend prediction from limit order book (LOB) data is a core problem in market microstructure [1, 2]. Deploying these models at the market’s rapid update rate also makes inference latency and memory major practical challenges. In this setting, the time series is not an evenly spaced sequence of prices but an irregular sequence of limit order submissions, cancellations, and executions whose cumulative effect updates the order book and produces the observed mid-price. Because predictions are made online at individual decision points where batching would add a delay, we evaluate batch-one latency alongside memory footprint. Latency generally depends on parameter count, sequence length, operator selection, hardware, and runtime overhead [3]. Moreover, because deployed models are queried continuously at every decision point, small per-inference costs accumulate, motivating reporting computational demands alongside predictive quality [4, 5].

Most recent deep LOB models operate on a sampled level-2 (L2) limit order book state, optionally augmented with the triggering message and engineered features. Figure 1 explains this and contrasts that representation with the market-by-order (MBO, or level-3, L3) stream from which it is derived. An L2 snapshot records aggregated resting volumes at selected price levels of the current limit order book, whereas the L3 stream records each submission, cancellation, and execution message that is processed by the exchange, and is thus the most granular representation available. Replaying

†^{\dagger}Equal contribution.

The code is available at https://github.com/lassebaerlandstrand/event-history-over-scale.

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: TS-LIMITS.

(a) Level-3 (MBO) event stream

IRREGULAR EVENT-TIME SERIES

TIMEEVENTSIDEPRICESIZE
0 mssubmitbid220.49300
3 mssubmitask220.57220
7 mscancelask220.62180
12 msexecuteask220.55100
18 mssubmitbid220.50500
25 mscancelbid220.43120

one row per individual order event

AGGREGATE EVENTS

one-way lossy

(b) Level-2 order-book snapshot

AGGREGATED RESTING LIQUIDITY

Figure

Figure 1: The same market evolution represented at two levels of detail. The Level-3 market-by-order stream records each submission, cancellation, and execution in event time. Aggregating these messages produces the Level-2 snapshot of resting volume by price level. This mapping is one-way: the snapshot does not retain the identity, timing, type, or ordering of the events that produced it.

L3 data naturally reconstructs L2 data, but a sequence of snapshots cannot recover the identity, timing, order, or type of the intervening messages between LOB snapshots and decision points. Market-microstructure theory motivates a connection between order flow and price formation [6, 7]. Empirical work relates order-flow imbalance to concurrent and cross-asset price changes [8, 9]. In this work, we explore whether a compact mid-price forecasting model can leverage this granular information more effectively than rich state and feature histories.

While short-horizon price prediction using L2 snapshots is well studied, comparatively few works exploit granular L3 event data. Among L2 approaches, DeepLOB combines convolutions over the price ladder with a recurrent head [10]. Subsequent approaches include bilinear and attention models [11, 12], transformer and axial-attention architectures [13, 14], and the dual-axis attention model TLOB [15]. For a recent compute- and latency-focused comparison of LOB models on the FI-2010 dataset [1], see [16]. Generally, predictability is present but strongly representation-dependent, generally weakens at longer horizons, and need not translate into actionable trading signals [17, 18]. On the event side, order-flow models identify cross-stock regularities [19] and gains over book states [20], while prior MBO work finds that message and LOB inputs provide complementary information [21]. Recent work models granular event streams at substantially larger scales. MarketGPT pretrains an approximately 100-million-parameter autoregressive model on 91 million messages, while TradeFM trains a 524-million-parameter foundation model on billions of trade events [22, 23]. Other generative approaches apply diffusion models either to order flows or to sequences of L2 book states [24, 25]. Of particular relevance, LOBERT adapts an encoder-only transformer to sequences of 512 L3 messages and can additionally incorporate contemporaneous L2 snapshots [26]. It is pretrained on 470 million messages and contains approximately 1.1 million parameters, making it 77–153 times larger than our models. LOB-based forecasting is well established for equities but remains comparatively limited for European continuous intraday electricity markets. Existing work studies market dynamics through simulation and point-process models [27, 28], forecasts price indices from sequences of matched trades [29], forecasts prices from engineered order-book features [30], or predicts price direction from LOB features [31]. We instead ask whether a compact, directly supervised model that retains the most recent raw order events can match or outperform larger models built on coarser, sampled order-book histories while reducing inference latency relative to those larger baselines.

We answer this question with MBOFormer, a 7,203-parameter causal transformer over the 128 most recent order events, and MBOFusion, which adds a convolutional branch for slow market context at 14,371 parameters. We compare them with established L2-based LOB baselines, including a size-matched and a million-parameter TLOB, on NASDAQ and NYSE equities and the EPEX continuous intraday electricity market. To gauge applicability to a live high-frequency environment, we measure batch-one model-forward latency on precomputed inputs, serialized state-dictionary size, peak activation memory, and estimated FLOPs per forward pass, the last as a hardware-independent proxy for accumulated compute. We do not measure energy or carbon impact directly.

We make three main contributions:

  1. We compare our L3-based models with L2-based baselines across three continuous markets, four forecast horizons, and matched model parameter budgets. One of our models has the highest mean macro-F1 among evaluated models in eleven of twelve settings, and MBOFormer achieves a higher mean score than the equally sized TLOB in the same eleven settings.

  2. We measure rather than assume deployment efficiency on one Apple M2 CPU thread. Both of our L3-based models achieve sub-millisecond median inference latency. MBOFormer achieves a 5.1×−8.1×5.1 \times -8.1 \times speedup over the million-parameter baselines at comparable prediction quality, while BiNCTABL and the parameter-matched TLOB are faster still but generally sacrifice prediction quality.

  3. We provide the first deep-learning treatment of EPEX electricity exchange order-message histories for short-horizon price forecasting, demonstrating that a compact architecture generalizes across electricity and equity markets.

References (36)