Manuscript Offprint
arXiv:2610.02917Event History Over Scale: Compact Transformers for Low-Latency Limit Order Book Forecasting
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 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
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
| TIME | EVENT | SIDE | PRICE | SIZE |
|---|---|---|---|---|
| 0 ms | submit | bid | 220.49 | 300 |
| 3 ms | submit | ask | 220.57 | 220 |
| 7 ms | cancel | ask | 220.62 | 180 |
| 12 ms | execute | ask | 220.55 | 100 |
| 18 ms | submit | bid | 220.50 | 500 |
| 25 ms | cancel | bid | 220.43 | 120 |
one row per individual order event
AGGREGATE EVENTS
one-way lossy
(b) Level-2 order-book snapshot
AGGREGATED RESTING LIQUIDITY

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:
-
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.
-
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 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.
-
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.
2.1 Prediction task, labels, and event representation
The decision points lie on an event-time grid obtained by sampling the order book after every tenth book-changing message. At each decision point , we observe the market history up to and including and predict the direction of the mid-price sampled steps ahead. Following the event-based convention used in the FI-2010 benchmark [1], these horizons are indexed in sampled steps rather than wall-clock time. The L2-based baselines receive recent sampled sequences of L2 states and, where configured, triggering messages and engineered market features, while our L3-based models receive the recent raw L3 message history. MBOFusion additionally receives a slow context vector. Both representations use the same decision points and targets. Prior LOB forecasting work reduces label noise by smoothing mid-prices, although the precise conventions differ [1, 10, 17]. We use the fixed two-window construction implemented for TLOB [15]: a trailing ten-step reference mean and a ten-step mean ending sampled steps later. We hold the smoothing length fixed across forecast horizons so that only the forecast distance changes. Let denote the mid-price at sampled step . We define the trailing ten-step mean and signed change at horizon as
For each horizon h, we compute the adaptive threshold over all valid positions in the sequence being labeled:
where for a sequence of sampled steps, contains the positions at which both the current window and the future window lie entirely within the sequence. This adapts TLOB's preprocessing [15] to signed price differences, accommodating zero or negative electricity prices. For equities, the labeled sequence is each complete training, validation, or test split, whereas for EPEX, each delivery contract is assigned to one of these splits and labeled as a separate sequence. We label an observation up when , down when , and flat otherwise. Because is computed from all valid positions in each sequence, the test labels use the full test sequence's price-change distribution. This is a look-ahead in the label definition, not in any model input. The resulting labels are applied identically to all compared models, but a live system would have to fix from past data, so absolute scores should not be read as achievable online.
Each of our L3-based models receives a right-aligned window of up to recent events. Replaying the message stream yields seven per-event features: (1) event type (submission, cancellation, execution), (2) signed side ( ), (3) log tick-depth from the current best quote, (4) log message size,
(5) log elapsed time, (6) immediate mid-price change, and (7) a best-quote indicator. All features are solely derived from the L3 stream without separate L2 inputs.
2.2 Our models
MBOFormer (Figure 2a) is a compact causal transformer that processes the T most recent L3 events defined above at each decision point. A tokenizer maps each event to a d-dimensional token by embedding the event type, linearly projecting the remaining fields, and zeroing out padded positions. We add a learned positional embedding and apply two transformer blocks, each comprising a multi-head self-attention layer under a causal mask followed by a position-wise feed-forward network [32]. The causal mask lets every token attend only to earlier events, so the representation at the final position summarizes the market as of the decision time with no look-ahead. After a final layer normalization, we pool the sequence by concatenating the newest-event representation with the mask-aware mean over the valid events, and a two-layer perceptron maps the pooled vector to our three prediction classes. At a hidden width of d = 16, with two blocks and four attention heads, MBOFormer has 7,203 parameters. The small width reflects the input: each event is summarized by only a few informative fields, so the encoder needs little capacity once the representation exposes the order-flow signal. Because every decision consumes a fixed window of the T most recent events and the model carries no state between decisions, its memory footprint is fixed by T and does not grow with the length of the order stream.
MBOFusion (Figure 2b) extends MBOFormer with a slow temporal-context branch and reuses the event encoder unchanged. Alongside the event window we maintain a 12-dimensional context vector, sampled once per step on the grid of Section 2.1, which summarizes recent market conditions. It includes mid-price drift and volatility, average spread, the depth of resting liquidity, event and execution rates, the balance of submissions to cancellations, and, where the market defines one, the time remaining until the contract stops trading. The context branch projects these vectors, applies one causal convolution over the 16 most recent sampled steps, and concatenates the final, mean, and maximum activations. We concatenate this context summary with the pooled event representation and classify from the joint vector. MBOFusion thus has 14,371 parameters. Because the branch sits on top of MBOFormer's unchanged event encoder, their comparison evaluates the combined effect of additional temporal context and the parameters introduced by the context branch.
(a) MBOFormer 7,203 parameters
L3 event window
128 events × 7 features
Event tokenizer
type embedding + feature projection
- positional embedding
Causal transformer × 2
4-head self-attention + feed-forward
hidden width d=16
Layer normalization
Dual readout
newest event ⊕ mean over valid events
Two-layer classification head
down flat up
(b) MBOFusion 14,371 parameters
L3 EVENT BRANCH
128 events
× 7 features
SLOW CONTEXT BRANCH
MBOFormer encoder
tokenizer, transformer,
normalization, readout
16 sampled steps
× 12 context features
Linear projection
Event summary
Causal convolution
Context readout
last ⊕ mean ⊕ max
Feature fusion event summary ⊕ context summary
Two-layer classification head
down flat up
Figure 2: Architectures of our two L3-based models. Blue denotes event-sequence processing, green denotes the slow context branch, gold denotes aggregation or fusion, and purple denotes classification. (a) MBOFormer encodes the 128 most recent order events. (b) MBOFusion reuses the MBOFormer event encoder and adds a branch over the 16 most recent context vectors.
3 Experimental Setup
3.1 Markets and data
We evaluate our models across three continuous markets using native L3 market-by-order message data. Among these is the European continuous intraday electricity market, which is an increasingly relevant testbed for latency-constrained execution outside traditional finance applications, where frequent LOB updates and timely reactions to them materially dictate trading policy performance even for asset-backed policies [33, 34]. Our EPEX SPOT data, obtained directly from the electricity exchange and not publicly available, covers 13 delivery days in March 2021 for hourly delivery products only. We also use L3 NASDAQ AAPL (Apple stock) data over 7 days from 3 to 11 September 2024, and NYSE BAC (Bank of America Corporation stock) data over 58 days from 1 August to 22 October 2024, both obtained through Databento. The EPEX data is comparatively thin, with a median price spread of about 60 price ticks and an average of 13 seconds (median 3 seconds) per sampled event-step for each product. The AAPL and BAC data have median price spreads of around 2 and 1 price ticks, and 0.045 and 0.5 seconds per event-step on average, respectively.
As described in Section 2.1, we sample the order book after every tenth book-changing message rather than on a wall-clock grid. Accordingly, the forecasting horizon spans on average roughly half a second on AAPL, five seconds on BAC, and two minutes on EPEX, where liquidity increases rapidly as delivery approaches [35, 36]. We split complete days chronologically into train/validation/test sets: 8/2/3 days for EPEX, 5/1/1 for AAPL, and 35/9/14 for BAC. Every test day therefore postdates every training day, so the reported scores measure out-of-time generalization to later market conditions rather than interpolation within a period. The train/validation/test splits contain approximately 1.00/0.28/0.42 million sampled decision points for EPEX, 2.57/0.42/0.50 million for AAPL, and 1.51/0.37/0.61 million for BAC. To prevent information used to form labels from spanning dataset boundaries, following leakage-aware splitting practices for high-frequency financial data [37], we construct labels so that no label window crosses a split boundary. Each market provides roughly 1.7–3.5 million sampled steps.
The three markets differ sharply in how often the mid-price moves enough to leave the flat class. Under the labeling rule of Section 2.1, the class covers about 70% of the training windows on the thin electricity market at , against 44% on BAC and 38% on AAPL, with similar shares on the held-out splits. As the forecast horizon grows, the mid-price crosses the threshold more often, so the flat share falls and the three classes move toward balance, reaching roughly 51% on the electricity dataset and 29–33% for the equities at . This reduces the advantage of always predicting flat and makes the prediction task harder at longer horizons.
3.2 Models and inputs
We compare our L3-based models, MBOFormer (7,203 parameters) and MBOFusion (14,371 parameters), with the L2-based baselines DeepLOB [10], BiNCTABL [11, 12], MLPLOB, and TLOB [15]. Each sampled L2 snapshot contains 40 values: the price and aggregated volume at ten bid and ten ask levels. DeepLOB processes windows of 100 such snapshots, whereas BiNCTABL processes windows of 10 and MLPLOB windows of 384. DeepLOB and BiNCTABL use only these 40 values. MLPLOB and TLOB receive 14 additional fields per snapshot: six fields for the triggering message and eight engineered order-flow imbalance (OFI) and volume-weighted average price (VWAP) features. We call these models L2-based because their temporal input is a sequence of sampled L2 rows. Although some receive features derived from the triggering L3 message, none receive a history of individual L3 events.
We run TLOB at 1.20M, 23.9k, and 7.2k parameters. The 7,206-parameter version matches MBO-Former's size but receives a 16-step sampled window rather than 128 raw events. The 3.14M-parameter MLPLOB (3.07M on the equities) and 1.20M-parameter TLOB test whether greater capacity or a longer sampled history provides a predictive advantage. We exclude LOBERT [26] because its implementation and weights are unavailable and Appendix A documents our TLOB adaptations for this work's pipeline.
Table 1: Highest mean test macro-F1 among the L2-based baselines (DeepLOB, BiNCTABL, MLPLOB, and TLOB) and among our L3-based models (MBOFormer and MBOFusion), with the maximizing model selected separately in each cell. Horizons are sampled steps of ten events each. Full per-model results with standard deviations are given in Appendix B.
| Market | Model family | h=10 | h=20 | h=50 | h=100 |
|---|---|---|---|---|---|
| EPEX Spot CID | L2-based baselines | 0.621 | 0.556 | 0.503 | 0.466 |
| L3-based models (ours) | 0.659 | 0.586 | 0.517 | 0.472 | |
| NASDAQ AAPL | L2-based baselines | 0.658 | 0.527 | 0.435 | 0.396 |
| L3-based models (ours) | 0.667 | 0.537 | 0.445 | 0.400 | |
| NYSE BAC | L2-based baselines | 0.733 | 0.592 | 0.438 | 0.383 |
| L3-based models (ours) | 0.735 | 0.589 | 0.455 | 0.393 |
3.3 Training and evaluation
We train each model with the AdamW optimizer and keep the checkpoint with the lowest validation loss for testing, stopping early when the validation loss fails to decrease by at least for two consecutive epochs. The learning rate and batch size are set per model type and size so that each baseline trains at a stable operating point. Each (model, market, horizon) combination is a separate single-horizon model, so for each tested model, we train combinations. We evaluate each configuration across three random initialization seeds and report the test-set macro-F1 score. Macro-averaging calculates the unweighted mean across the three classes (up, flat, and down), preventing the dominant flat class from obscuring performance on the rarer up and down movements, a safeguard given the class imbalance, particularly in the electricity market. A predictor that always outputs flat therefore reaches a test macro-F1 of only about 0.26 on EPEX, 0.19 on AAPL, and 0.22 on BAC at . Each event-model run trains in at most about twenty minutes per seed on a single NVIDIA GeForce RTX 4080.
4 Results
Table 1 summarizes predictive quality across representations, and Appendix B reports the detailed results for every model, market and horizon. We organize the results around three findings that bear directly on price prediction under tight inference and memory budgets.
L3-based models improve predictive quality at fixed model capacity. One of our two L3-based models attains the highest mean macro-F1 in eleven of the twelve tested market-by-horizon settings. At , our 7,203-parameter MBOFormer model scores a macro-F1 of 0.651 on EPEX, 0.665 on AAPL, and 0.735 on BAC data, exceeding both the 1.20M-parameter TLOB (0.617, 0.653, and 0.731) and the 3.14M-parameter MLPLOB (0.612, 0.657, and 0.732) on all three markets. Increasing TLOB from 23.9k to 1.20M parameters provides no consistent gain, while the capacity-matched MBOFormer exceeds the 7.2k-parameter TLOB in eleven of the twelve settings. Because TLOB also receives the triggering message and engineered OFI and VWAP features, this comparison suggests gains beyond providing triggering-message features and engineered order-flow summaries.
The advantage persists across forecast horizons and although the macro-F1 score declines as the horizon increases, one of our L3-based models remains best at and for every market. The temporal-context branch is not uniformly beneficial: MBOFusion improves all four AAPL results, the shorter EPEX horizons, and the longer BAC horizons, whereas MBOFormer performs better in the remaining settings. The L3 event sequence therefore accounts for the principal gain, with the context branch providing a market- and horizon-dependent refinement.
Predictive gains remain compatible with tight inference budgets. We measure forward-pass latency for all models at batch size one (one prediction per pass) on a single Apple M2 CPU thread, with models and shape-valid synthetic inputs set to FP32 precision. We report CPU rather than GPU latency because, at batch size one, the M2 GPU is slower for these small graphs (2.5 ms for MBOFormer), as kernel-launch and host-synchronization overhead dominates the computation. After 100 warm-up calls, we pool 2,500 synchronized forward passes. The measurements exclude preprocessing, data transfer, model construction, and decision execution. We also report serialized state-dictionary size and FLOPs per forward pass, counted with PyTorch's FlopCounterMode, while
Table 2: Model-only batch-one inference on one Apple M2 CPU thread in float32 over 2,500 forwards. State is the serialized state dictionary, Act. is a torch.profiler estimate of peak live intermediate-tensor memory during one warmed-up forward pass excluding model weights and the preallocated input, and MFLOPs are per forward pass.
| Model | Params | State kB | Act. kB | MFLOPs | p50 ms | p95 ms | p99 ms |
|---|---|---|---|---|---|---|---|
| MBOFormer (ours) | 7.2k | 39 | 57 | 1.091 | 0.479 | 0.552 | 0.791 |
| MBOFusion (ours) | 14.4k | 69 | 60 | 1.209 | 0.531 | 0.603 | 0.862 |
| TLOB 7.2k | 7.2k | 45 | 35 | 0.139 | 0.301 | 0.363 | 0.610 |
| TLOB 23.9k | 23.9k | 124 | 35 | 0.713 | 0.578 | 0.725 | 0.919 |
| BiNCTABL | 11.4k | 51 | 16 | 0.226 | 0.187 | 0.208 | 0.315 |
| DeepLOB | 143.9k | 612 | 512 | 70.364 | 3.468 | 4.971 | 6.800 |
| TLOB 1.20M | 1.20M | 4,888 | 334 | 123.646 | 2.459 | 2.810 | 3.424 |
| MLPLOB | 3.14M | 12,564 | 834 | 283.369 | 3.903 | 5.665 | 6.602 |
estimating peak activation memory from one warmed-up forward pass by ordering the allocation and deallocation events recorded by torch.profiler.
Table 2 distinguishes parameter efficiency from runtime efficiency. MBOFormer and MBOFusion both achieve sub-millisecond median CPU latency and their serialized state dictionaries occupy 39 and , respectively. We separately report activation-memory estimates in Table 2 where the figures exclude framework overhead and the state required for order-book reconstruction and feature preprocessing. By comparison, the serialized state dictionaries of the 1.20M-parameter TLOB and the 3.14M-parameter MLPLOB occupy 4.9 and 12.6 MB. Relative to these two baselines, MBOFormer's median latency is 5.1 and 8.1 times lower, respectively, and it requires 113 and 260 times fewer FLOPs. The compact baselines present a different trade-off: the parameter-matched TLOB and BiNCTABL are faster because their shorter temporal inputs require fewer operations, but they generally attain lower predictive quality. MBOFormer therefore offers a favorable quality-efficiency trade-off rather than the lowest latency in isolation and both of our models remain below one millisecond at p99.
The advantage of L3-based models varies across markets. At , the best L3-based result exceeds the best L2-based result by 0.038 in macro-F1 on EPEX (0.659 versus 0.621), 0.009 on AAPL (0.667 versus 0.658), and 0.002 on BAC (0.735 versus 0.733). The largest observed difference occurs on EPEX, the thinnest and slowest market in the study. However, because the datasets also differ in instrument type, trading venue, spread behavior, activity, and effective wall-clock horizon, our experiments do not identify which market characteristic explains these differences.
The equity datasets exhibit a similar descriptive ordering. One-tick bid–ask spreads occur in approximately 33% of AAPL snapshots and 91% of BAC snapshots, while the corresponding short-horizon L3–L2 differences are only 0.009 and 0.002 in macro-F1. This pattern is consistent with the hypothesis that event histories may be more useful in some liquidity regimes, but evidence from two instruments on different exchanges cannot safely establish spread behavior, liquidity, or information lost through snapshot aggregation as the underlying mechanism. These scores do not establish trading profitability, but they show performance well above the constant baseline and demonstrate that the same compact model family can be applied to both electricity and equity markets.
5 Conclusion
Across three markets and four horizons, our compact transformers over fine-grained L3 event history attain the highest mean macro-F1 in eleven of the twelve tested settings while achieving sub-millisecond median latency with serialized state dictionaries below 70 kB. These results suggest that, for the markets and baselines considered here, fine-grained L3 event histories can enable compact models to match or outperform substantially larger L2-based models. Several limitations remain. The experiments cover only three markets, and the three-seed results do not establish statistical significance across test periods. Our latency measurements capture only model-forward execution on one standard laptop CPU rather than the latency-tuned production hardware used in exchange co-located trading systems. We report FLOPs rather than measured energy, and the macro-F1 scores generally do not represent trading revenue. Future work should evaluate additional instruments and market regimes, benchmark complete online pipelines on deployment hardware, and assess actual economic performance after transaction costs.
References
[1] Adamantios Ntakaris, Martin Magris, Juho Kanniainen, Moncef Gabbouj, and Alexandros Iosifidis. Benchmark dataset for mid-price forecasting of limit order book data with machine learning methods. Journal of Forecasting, 37(8):852–866, 2018. doi: 10.1002/for.2543.
[2] Alec N. Kercheval and Yuan-Yuan Zhang. Modelling high-frequency limit order book dynamics with support vector machines. Quantitative Finance, 15(8):1315–1329, 2015. doi: 10.1080/14697688.2015.1032546.
[3] Gaurav Menghani. Efficient deep learning: A survey on making deep learning models smaller, faster, and better. ACM Computing Surveys, 55(12):259:1–259:37, 2023. doi: 10.1145/3578938.
[4] Roy Schwartz, Jesse Dodge, Noah A. Smith, and Oren Etzioni. Green AI. Communications of the ACM, 63(12):54–63, 2020. doi: 10.1145/3381831.
[5] Peter Henderson, Jieru Hu, Joshua Romoff, Emma Brunskill, Dan Jurafsky, and Joelle Pineau. Towards the systematic reporting of the energy and carbon footprints of machine learning. Journal of Machine Learning Research, 21(248):1–43, 2020. URL https://www.jmlr.org/papers/v21/20-312.html.
[6] Albert S. Kyle. Continuous auctions and insider trading. Econometrica, 53(6):1315–1335, 1985. doi: 10.2307/1913210.
[7] Maureen O'Hara. High frequency market microstructure. Journal of Financial Economics, 116(2):257–270, 2015. doi: 10.1016/j.jfineco.2015.01.003.
[8] Rama Cont, Arseniy Kukanov, and Sasha Stoikov. The price impact of order book events. Journal of Financial Econometrics, 12(1):47–88, 2014. doi: 10.1093/jjfinec/nbt003.
[9] Rama Cont, Mihai Cucuringu, and Chao Zhang. Cross-impact of order flow imbalance in equity markets. Quantitative Finance, 23(10):1373–1393, 2023. doi: 10.1080/14697688.2023.2236159.
[10] Zihao Zhang, Stefan Zohren, and Stephen Roberts. DeepLOB: Deep convolutional neural networks for limit order books. IEEE Transactions on Signal Processing, 67(11):3001–3012, 2019. doi: 10.1109/TSP.2019.2907260.
[11] Dat Thanh Tran, Alexandros Iosifidis, Juho Kanniainen, and Moncef Gabbouj. Temporal attention augmented bilinear network for financial time-series data analysis. IEEE Transactions on Neural Networks and Learning Systems, 30(5):1407–1418, 2019. doi: 10.1109/TNNLS.2018.2869225.
[12] Dat Thanh Tran, Juho Kanniainen, Moncef Gabbouj, and Alexandros Iosifidis. Data normalization for bilinear structures in high-frequency financial time-series. In 2020 25th International Conference on Pattern Recognition (ICPR), pages 7287–7292, 2021. doi:10.1109/ICPR48806.2021.9412547.
[13] James Wallbridge. Transformers for limit order books. arXiv preprint arXiv:2003.00130, 2020. URL https://arxiv.org/abs/2003.00130.
[14] Damian Kisiel and Denise Gorse. Axial-LOB: High-frequency trading with axial attention. In 2022 IEEE Symposium Series on Computational Intelligence (SSCI), pages 1327–1333, 2022. doi: 10.1109/SSCI51031.2022.10022284.
[15] Leonardo Berti and Gjergji Kasneci. TLOB: A novel transformer model with dual attention for price trend prediction with limit order book data. arXiv preprint arXiv:2502.15757, 2025. URL https://arxiv.org/abs/2502.15757.
[16] C. Evans Hedges. The inference-compute frontier and a latency-efficient architecture for limit order book prediction, 2026. URL https://arxiv.org/abs/2606.25986.
[17] Lorenzo Lucchese, Mikko S. Pakkanen, and Almut E. D. Veraart. The short-term predictability of returns in order book markets: A deep learning perspective. International Journal of Forecasting, 40(4):1587–1621, 2024. doi: 10.1016/j.ijforecast.2024.02.001.
[18] Antonio Briola, Silvia Bartolucci, and Tomaso Aste. Deep limit order book forecasting: a microstructural guide. Quantitative Finance, 25(7):1101–1131, 2025. doi: 10.1080/14697688.2025.2522911.
[19] Justin Sirignano and Rama Cont. Universal features of price formation in financial markets: Perspectives from deep learning. Quantitative Finance, 19(9):1449–1459, 2019. doi: 10.1080/14697688.2019.1622295.
[20] Petter N. Kolm, Jeremy Turiel, and Nicholas Westray. Deep order flow imbalance: Extracting alpha at multiple horizons from the limit order book. Mathematical Finance, 33(4):1044–1081, 2023. doi: 10.1111/mafi.12413.
[21] Zihao Zhang, Bryan Lim, and Stefan Zohren. Deep learning for market by order data. Applied Mathematical Finance, 28(1):79–95, 2021. doi: 10.1080/1350486X.2021.1967767.
[22] Aaron Wheeler and Jeffrey D. Varner. MarketGPT: Developing a pre-trained transformer (GPT) for modeling financial time series. arXiv preprint arXiv:2411.16585, 2024. URL https://arxiv.org/abs/2411.16585.
[23] Maxime Kawawa-Beaudan, Srijan Sood, Kassiani Papasotiriou, Daniel Borrajo, and Manuela Veloso. TradeFM: A generative foundation model for trade-flow and market microstructure. arXiv preprint arXiv:2602.23784, 2026. URL https://arxiv.org/abs/2602.23784.
[24] Leonardo Berti, Bardh Prenkaj, and Paola Velardi. TRADES: Generating realistic market simulations with diffusion models. In Proceedings of the 28th European Conference on Artificial Intelligence (ECAI 2025), volume 413 of Frontiers in Artificial Intelligence and Applications, pages 3703–3710, 2025. doi: 10.3233/FAIA251249.
[25] Alfred Backhouse, Kang Li, Jakob Foerster, Anisoara Calinescu, and Stefan Zohren. Painting the market: Generative diffusion models for financial limit order book simulation and forecasting. arXiv preprint arXiv:2509.05107, 2025. URL https://arxiv.org/abs/2509.05107.
[26] Eljas Linna, Kestutis Baltakys, Alexandros Iosifidis, and Juho Kanniainen. LOBERT: Generative AI foundation model for limit order book messages. arXiv preprint arXiv:2511.12563, 2025. URL https://arxiv.org/abs/2511.12563. NeurIPS 2025 GenAI in Finance Workshop.
[27] Henry Martin and Scott Otterson. German intraday electricity market analysis and modeling based on the limit order book. In 2018 15th International Conference on the European Energy Market (EEM), pages 1–6, 2018. doi: 10.1109/EEM.2018.8469829.
[28] Nikolaus Graf von Luckner and Rüdiger Kiesel. Modeling market order arrivals on the German intraday electricity market with the Hawkes process. Journal of Risk and Financial Management, 14(4):161, 2021. doi: 10.3390/jrfm14040161.
[29] Runyao Yu, Yuchen Tao, Fabian Leimgruber, Tara Esterl, Jochen Stiasny, Derek W. Bunn, Qingsong Wen, Hongye Guo, and Jochen L. Cremer. OrderFusion: Encoding orderbook for end-to-end probabilistic intraday electricity price forecasting. Advanced Engineering Informatics, 76:105131, 2026. doi: 10.1016/j.aei.2026.105131.
[30] Runyao Yu, Ruochen Wu, Yongsheng Han, and Jochen L. Cremer. Orderbook feature learning and asymmetric generalization in intraday electricity markets. Electric Power Systems Research, 262:113596, 2027. doi: 10.1016/j.epsr.2026.113596.
[31] Timothée Hornek, Sergio Potenciano Menci, and Ivan Pavić. Directional price forecasting in the continuous intraday market under consideration of neighboring products and limit order books. ACM SIGEnergy Energy Informatics Review, 5(3):77–92, 2025. doi: 10.1145/3777518.3777525.
[32] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems 30 (NeurIPS 2017), pages 5998–6008, 2017. URL https://proceedings.neurips.cc/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html.
[33] Ioannis Boukas, Damien Ernst, Thibaut Théate, Adrien Bolland, Alexandre Huynen, Martin Buchwald, Christelle Wynants, and Bertrand Cornélusse. A deep reinforcement learning framework for continuous intraday market bidding. Machine Learning, 110(9):2335–2387, 2021. doi: 10.1007/s10994-021-06020-8.
[34] David Schaurecker, David Wozabal, Nils Löhndorf, and Thorsten Staake. High-frequency intraday trading for battery storages. Applied Energy, 425:128550, 2026. ISSN 0306-2619. doi:10.1016/j.apenergy.2026.128550.
[35] Thomas Kuppelwieser and David Wozabal. Liquidity costs on intraday power markets: Continuous trading versus auctions. Energy Policy, 154:112299, 2021. ISSN 0301-4215. doi:10.1016/j.enpol.2021.112299.
[36] Marcel Kremer, Rüdiger Kiesel, and Florentina Paraschiv. An econometric model for intraday electricity trading. Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, 379(2202):20190624, 2021. doi: 10.1098/rsta.2019.0624.
[37] Kara Karpman, Sumanta Basu, David Easley, and Sanghee Kim. Learning financial networks with high-frequency trade data. Data Science in Science, 2(1):2166624, 2023. doi: 10.1080/26941899.2023.2166624.
A Baseline implementation details
Our TLOB baseline is based on the code publication [15]. We integrated it into the common pipeline to ensure that all models use identical decision points, labels, and day splits. We added dropout, replaced layer normalization with root-mean-square normalization, adopted a more efficient attention implementation, and made the model width, depth, and input-window length configurable. The 1.20M-parameter variant processes 128 sampled L2 rows, whereas the 23.9k- and 7.2k-parameter variants process 16. We compared our adaptation with the released implementation using identical model configurations and found comparable predictive performance.
B Full predictive results
We present our full predictive results comparison between the previous benchmarks and our two new models for the three datasets in Table 3. Our models attain the highest mean macro-F1 in eleven of the twelve settings, at 7,203 and 14,371 parameters against 1.20 and 3.14 million for the strongest L2-based baselines.
Table 3: Test macro-F1, shown as mean and standard deviation over three seeds, for EPEX Spot CID, NASDAQ AAPL, and NYSE BAC. The L2-based baselines (DeepLOB, BiNCTABL, MLPLOB, and TLOB) precede our L3-based models (MBOFormer and MBOFusion) within each market.
| Model | Params | ||||
|---|---|---|---|---|---|
| EPEX Spot CID | |||||
| DeepLOB | 143.9k | ||||
| BiNCTABL | 11.4k | ||||
| MLPLOB | 3.14M | ||||
| TLOB | 1.20M | ||||
| TLOB | 23.9k | ||||
| TLOB | 7.2k | ||||
| MBOFormer (ours) | 7.2k | ||||
| MBOFusion (ours) | 14.4k | ||||
| NASDAQ AAPL | |||||
| DeepLOB | 143.9k | ||||
| BiNCTABL | 11.4k | ||||
| MLPLOB | 3.07M | ||||
| TLOB | 1.20M | ||||
| TLOB | 23.9k | ||||
| TLOB | 7.2k | ||||
| MBOFormer (ours) | 7.2k | ||||
| MBOFusion (ours) | 14.4k | ||||
| NYSE BAC | |||||
| DeepLOB | 143.9k | ||||
| BiNCTABL | 11.4k | ||||
| MLPLOB | 3.07M | ||||
| TLOB | 1.20M | ||||
| TLOB | 23.9k | ||||
| TLOB | 7.2k | ||||
| MBOFormer (ours) | 7.2k | ||||
| MBOFusion (ours) | 14.4k | ||||