Table of Contents
Fetching ...

Dynamic Graph Representation with Contrastive Learning for Financial Market Prediction: Integrating Temporal Evolution and Static Relations

Yunhua Pei, Jin Zheng, John Cartlidge

TL;DR

This work tackles stock movement forecasting by bridging dynamic temporal graphs with static stock relations. It introduces DGRCL, a framework consisting of Embedding Enhancement and Contrastive Constrained Training, plus a dynamic graph evolution mechanism, and evaluates it on NASDAQ and NYSE to demonstrate superior predictive accuracy over strong baselines. The key ideas include DTW-based adaptive graph construction, FFT-driven feature refinement, and relation-informed contrastive learning, optimized with a joint loss that combines prediction and contrastive terms. The results show meaningful gains in accuracy, F1, and MCC, with ablation studies confirming the contribution of both EE and CCT, and provide public code and data for reproducibility and further research in financial graph modeling.

Abstract

Temporal Graph Learning (TGL) is crucial for capturing the evolving nature of stock markets. Traditional methods often ignore the interplay between dynamic temporal changes and static relational structures between stocks. To address this issue, we propose the Dynamic Graph Representation with Contrastive Learning (DGRCL) framework, which integrates dynamic and static graph relations to improve the accuracy of stock trend prediction. Our framework introduces two key components: the Embedding Enhancement (EE) module and the Contrastive Constrained Training (CCT) module. The EE module focuses on dynamically capturing the temporal evolution of stock data, while the CCT module enforces static constraints based on stock relations, refined within contrastive learning. This dual-relation approach allows for a more comprehensive understanding of stock market dynamics. Our experiments on two major U.S. stock market datasets, NASDAQ and NYSE, demonstrate that DGRCL significantly outperforms state-of-the-art TGL baselines. Ablation studies indicate the importance of both modules. Overall, DGRCL not only enhances prediction ability but also provides a robust framework for integrating temporal and relational data in dynamic graphs. Code and data are available for public access.

Dynamic Graph Representation with Contrastive Learning for Financial Market Prediction: Integrating Temporal Evolution and Static Relations

TL;DR

This work tackles stock movement forecasting by bridging dynamic temporal graphs with static stock relations. It introduces DGRCL, a framework consisting of Embedding Enhancement and Contrastive Constrained Training, plus a dynamic graph evolution mechanism, and evaluates it on NASDAQ and NYSE to demonstrate superior predictive accuracy over strong baselines. The key ideas include DTW-based adaptive graph construction, FFT-driven feature refinement, and relation-informed contrastive learning, optimized with a joint loss that combines prediction and contrastive terms. The results show meaningful gains in accuracy, F1, and MCC, with ablation studies confirming the contribution of both EE and CCT, and provide public code and data for reproducibility and further research in financial graph modeling.

Abstract

Temporal Graph Learning (TGL) is crucial for capturing the evolving nature of stock markets. Traditional methods often ignore the interplay between dynamic temporal changes and static relational structures between stocks. To address this issue, we propose the Dynamic Graph Representation with Contrastive Learning (DGRCL) framework, which integrates dynamic and static graph relations to improve the accuracy of stock trend prediction. Our framework introduces two key components: the Embedding Enhancement (EE) module and the Contrastive Constrained Training (CCT) module. The EE module focuses on dynamically capturing the temporal evolution of stock data, while the CCT module enforces static constraints based on stock relations, refined within contrastive learning. This dual-relation approach allows for a more comprehensive understanding of stock market dynamics. Our experiments on two major U.S. stock market datasets, NASDAQ and NYSE, demonstrate that DGRCL significantly outperforms state-of-the-art TGL baselines. Ablation studies indicate the importance of both modules. Overall, DGRCL not only enhances prediction ability but also provides a robust framework for integrating temporal and relational data in dynamic graphs. Code and data are available for public access.

Paper Structure

This paper contains 28 sections, 14 equations, 2 figures, 4 tables.

Figures (2)

  • Figure 1: Schematic illustration of DGRCL framework. Top-left: In the process of embedding enhancement, dynamic stock graphs with enhanced features are generated. Bottom: Then, an encoder is trained with the company relations in a contrastive manner inside the CCT module, to improve the generation of an initial embedding matrix for the subsequent step. Top-right: Finally, the layer weights are learned through general RNNs (e.g., GRU, LSTM) to yield the final predictions.
  • Figure 2: Sensitivity study of the overall probability of removing edges $p_{e}$ and the cut-off threshold $p_{\tau}$ via F1 score.