Benchmark Dataset for Mid-Price Forecasting of Limit Order Book Data with Machine Learning Methods

Adamantios Ntakaris, Martin Magris, Juho Kanniainen, Moncef Gabbouj, Alexandros IosifidisarXiv 2017 · DOI

TL;DR

This paper introduces the first publicly available benchmark dataset for mid-price forecasting in high-frequency limit order markets. By providing approximately 4 million time-series samples from the NASDAQ Nordic stock market alongside a standardized experimental protocol, the authors aim to move the field beyond small-scale, private datasets and enable rigorous comparison of machine learning models for financial forecasting.

What Problem Does This Paper Address?

In the world of High-Frequency Trading (HFT), the Limit Order Book (LOB) is the heartbeat of the market. It records every bid to buy and ask to sell, providing a granular view of supply and demand. Predicting the "mid-price"—the average of the best bid and best ask—is a holy grail for market makers and speculative traders.

However, research in this area has long been stymied by a lack of transparency. Most studies use proprietary data or very small samples (often just a few thousand events) because non-linear models like Support Vector Machines (SVMs) struggle with the computational complexity of massive datasets. Furthermore, the lack of a common benchmark makes it impossible to know if a new algorithm is actually better than the state-of-the-art or just "lucky" on a specific, private data slice.

Methods

The authors developed a pipeline to transform raw market data into a format suitable for machine learning.

Fig. 1. Data processing flow
  1. Feature Engineering: They adopted a 144-dimensional representation consisting of:
  2. Basic Features: Raw price and volume for 10 LOB levels.
  3. Time-Insensitive Features: Spreads, mid-prices, and price/volume differences.
  4. Time-Sensitive Features: Derivatives of price and volume, and intensity comparisons (how fast orders are arriving).
  5. Normalization: They tested three strategies—Z-score, Min-Max, and Decimal Precision—to see how data scaling affects model performance.
  6. Baselines: To set the bar, they implemented two models:
  7. Ridge Regression (RR): A linear model that handles high-dimensional data efficiently.
  8. SLFN (Single-hidden Layer Feedforward Network): A non-linear model using Radial Basis Functions (RBF) and K-means clustering for weight initialization, chosen specifically because standard kernel-based methods are too slow for a 4-million-sample dataset.
  9. Experimental Protocol: They proposed a "day-based anchored cross-validation" where the training set grows by one day in each fold, ensuring the model never "looks into the future."

Datasets

The primary contribution is the FI-2010 dataset. It contains data for five stocks (Kesko Oyj, Outokumpu Oyj, Sampo Oyj, Rautaruukki Oyj, and Wärtsilä Oyj) traded on the NASDAQ OMX Nordic (Helsinki) over ten consecutive trading days in June 2010.

Unlike US markets, which are highly fragmented across many exchanges, the Helsinki exchange is a "pure" limit order market, making it an ideal, less-noisy environment for empirical research. The final dataset comprises roughly 4 million events, providing a massive scale rarely seen in public financial datasets.

Key Insights and Ideas

  • The Normalization Boost: For non-linear models (SLFN), proper normalization isn't just a detail—it's essential. Using Z-score or Min-Max normalization improved the F1 score by nearly 10% compared to raw data.
  • Linearity in High Dimensions: Interestingly, the linear Ridge Regression model performed very well on raw and Z-score data. The authors suggest that in such high-dimensional spaces, the classes (upward, downward, stationary price movements) may be largely linearly separable.
  • The "Horizon" Paradox: The models generally performed better when predicting further into the future (e.g., 5 or 10 events ahead) than the immediate next event. This suggests that short-term "noise" is harder to overcome than the underlying momentum of the order book.
  • Computational Trade-offs: The shift from standard SVMs to SLFNs highlights a common theme in Big Data: when you have millions of samples, the "best" theoretical model is useless if it can't finish training in a reasonable timeframe.

Key Results

The authors achieved an average out-of-sample F1 score of approximately 46% for both linear and non-linear methods. While this might seem low compared to image recognition tasks, in the highly stochastic world of HFT, this represents a significant "information edge."

Specifically, for the 5-step-ahead prediction task, the SLFN achieved a 46% F1 score with Z-score normalization, a substantial jump from the 33% achieved on non-normalized data.

Limitations and Future Work

The authors acknowledge a few key areas for improvement:

  • Order Flow Information: The current feature set lacks information about the sequence of messages (the specific "story" of how the book reached its current state).
  • Feature Expansion: Future work could involve introducing more complex features or using Deep Learning (like LSTMs) to capture temporal dependencies more effectively.
  • Spoofing Detection: While not the focus here, the authors suggest this dataset could eventually be used to train systems to identify market manipulation, such as "spoofing" (placing orders with the intent to cancel them before execution).

Summary updated

Abstract

Managing the prediction of metrics in high-frequency financial markets is a challenging task. An efficient way is by monitoring the dynamics of a limit order book to identify the information edge. This paper describes the first publicly available benchmark dataset of high-frequency limit order markets for mid-price prediction. We extracted normalized data representations of time series data for five stocks from the NASDAQ Nordic stock market for a time period of ten consecutive days, leading to a dataset of ~4,000,000 time series samples in total. A day-based anchored cross-validation experimental protocol is also provided that can be used as a benchmark for comparing the performance of state-of-the-art methodologies. Performance of baseline approaches are also provided to facilitate experimental comparisons. We expect that such a large-scale dataset can serve as a testbed for devising novel solutions of expert systems for high-frequency limit order book data analysis.
BibTeX
@misc{ntakaris2017benchmark,
  author = {Adamantios Ntakaris and Martin Magris and Juho Kanniainen and Moncef Gabbouj and Alexandros Iosifidis},
  title = {{Benchmark Dataset for Mid-Price Forecasting of Limit Order Book Data with Machine Learning Methods}},
  year = {2017},
  eprint = {1705.03233},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1705.03233},
}

Loading related content...

Figure