Stock Trading Volume Prediction with Dual-Process Meta-Learning

Ruibo Chen, Wei Li, Zhiyuan Zhang, Ruihan Bao, Keiko Harimoto, Xu Sun

Abstract

Accurate prediction of stock trading volume is critical for liquidity analysis and the execution of algorithmic trading strategies. Traditional approaches often struggle with a trade-off between universal models that ignore stock-specific nuances and individual models that suffer from data sparsity. This paper presents a Dual-Process Meta-Learning (DPML) framework designed to bridge this gap. By treating individual stocks as distinct tasks and employing a nested optimization strategy, DPML captures both global market trends and local temporal behaviors. Experimental results on the Topix 500 index demonstrate that DPML consistently improves the performance of various neural architectures and effectively addresses the "cold start" problem for stocks with limited historical data.

Introduction

In the realm of quantitative finance, predicting trading volume is as vital as predicting price. High-frequency trading and market-making require precise estimates of liquidity to minimize market impact. However, the diversity of the stock market presents a significant modeling challenge. Large-cap technology stocks exhibit vastly different trading patterns compared to small-cap utilities, making a single "universal" model insufficient. Conversely, training separate models for every ticker leads to the "data sparsity" problem; many stocks lack the historical depth required to train complex deep learning models, particularly during their initial listing phase.

This research introduces the Dual-Process Meta-Learning (DPML) framework to create a system that is "globally informed but locally sensitive." By leveraging meta-learning, the model learns a generalized initialization that can be rapidly adapted to the specific characteristics of any given stock.

Methodology

The Dual-Process Architecture

The DPML framework is built upon an Encoder-Decoder architecture that operates in a low-dimensional latent space. Rather than learning the prediction parameters ($\theta$) directly from the raw data, the system learns to generate these parameters:

  1. Encoder: Maps raw historical stock data (price and volume) into a latent variable ($z$).
  2. Decoder: Transforms the latent variable ($z$) into the specific parameters ($\theta$) required for the prediction model.

This approach allows the model to optimize in a compressed space, reducing the risk of overfitting and facilitating faster adaptation to new tasks.

Tri-Level Optimization

While standard meta-learning typically involves two levels of optimization (task-specific vs. task-distribution), this paper proposes a unique tri-level setting:

  • The Instance Level (Inner Meta-Learning): This layer operates within a single stock. It samples various time spans to ensure the latent variable $z$ is sensitive to intra-day and intra-week temporal shifts. This allows the model to distinguish between different market regimes, such as the high-volatility opening hour versus the mid-day lull.
  • The Task Level (Individual Stock): The model adapts to the unique signature of a specific stock, such as its typical liquidity profile and reaction to market news.
  • The Task Distribution Level (Outer Meta-Learning): This layer operates across the entire market. It updates the global encoder and decoder parameters to ensure they capture commonalities across all stocks. This "global knowledge" is what enables the model to perform well on new or low-volume stocks.

One of the primary advantages of DPML is that it is model-agnostic. It can be integrated with various base architectures, including Linear models, Long Short-Term Memory (LSTM) networks, and Transformers.

Experimental Evaluation

Dataset and Features

The framework was evaluated using intra-day data from the Topix 500 (TPX500) index. The researchers focused on 5-minute and 10-minute intervals. The feature set included log volumes and OHLC (Open, High, Low, Close) prices from the 12 preceding time slots of the same day, supplemented by data from the same time slots over the previous 20 trading days. The model was trained on 2017 data and tested on the first two months of 2018.

Performance Analysis

The DPML framework demonstrated superior performance across all neural baselines:

  • Accuracy Gains: On the 5-minute dataset, an LSTM + DPML configuration achieved a Mean Squared Error (MSE) of 0.586, a significant improvement over the standard LSTM's 0.623.
  • Directional Prediction: The framework reached a directional accuracy (ACC) of 72.4% in predicting whether volume would increase or decrease in the subsequent interval.
  • Cold Start Resilience: A key finding was the model's ability to maintain high performance even when only 10% of a stock's historical data was available. By utilizing the meta-learned global parameters, the model effectively "filled in the gaps" for data-sparse stocks.

Discussion and Limitations

Ablation studies confirmed that both the inner and outer meta-learning layers are essential; removing either led to a measurable decline in predictive power. However, the researchers noted that the performance boost was slightly less pronounced on 10-minute intervals compared to 5-minute intervals. This suggests that at lower frequencies, data becomes more homogeneous, and the unique "local" patterns that DPML excels at capturing are somewhat smoothed out.

Furthermore, the computational cost of meta-learning is higher than standard training due to the nested optimization loops. While this increases the offline training time, the online adaptation remains efficient, making it viable for real-time trading environments.

Conclusion

The Dual-Process Meta-Learning framework represents a significant step forward in financial time-series forecasting. By successfully balancing global market trends with stock-specific behaviors, it provides a robust solution to the data sparsity and cold start problems inherent in trading volume prediction. Future research may extend this dual-process logic to other volatile financial metrics, such as price volatility or limit order book dynamics.

Summary updated

BibTeX
@inproceedings{chen2022stock,
  author = {Ruibo Chen and Wei Li and Zhiyuan Zhang and Ruihan Bao and Keiko Harimoto and Xu Sun},
  title = {{Stock Trading Volume Prediction with Dual-Process Meta-Learning}},
  booktitle = {ECML/PKDD},
  year = {2022},
  url = {https://openreview.net/forum?id=hsbcOG0caDz},
}
Figure