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:
- Temporal Feature Extraction: Gated Recurrent Units (GRUs) process daily trading data (including price and turnover) to generate feature vectors representing individual company trends.
- Dual Graph Attention:
- Graph Attention Network (GAT): Captures prospective links between companies using a shared attention mechanism.
- Attribute-Based Graph Neural Network (AGNN): Employs a trainable cosine similarity function to identify connections based on the similarity of companies' feature vectors.
- 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.
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.
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