Deep Limit Order Book Forecasting

Antonio Briola, Silvia Bartolucci, Tomaso AstearXiv 2024 · DOI

Abstract: This research bridges the gap between market microstructure and deep learning by demonstrating how a stock's physical characteristics—specifically its "tick size"—dictate its predictability. The authors introduce LOBFrame, an open-source framework for large-scale Limit Order Book (LOB) data, and propose a novel "transaction-based" metric ($p_T$) that reveals how traditional machine learning scores can be misleading for actual trading.

Introduction

In the high-frequency trading landscape, the Limit Order Book (LOB) serves as the primary record of market intent, capturing every bid, ask, and cancellation. While deep learning models have shown promise in forecasting price movements, a significant "simulation-to-reality gap" persists. Most academic research relies on simplistic, static datasets, ignoring how liquidity, spread, and tick size affect model performance. Furthermore, standard metrics like the F1-score fail to account for the chronological sequence of trades, potentially leading to "accurate" forecasts that are financially worthless in a live environment.

Methodology

The study employs DeepLOB, a state-of-the-art architecture designed to process the multi-dimensional nature of market data. As illustrated in Figure 1, the LOB consists of spatial dimensions (price and volume levels) and temporal dimensions (historical snapshots). DeepLOB utilizes Convolutional Neural Networks (CNNs) to automate feature extraction from these spatial dynamics and Long Short-Term Memory (LSTM) units to capture temporal dependencies and market "memory."

Spatial and temporal dimensions of the Limit Order Book (LOB) and various order types.

The authors also contribute LOBFrame, a robust pipeline for processing tick-by-tick data and performing walk-forward validation. A key innovation is the $p_T$ (Probability to execute a correct transaction) metric. Unlike standard metrics that evaluate individual snapshots, $p_T$ assesses the model’s ability to identify actionable sequences—opening, maintaining, and closing a position successfully.

Datasets and Experimental Setup

The research utilizes high-quality, tick-by-tick LOB data from the LOBSTER provider, encompassing 15 heterogeneous stocks on the NASDAQ exchange over a three-year period (2017–2019). The diversity of the selected stocks, ranging across various sectors and market capitalizations, is detailed in Figure 2.

List of 15 heterogeneous stocks used in the study, categorized by sector and capitalization.

Stocks were categorized by their average spread relative to tick size into Small-tick (volatile, sparse books), Medium-tick, and Large-tick (liquid, stable books) groups. This categorization allows for a granular analysis of how microstructure constraints influence model accuracy.

Key Insights and Results

  • Tick Size as a Predictability Proxy: Large-tick stocks are significantly easier to forecast. Their LOB structure is more homogeneous, providing a cleaner signal for deep learning models. Large-tick stocks achieved an average Matthews Correlation Coefficient (MCC) of 0.29–0.36, while small-tick stocks struggled with a meager 0.04–0.11.
  • The "Reciprocal Error" Trap: Small-tick stocks (e.g., GOOG) often suffer from "critical errors"—predicting a price increase when the price actually drops. In contrast, errors in large-tick stocks are usually "conservative" (predicting no change when one occurs), which is far safer for trading algorithms.
  • Metric Discrepancy: The authors demonstrate that high MCC scores do not always translate to actionable trading signals. In several cases, models with high MCC had a $p_T$ of zero because errors occurred at critical entry or exit points, rendering the entire signal chain useless.
  • Actionability: For large-tick stocks, the probability of executing a correct transaction ($p_T$) remained stable even as model confidence requirements increased. For small-tick stocks, $p_T$ crashed to zero under stricter thresholds.

Conclusion and Future Work

While deep learning offers powerful tools for LOB forecasting, its effectiveness is deeply tied to market microstructure. The findings, backed by 135 experiments and nearly 960 GPU hours, suggest that "one-size-fits-all" models are insufficient for the complexities of the NASDAQ exchange.

Future research directions include accounting for hardware latency, which can erase the gains of a perfect forecast in real-world environments, and exploring advanced architectures like Transformers or Graph Neural Networks (GNNs) to better handle the sparse data structures characteristic of small-tick stocks.

Summary updated

BibTeX
@misc{briola2024deep,
  author = {Antonio Briola and Silvia Bartolucci and Tomaso Aste},
  title = {{Deep Limit Order Book Forecasting}},
  year = {2024},
  eprint = {2403.09267},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.09267},
}
Figure