Source-linked AI summary

DeepLOB: Deep Convolutional Neural Networks for Limit Order Books

Zihao Zhang, Stefan Zohren, Stephen Roberts

arXiv:1808.03668v6q-fin.CP

TL;DR

Predicting stock-price movements from noisy, high-frequency limit order books requires models that learn useful representations and temporal structure beyond handcrafted features. DeepLOB combines convolutional filters, an Inception Module, and LSTM units, outperforming state-of-the-art methods on FI-2010 while maintaining robust out-of-sample accuracy and transfer to unseen instruments. LIME analysis further identifies relevant order-book components behind its predictions.

  • Problem

    High-dimensional, non-stationary, stochastic LOB data make traditional handcrafted modelling difficult, while FI-2010 alone does not fully verify robustness and generalisation.

  • Method

    DeepLOB uses convolutional and pooling layers with an Inception Module, followed by LSTM units, to learn spatial and temporal features from high-frequency LOB data.

  • Results

    DeepLOB outperforms existing state-of-the-art algorithms on FI-2010 and achieves robust out-of-sample accuracy across LSE stocks, including instruments absent from training.

  • Takeaways & Limitations

    The model extracts features that transfer across instruments, while LIME reveals relevant price and size information across order-book levels and horizons.

Abstract

from arXiv · show

We develop a large-scale deep learning model to predict price movements from limit order book (LOB) data of cash equities. The architecture utilises convolutional filters to capture the spatial structure of the limit order books as well as LSTM modules to capture longer time dependencies. The proposed network outperforms all existing state-of-the-art algorithms on the benchmark LOB dataset [1]. In a more realistic setting, we test our model by using one year market quotes from the London Stock Exchange and the model delivers a remarkably stable out-of-sample prediction accuracy for a variety of instruments. Importantly, our model translates well to instruments which were not part of the training set, indicating the model's ability to extract universal features. In order to better understand these features and to go beyond a "black box" model, we perform a sensitivity analysis to understand the rationale behind the model predictions and reveal the components of LOBs that are most relevant. The ability to extract robust features which translate well to other instruments is an important property of our model which has many other applications.

I. INTRODUCTION

Limit order books are high-dimensional, noisy data environments that challenge traditional handcrafted models. DeepLOB combines convolutional and LSTM components to predict stock-price movements, then evaluates robustness, transfer across instruments, trading relevance, and interpretability.

  • Motivation: High-dimensional, non-stationary limit order books contain noisy deeper-level activity and unobservable effects that complicate traditional modelling.Traditional models often rely on handcrafted features to avoid excessive parameter spaces.
  • Proposed approach: DeepLOB combines convolutional layers and LSTM units to predict future stock-price movements from large-scale high-frequency LOB data.The architecture is designed to extract representative features from highly noisy data across many stocks.
  • Proposed approach: The Inception Module combines convolutional and pooling layers to infer local interactions across time horizons before passing feature maps to LSTM units.The LSTM components capture dynamic temporal behaviour.
  • Evaluation: DeepLOB outperforms existing state-of-the-art algorithms on FI-2010 and delivers robust out-of-sample prediction accuracy across five LSE stocks over three months.The LSE evaluation uses one year of order-book data, with hyperparameters selected on a separate validation set.
  • Evaluation: The model also performs well on stocks excluded from training, suggesting robust and potentially universal order-book features transferable to new instruments.This transfer is evaluated in both timing and data-stream senses.
  • Interpretability and trading relevance: LIME sensitivity analysis identifies relevant price and volume components and yields patterns of order-book activity that are consistent with sensible interpretations.The analysis addresses the limited practical use of a financial black-box model without understanding its predictions.

II. BACKGROUND AND RELATED WORK

Prior work includes statistical and machine-learning approaches to financial prediction, but LOB modelling remains difficult because data are stochastic and feature extraction is often separate from the objective. DeepLOB addresses this gap with a carefully designed CNN-LSTM architecture.

  • Existing approaches: Financial forecasting research broadly spans statistical parametric models and data-driven machine-learning approaches.The literature includes longstanding work on stock-market predictability.
  • Existing approaches: Machine-learning studies of LOBs commonly use preprocessing or feature extraction because financial time-series data are highly stochastic.Examples include PCA, LDA, and Bag-of-Features approaches.
  • Existing approaches: Static extraction methods are not optimized for the overall model objective, whereas end-to-end trained feature extraction can improve FI-2010 results.The comparison motivates learning representations jointly with prediction.
  • CNNs: CNNs automatically tune filter-based representations to the utility function optimized by the whole network, but prior financial CNN architectures were relatively unsophisticated.The paper positions architectural design as important for improving results.
  • CNN-LSTM novelty: DeepLOB combines CNNs with LSTMs for stock-price prediction, presented as the first extensive study of a nested CNN-LSTM model on raw market data.Its Inception Module is described as novel in this context and useful for inferring feature decay rates.

A. Limit Order Books

A limit order book records bid and ask prices and volumes across price levels, evolving as orders arrive and execute. The paper uses FI-2010 and a larger one-year LSE dataset to evaluate prediction robustness.

  • LOB structure: A LOB records resting bid and ask orders, with price and volume vectors organized across successive price levels.L1 denotes the first level, followed by L2 and deeper levels.
  • LOB structure: The best bid is the highest available buying price, while the best ask is the lowest available selling price.These are the first bid and ask levels of the book.
  • LOB dynamics: An incoming market buy order can execute ask levels and move the best ask to a higher price.In the illustrated example, buying five shares executes the first two ask levels and moves the best ask from 20.6 to 20.8.
  • Datasets: The FI-2010 benchmark contains ten consecutive days of high-frequency LOB data for five Nasdaq Nordic stocks, but this duration is insufficient to fully test robustness.The paper supplements it with one year of LSE data.
  • Datasets: The LSE dataset covers one year for Lloyds Bank, Barclays, Tesco, BT, and Vodafone, using all LOB updates for these liquid stocks.The liquid instruments make trading without price impact more realistic while making prediction more difficult.
  • Datasets: The LSE data contain more than 134 million irregularly spaced samples, split into six months for training, three for validation, and three for testing.The average interval between events is 0.192 seconds.

C. Data Normalisation and Labelling

The paper normalizes LOB inputs dynamically and labels price movements using smoothed mid-price changes and a threshold, while noting consistency problems in FI-2010 labels for trading use.

  • Data Normalisation: The model uses z-score normalization for FI-2010 and rolling five-day statistics separately for each LSE instrument.The input comprises the 100 most recent LOB states, represented as X ∈ R100×40.
  • Labelling: Smoothed labels compare means of previous and future mid-prices rather than a single pair of prices, reducing noise in stochastic financial data.The previous and next means each span the prediction horizon k.
  • Labelling: A percentage change above α is labelled up (+1), below −α down (−1), and otherwise stationary (0).The labelling schemes use the same threshold and prediction horizon in the illustrated comparison.
  • Labelling: FI-2010 labels use Equation 3 for fair comparison, but their inconsistent signals can trigger redundant trades and larger transaction costs.The inconsistency arises because smoothing is applied only to future prices in that method.
  • Labelling: For the LSE dataset, the authors adopt Equation 4 because applying the FI-2010 approach produced stochastic labels on their data.

A. Overview

DeepLOB combines convolutional layers, an Inception Module, and LSTM units to learn spatial and temporal features from noisy LOB data. Its convolutions organize price-volume information and imbalance features before temporal modeling.

  • Architecture: The architecture has three main building blocks: standard convolutional layers, an Inception Module, and an LSTM layer.CNNs and Inception Modules automate feature extraction for noisy financial data.
  • Convolutional Layer: The first convolution uses 1 × 2 filters with stride 1 × 2 to summarize price and volume at each order-book level without mixing adjacent level pairs.This layout preserves the distinct dynamics of price and volume features.
  • Convolutional Layer: A second 1 × 2 convolution integrates information across levels, producing micro-price-like features for all ten LOB levels.A final 1 × 10 filter combines these features into a (100, 1) representation before the Inception Module.
  • Convolutional Layer: Convolutional translation equivariance allows the same decisive feature, such as imbalance, to be detected when it occurs at different times.
  • Inception Module: The Inception Module combines filters spanning multiple temporal scales, including 3 × 1 and 5 × 1 convolutions, to capture dynamic behavior.It uses 1 × 1 convolutions to form lower-dimensional representations before transforming and merging them.
  • LSTM Module: LSTM units replace fully connected layers to model temporal relationships among extracted features while reducing the parameter count.The implementation uses 64 LSTM units, yielding about 60,000 parameters versus more than 630,000 for one 64-unit fully connected layer.

A. Experiments Settings

The experiments use the same DeepLOB architecture throughout, train with categorical crossentropy and ADAM, and stop when validation accuracy fails to improve.

  • Training: All experiments use the same architecture, denoted DeepLOB, with parameters learned by minimizing categorical crossentropy.
  • Training: ADAM training uses epsilon 1 and learning rate 0.01, with early stopping after 20 epochs without validation-accuracy improvement.
  • Training: Training lasts about 100 epochs on FI-2010 and 40 epochs on the LSE dataset under the stated stopping rule.
  • Training: Mini-batches contain 32 samples, and models are trained using a single NVIDIA Tesla P100 GPU.

B. Experiments on the FI-2010 Dataset

The FI-2010 evaluation uses two train/test setups and compares DeepLOB with established methods using multiple classification metrics. Setup 2 provides more training data and yields substantially better performance than the early folds of Setup 1, while forward-pass computation is also reported.

  • Setup 1 uses anchored forward splits, training on the first i days and testing on day i + 1 for i = 1, · · · , 9.
  • Setup 2 trains on the first 7 days and tests on the final 3 days, supplying more data for calibrating the deep network.
  • Mean accuracy, recall, precision, and F1 score are calculated across folds, with F1 emphasized because FI-2010 is imbalanced.
  • DeepLOB achieves better performance than the reported baseline methods, with especially large improvements over CNN-I and CNN-II in Setup 2.
  • Forward-pass computation time is reported in milliseconds, and the authors relate fast prediction to the feasibility of high-frequency trading.

C. Experiments on the London Stock Exchange (LSE)

The LSE experiment evaluates DeepLOB on one year of data from five liquid stocks, using three-month testing periods and multiple prediction horizons. Accuracy is stable across stocks, while the trading simulation produces consistent profits, with higher cumulative profits at longer horizons despite lower accuracy.

  • One year of LSE data from LLOY, BARC, TSCO, BT, and VOD is used, with a three-month testing period.
  • Prediction performance: The model is evaluated across prediction horizons k = 20, 50, and 100 using confusion matrices and daily-accuracy boxplots.
  • Prediction performance: Accuracy remains consistent and robust across stocks, with narrow interquartile ranges and few daily outliers throughout testing.
  • Trading simulation: The simulation uses one share per trade and signals of −1, 0, and +1 to represent sell, wait, and buy actions.
  • Trading simulation: Profits are evaluated with normalised daily-profit boxplots, t-statistics, and cumulative-profit plots across stocks and horizons.
  • Trading simulation: Longer prediction horizons produce higher cumulative profits even though accuracy is lower, because the resulting signal is more robust.

E. Sensitivity Analysis

The sensitivity analysis applies LIME to connect DeepLOB predictions with influential LOB components. It finds that DeepLOB uses identifiable input regions more broadly than CNN-I, whose inputs are often inactive in the examined examples.

  • LIME locally perturbs an input and observes prediction changes to estimate the importance and sensitivity of LOB components.
  • Compared with DeepLOB, CNN-I leaves most input components inactive in the examples, which the authors associate with its pooling and large initial filters.

VI. CONCLUSION

The paper introduces a hybrid CNN–Inception–LSTM architecture for high-frequency LOB price prediction, evaluates its generalisation and trading performance, and uses LIME to interpret its predictions.

  • Conclusion: The paper introduces a hybrid deep neural network using CNNs, an Inception Module, and LSTM units for high-frequency LOB price prediction.CNNs and the Inception Module automate feature extraction, while LSTM units capture time dependencies.
  • Conclusion: The method performs better than other techniques on short-term price-movement prediction using the FI-2010 benchmark dataset.
  • Conclusion: The model generalises to instruments absent from training data, suggesting that it captures universal features informative for price formation.
  • Conclusion: A simple trading simulation reports good profits that are statistically significant.
  • Conclusion: LIME identifies input components contributing to predictions, including prices and sizes across different LOB levels and horizons.These contributions are reported as consistent with econometric understanding.
  • Conclusion: Later work extends DeepLOB with Bayesian neural networks to provide uncertainty measures for network outputs.The stated application includes upsizing positions.
Loading 1808.03668v6…