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

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

Introduction

Predicting stock market trends is a complex challenge due to the dynamic nature of financial markets, where companies do not operate in isolation. A significant factor in market movement is "momentum spillover," where price changes in one sector—such as technology—ripple through related industries like manufacturing or logistics. Traditional time-series models often fail to capture these interdependencies. This research addresses two primary gaps in existing literature: the inability of models to learn inter-company relationships directly from data and the architectural simplicity of previous attribute-based aggregators, which often rely on shallow networks insufficient for financial complexity.

Methodology: The GAT-AGNN Framework

The proposed GAT-AGNN framework is a hybrid deep learning model designed to capture both temporal trends and dynamic relational data. The architecture processes historical stock data through three distinct stages:

  1. Temporal Feature Extraction: Gated Recurrent Units (GRUs) process daily trading data (including price and turnover) to generate feature vectors representing individual company trends.
  2. Dual Graph Attention:
    • Graph Attention Network (GAT): Captures prospective links between companies using a shared attention mechanism.
  3. Attribute-Based Graph Neural Network (AGNN): Employs a trainable cosine similarity function to identify connections based on the similarity of companies' feature vectors.
  4. Sequential Relation Module: A multi-head attention mechanism fuses temporal data from the GRU with relational insights from the GAT and AGNN, allowing the model to weigh diverse industry relationships simultaneously.
Architecture of the GAT-AGNN framework, illustrating the flow from historical stock data through GRU and dual graph attention layers to the final prediction task.

Experimental Setup and Results

The model was evaluated using daily trading data from the Taiwan Economic Journal (TEJ), spanning 630 trading days between 2019 and 2022. The dataset included 30 companies from the Yuanta/P-shares Taiwan Mid-Cap 100 ETF, focusing on features such as opening/closing prices, turnover rates, and price extremes.

The GAT-AGNN model was tested on both classification (predicting positive or negative returns) and regression (predicting actual return values) tasks. As shown in the performance comparison, GAT-AGNN consistently outperformed standard baselines like LSTM and GRU, as well as more advanced graph-based models like AD-GAT.

Performance metrics comparing GAT-AGNN against various baseline models. GAT-AGNN achieves the highest accuracy (0.5350) and the lowest Mean Squared Error (1.1585).

Key Insights

  • Industry Synergy: A critical finding was that the model performed significantly better when trained on data from multiple industries rather than a single sector. For instance, the multi-industry approach yielded a 9.33% increase in accuracy and a 26.91% decrease in MSE compared to a single-industry model. This suggests the graph structure successfully captures cross-sector economic dependencies.
  • Data-Driven Connectivity: Unlike static models, GAT-AGNN learns relationships based on actual market behavior, allowing it to adapt to shifting dynamics in real-time.

Conclusion

GAT-AGNN demonstrates that combining temporal feature extraction with dual-layer graph attention provides a more robust framework for stock trend prediction. By capturing complex momentum spillover effects and leveraging multi-industry data, the model achieves superior predictive accuracy. Future research will explore scaling this architecture to larger global datasets and integrating alternative data sources, such as news sentiment and macroeconomic indicators, to further refine the AGNN similarity calculations.

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