Sequential Graph Attention Learning for Predicting Dynamic Stock Trends (Student Abstract)

Tzu-Ya Lai, Wen Jung Cheng, Jun-En Ding

Abstract

The stock market is characterized by a complex relationship between companies and the market. This study combines a sequential graph structure with attention mechanisms to learn global and local information within temporal time. Specifically, our proposed "GAT-AGNN" module compares model performance across multiple industries as well as within single industries. The results show that the proposed framework outperforms the state-of-the-art methods in predicting stock trends across multiple industries on Taiwan Stock datasets.

Introduction

Predicting stock market trends is notoriously difficult because the market is a dynamic system where companies influence one another. This phenomenon, known as "momentum spillover," occurs when price movements in one company or industry trigger reactions in others. While Graph Neural Networks (GNNs) have been used to model these connections, earlier approaches often relied on simplistic aggregators. This research proposes a more sophisticated, data-driven approach to capture hidden inter-company relationships and improve both classification (trend direction) and regression (specific returns) tasks.

Methodology

The proposed framework, the Sequential Fusion Module, consists of several stages designed to capture both temporal and relational data:

  1. Temporal Feature Extraction: Gated Recurrent Units (GRUs) process historical price data (high, low, open, close, and turnover) over a rolling window.
  2. Dual Attention Mechanisms: The core innovation involves two distinct attention paths:
  3. Graph Attention Network (GAT): Learns prospective links or correlations based on company features.
  4. Attention-Based Graph Neural Network (AGNN): Identifies behavioral similarities using a trainable cosine similarity function.
  5. Sequential Relation Module: These attention outputs are fused using a multi-head approach, allowing the network to attend to various industry relationships across different subspaces.
The GAT-AGNN architecture for sequential stock trend prediction.

Dataset and Scope

The study utilizes daily trading data from the Taiwan Economic Journal (TEJ) spanning November 18, 2019, to June 20, 2022. The dataset includes 30 companies from the Yuanta/P-shares Taiwan Mid-Cap 100 ETF, focusing on features like price extremes, opening/closing prices, and turnover rates.

Results and Discussion

The GAT-AGNN model was evaluated against several baselines, including LSTM, GRU, and the previous state-of-the-art, AD-GAT.

Performance comparison of GAT-AGNN against baseline models across classification and regression metrics.

Key Performance Metrics

  • Superior Accuracy: GAT-AGNN achieved a classification accuracy (ACC) of 0.5350, the highest among all tested models.
  • Error Reduction: In regression tasks, the model reached a Mean Squared Error (MSE) of 1.1585, representing a 5.5% improvement over the AD-GAT baseline.

The Impact of Multi-Industry Learning

A significant finding was the synergy gained from training on multiple industries simultaneously. When comparing an "All Industry" model to a single-industry (Shipping) model, the multi-industry approach demonstrated a 26.91% decrease in MSE and a 9.33% increase in accuracy. This suggests that global market information and cross-industry relationships are critical for accurate prediction.

Conclusion and Future Work

The combination of standard GAT with similarity-based AGNN allows the model to capture both direct causal links and tandem movements due to shared market sensitivities. While the results are promising, future work should focus on scaling the architecture to handle hundreds of stocks and incorporating alternative data sources like news sentiment or macroeconomic indicators to further refine the similarity modules.

Summary updated

Abstract

The stock market is characterized by a complex relationship between companies and the market. This study combines a sequential graph structure with attention mechanisms to learn global and local information within temporal time. Specifically, our proposed "GAT-AGNN" module compares model performance across multiple industries as well as within single industries. The results show that the proposed framework outperforms the state-of-the-art methods in predicting stock trends across multiple industries on Taiwan Stock datasets.
BibTeX
@inproceedings{lai2023sequential,
  author = {Tzu-Ya Lai and Wen Jung Cheng and Jun-En Ding},
  title = {{Sequential Graph Attention Learning for Predicting Dynamic Stock Trends (Student Abstract)}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i13.26982},
}
Figure