TCGformer: A temporal causal graph enhanced transformer model for multivariate financial time series forecasting
Abstract
State-of-the-art time series forecasting models, particularly Transformers, often fail to capture the time-varying causal structures that govern interactions among financial institutions, limiting their predictive accuracy in complex environments. This paper introduces the Temporal Causal Graph-Enhanced Transformer (TCGformer), a novel causal knowledge-based intelligent system that integrates causal inference into deep learning for time series prediction. Our framework employs a three-stage pipeline: we first utilize Functional Data Analysis for robust preprocessing of noisy and irregular financial data; we then construct temporal causal graph using Variable-lag Granger Causality, a state-of-the-art causal inference method for observational causal discovery in time series, to model the evolving network of inter-institutional influence; finally, we seamlessly inject this externally grounded causal knowledge into a hierarchical Transformer architecture via our proposed GNN-empowered hybrid routing mechanism. We conduct extensive experiments on a real-world dataset. The results demonstrate that TCGformer consistently outperforms strong baselines, including Crossformer and Transformer, across multiple evaluation metrics. Ablation and robustness analysis reveals a key insight into the model's operational strengths: its performance advantage is particularly pronounced in the medium-to-long-term forecasting horizons. This suggests that our knowledge-driven approach is effective at capturing the fundamental, structural market dynamics that are crucial for longer-range prediction. Furthermore, the more explainable temporal causal graphs provide valuable and interpretable insights into the shifting patterns of systemic risk. To our knowledge, TCGformer is the first framework to synergistically fuse the temporal causal knowledge into a Transformer-based forecasting architecture, bridging the gap between causal discovery and deep learning for intelligent decision-making in finance.