Table of Contents
Fetching ...

Learning to Predict Short-Term Volatility with Order Flow Image Representation

Artem Lensky, Mingyu Hao

TL;DR

This paper tackles short-term Bitcoin volatility forecasting by converting intraday order flow (trades and limit order book data) into 240×240 images, and evaluating CNN-based predictors with and without hand-crafted features. The proposed CNN-Aggr model, which combines image-derived features with aggregated handcrafted features, achieves the best predictive accuracy with a RMSPE of $0.851 \pm 1.110$ on the test set, outperforming baselines like GARCH and naive predictors. Interpretability analyses via embedding visualizations show the model’s later layers capturing volatility-driven structure and market trends, supporting the approach’s explanatory value. The results indicate that an image-based representation of order flow can yield robust and transferable signals for real-time volatility forecasting, with potential applicability to other assets and extensions to temporal attention architectures.

Abstract

Introduction: The paper addresses the challenging problem of predicting the short-term realized volatility of the Bitcoin price using order flow information. The inherent stochastic nature and anti-persistence of price pose difficulties in accurate prediction. Methods: To address this, we propose a method that transforms order flow data over a fixed time interval (snapshots) into images. The order flow includes trade sizes, trade directions, and limit order book, and is mapped into image colour channels. These images are then used to train both a simple 3-layer Convolutional Neural Network (CNN) and more advanced ResNet-18 and ConvMixer, with additionally supplementing them with hand-crafted features. The models are evaluated against classical GARCH, Multilayer Perceptron trained on raw data, and a naive guess method that considers current volatility as a prediction. Results: The experiments are conducted using price data from January 2021 and evaluate model performance in terms of root mean square error (RMSPE). The results show that our order flow representation with a CNN as a predictive model achieves the best performance, with an RMSPE of 0.85+/-1.1 for the model with aggregated features and 1.0+/-1.4 for the model without feature supplementation. ConvMixer with feature supplementation follows closely. In comparison, the RMSPE for the naive guess method was 1.4+/-3.0.

Learning to Predict Short-Term Volatility with Order Flow Image Representation

TL;DR

This paper tackles short-term Bitcoin volatility forecasting by converting intraday order flow (trades and limit order book data) into 240×240 images, and evaluating CNN-based predictors with and without hand-crafted features. The proposed CNN-Aggr model, which combines image-derived features with aggregated handcrafted features, achieves the best predictive accuracy with a RMSPE of on the test set, outperforming baselines like GARCH and naive predictors. Interpretability analyses via embedding visualizations show the model’s later layers capturing volatility-driven structure and market trends, supporting the approach’s explanatory value. The results indicate that an image-based representation of order flow can yield robust and transferable signals for real-time volatility forecasting, with potential applicability to other assets and extensions to temporal attention architectures.

Abstract

Introduction: The paper addresses the challenging problem of predicting the short-term realized volatility of the Bitcoin price using order flow information. The inherent stochastic nature and anti-persistence of price pose difficulties in accurate prediction. Methods: To address this, we propose a method that transforms order flow data over a fixed time interval (snapshots) into images. The order flow includes trade sizes, trade directions, and limit order book, and is mapped into image colour channels. These images are then used to train both a simple 3-layer Convolutional Neural Network (CNN) and more advanced ResNet-18 and ConvMixer, with additionally supplementing them with hand-crafted features. The models are evaluated against classical GARCH, Multilayer Perceptron trained on raw data, and a naive guess method that considers current volatility as a prediction. Results: The experiments are conducted using price data from January 2021 and evaluate model performance in terms of root mean square error (RMSPE). The results show that our order flow representation with a CNN as a predictive model achieves the best performance, with an RMSPE of 0.85+/-1.1 for the model with aggregated features and 1.0+/-1.4 for the model without feature supplementation. ConvMixer with feature supplementation follows closely. In comparison, the RMSPE for the naive guess method was 1.4+/-3.0.
Paper Structure (13 sections, 2 equations, 4 figures, 2 tables)

This paper contains 13 sections, 2 equations, 4 figures, 2 tables.

Figures (4)

  • Figure 1: (a) The Bid/Ask levels are shown in green/red respectively. The colour intensity is proportional to the size of a limit order. Blue blocks represent large trades, with the size being proportional to the size of a trade e.g. encodes T&S information. (b) Both sides of the limit orders are shown in blue. The colour intensity is proportional to limit order size. Red and green blocks represent sell and buy trades, with the intensity being proportional to the size of a trade.
  • Figure 2: Order flow is passed to the tabular feature extractor and to the image encoder. The encoded images are then passed to the CNN model. The outputs of both parts are concatenated and fed into the regression layer(fully connected layer).
  • Figure 3: The left-hand diagram shows the structure of the base CNN model, and the on the left are the weights of corresponding layers visualise with t-SNE at $\texttt{0:05}, \texttt{20}^{th}, \texttt{June}, \texttt{2022}$ to $\texttt{23:50}, \texttt{24}^{th}, \texttt{June}, \texttt{2022}$. The colour band corresponds to the volatility range of the day. Notice that because the volatility is normalized separately for each day, there is no absolute correlation between samples with the same colour across days.
  • Figure 4: t-SNE visualization of final ReLU layer on $21^{th}, June, 2022$. Six samples represent different market conditions. The left image is the input; the middle graph depicts the market price at the same time period (including both the input and target period on the left and right side of the red line); the right graph shows the position of the sample (black dot) in the t-SNE plot of last activation layer.