Implicit-Causality-Exploration-Enabled Graph Neural Network for Stock Prediction

Ying Li, Xiaosha Xue, Zhipeng Liu, Peibo Duan, Bin Zhang

TL;DR

This paper introduces a novel Graph Neural Network (GNN) framework, DSF-GNN, that goes beyond traditional correlation-based stock prediction by explicitly modeling Granger causality. By integrating both static and dynamic relational features, including causal relationships, DSF-GNN achieves improved accuracy in predicting stock price movements.

What Problem Does This Paper Address?

Accurately predicting stock price movements is crucial for investors and financial markets. While Graph Neural Networks (GNNs) have shown promise by capturing relationships between stocks, existing methods primarily focus on correlations or explicit relationships (like industry or shareholding). This overlooks the more nuanced and often hidden causal relationships that truly drive stock price changes. Furthermore, many existing GNN approaches struggle to simultaneously handle both static and dynamic relationships, limiting their predictive power. This paper aims to bridge this gap by developing a GNN that can effectively mine and leverage implicit causal relationships alongside explicit and dynamic ones.

Methods

The core of the proposed framework, DSF-GNN, lies in its ability to model Granger causality and integrate it into a GNN architecture.

  • Granger Causal Graph Modeling: The paper first models Granger causality between stocks using a nonlinear approach and a feed-forward neural network. This process identifies which stocks "Granger-cause" others, essentially uncovering directed causal relationships. To make these directed graphs compatible with standard GNNs, they are converted into undirected "moral graphs."
  • Dynamic and Static Relational Feature Extraction (DRF & SRF): The framework incorporates two modules to capture different types of relationships:
  • DRF (Dynamic Relational Feature Extractor): This module captures dynamic relationships (like media sentiment and Granger causality) by considering how past relationships influence current stock prices. It uses a temporal attention mechanism to weigh the importance of different time steps.
  • SRF (Static Relational Feature Extractor): This module captures static relationships (like industry ties) by aggregating features based on predefined stock graphs and attention mechanisms to weigh neighbor influence.
  • Relational Feature Fusion (RFF): This module intelligently fuses the dynamic and static relational embeddings generated by DRF and SRF. It aims to capture potential interactions between these features while preserving their individual characteristics, creating a richer representation.
  • Temporal Feature Representation (TFR): A standard GRU network is used to capture the historical temporal dependencies of individual stock prices.
  • Prediction Layer: A fully connected network with a softmax function is used for the final binary classification of stock movement (up or down).

Datasets

The study uses a dataset from Tushare, a Chinese stock market data provider. The dataset consists of over 4000 stocks, filtered to include 600 companies that meet specific criteria: no suspensions from January 2019 to January 2022, and stock prices consistently above 10 yuan. Historical indicators like opening price, closing price, high price, low price, and trading volume are used. The prediction task is framed as a binary classification problem: predicting whether the closing price will increase or decrease.

Key Insights and Ideas

  • Causality Over Correlation: The paper strongly advocates for moving beyond correlation-based relationships to causal ones for more robust stock prediction. Granger causality provides a more stringent criterion for identifying predictive relationships.
  • Unified Handling of Static and Dynamic Relations: The framework's ability to simultaneously model and fuse static (industry) and dynamic (media, Granger causality) relationships is a key innovation. This holistic approach captures a more complete picture of inter-stock influences.
  • Moralization for Directed Graphs: The clever use of moralization to convert directed causal graphs into undirected ones is crucial for leveraging existing GNN architectures, which typically operate on undirected graphs.
  • Temporal Attention for Dynamic Features: The incorporation of temporal attention in the DRF module is important for effectively capturing how the influence of dynamic relationships evolves over time.

Key Results

The proposed DSF-GNN model demonstrates superior performance compared to several state-of-the-art baselines on the Chinese stock market dataset.

  • Accuracy Improvement: DSF-GNN achieved the highest Accuracy (ACC) of 54.97%, outperforming other methods by a significant margin (e.g., 2.63% to 6.76% improvement over top baselines).
  • Robustness: The model also achieved the highest Matthews Correlation Coefficient (MCC) of 0.0821, indicating a better overall classification performance, especially in handling imbalanced classes.
  • Ablation Studies: Experiments confirmed the importance of each module: removing RFF (fusion) led to a performance drop, highlighting the benefit of integrating dynamic and static features. Removing DRF or SRF also decreased performance, underscoring the value of both dynamic and static relation extraction. Removing TFR (historical price data) significantly degraded performance, emphasizing the foundational role of individual stock history.
  • Relation Importance: While all relations contributed, removing media relations led to the highest accuracy, suggesting that media sentiment might be less reliable or more prone to manipulation compared to industry, shareholding, or causal relationships.

Limitations and Future Work

  • Data Limitations: The study focuses on the Chinese stock market. Its generalizability to other markets with different characteristics might need further investigation.
  • Granger Causality Limitations: While an improvement, Granger causality itself has limitations, particularly with nonlinear time series. The paper acknowledges that it's a step towards true causality but not the definitive answer.
  • Interpretability of Fusion: While the framework aims for interpretability, the complex fusion of multiple relational features might still present challenges in fully understanding the model's decision-making process.
  • Future Work: The authors suggest exploring more advanced causal inference techniques and investigating the impact of different types of explicit and implicit relations. Further research could also focus on real-time prediction and adapting the model to different market conditions.

Summary updated

BibTeX
@article{li2024implicit,
  author = {Ying Li and Xiaosha Xue and Zhipeng Liu and Peibo Duan and Bin Zhang},
  title = {{Implicit-Causality-Exploration-Enabled Graph Neural Network for Stock Prediction}},
  journal = {inf.},
  year = {2024},
  doi = {10.3390/info15120743},
}
Figure