Search arXiv⌕ Search

arXiv · 2506.18717

A Study of Dynamic Stock Relationship Modeling and S&P500 Price Forecasting Based on Differential Graph Transformer

Abstract

Stock price prediction is vital for investment decisions and risk management, yet remains challenging due to markets' nonlinear dynamics and time-varying inter-stock correlations. Traditional static-correlation models fail to capture evolving stock relationships. To address this, we propose a Differential Graph Transformer (DGT) framework for dynamic relationship modeling and price prediction. Our DGT integrates sequential graph structure changes into multi-head self-attention via a differential graph mechanism, adaptively preserving high-value connections while suppressing noise. Causal temporal attention captures global/local dependencies in price sequences. We further evaluate correlation metrics (Pearson, Mutual Information, Spearman, Kendall's Tau) across global/local/dual scopes as spatial-attention priors. Using 10 years of S&P 500 closing prices (z-score normalized; 64-day sliding windows), DGT with spatial priors outperformed GRU baselines (RMSE: 0.24 vs. 0.87). Kendall's Tau global matrices yielded optimal results (MAE: 0.11). K-means clustering revealed "high-volatility growth" and "defensive blue-chip" stocks, with the latter showing lower errors (RMSE: 0.13) due to stable correlations. Kendall's Tau and Mutual Information excelled in volatile sectors. This study innovatively combines differential graph structures with Transformers, validating dynamic relationship modeling and identifying optimal correlation metrics/scopes. Clustering analysis supports tailored quantitative strategies. Our framework advances financial time-series prediction through dynamic modeling and cross-asset interaction analysis.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Linyue Hu, Qi Wang. 2025-06-23. A Study of Dynamic Stock Relationship Modeling and S&P500 Price Forecasting Based on Differential Graph Transformer. https://arxiv.org/abs/2506.18717

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Centering Drives Normalization Gains: Price-Offset Nuisances in Cross-Sectional Return Prediction

Cross-sectional return prediction from raw intraday bars is sensitive to each instrument price level, an additive nuisance under a return-ranking hypothesis. We test whether removing this offset, rather than rescaling amplitudes or changing the encoder, explains gains on a point-in-time CSI~300 five-minute panel. We evaluate eight parameter-matched encoders with and without RevIN normalization; a parameter-free ladder then separates identity, scale-only, centering, last-value referencing, differencing, and standardization across all fields and restricted channels. Centering drives the reliable effect, while scale-only normalization does not help. All eight paired effects are positive and survive Holm correction on raw rank IC, after style residualization, and after further residualizing on short-term reversal. Among six stronger encoders, gains of 0.0376-0.0567 exceed the 0.0109 spread of normalized IC (0.0830-0.0939). Price-only standardization retains 93--101% of the all-field gain. These results place the main effect in transformed price-channel offset removal rather than amplitude scaling or encoder choice.

cs.CE↗

TERRA-NG v1.0: Extreme-Scale, GPU-accelerated Mantle Convection

We present TERRA-NG, a portable, GPU-accelerated, matrix-free mantle-convection code. A single Kokkos C++ implementation runs at scale on NVIDIA, AMD, and Intel GPU supercomputers. TERRA-NG has a deliberately narrow design: built on a radially extruded mesh of spherical wedges, tailored to the spherical shell geometry, which enables domain-specific optimizations like single quadrature-point integral-evaluations, radial coordinate storage compression and radial shared-memory tiling. The corresponding low-order $W_1$-iso-$W_2/W_1$ wedge-based Stokes--energy discretisation is verified against the Zhong et al.(2008) spherical-shell convection benchmark suite. We showcase TERRA-NG through strong- and weak-scaling on the JUWELS Booster (NVIDIA A100), MareNostrum 5 (NVIDIA H100), LUMI-G (AMD MI250X), Hunter (AMD MI300A APU), and SuperMUC-NG Phase 2 (Intel PVC) supercomputers. Coupled mantle convection simulations at $\sim\!11$ km and $\sim\!5.6$ km radial spacing ($\sim 2.8$ B and $\sim 22$ B DoFs) can be run routinely on standard node partitions of all considered systems. Global $\sim\!1$ km-per-gridpoint mantle convection ($\sim 1.4$ T DoFs) is feasible on an extreme-scale allocation, and a sub-km hero-run at $\sim\!0.7$ km grid spacing scaling up to $\sim 11,000$ GPUs of LUMI-G ($\sim 11$ T DoFs) shows the potential of the code on future, larger machines.

cs.CE↗

AFT Neural Function Approximators for 1D Nonlinear Force Laws

Nonlinear contacts and friction strongly influence the vibration response of assembled structures, but their accurate numerical treatment is computationally demanding. The harmonic balance method is widely used to compute periodic steady-state responses, yet the required alternating frequency-time scheme becomes costly for nonsmooth and hysteretic nonlinearities and must be repeated throughout the nonlinear solution process. Here we show that this procedure can be replaced by neural networks that directly map displacement Fourier coefficients to nonlinear force coefficients and provide the corresponding Jacobian through automatic differentiation. The surrounding solver and continuation algorithms remain unchanged for the computation of frequency response curves. The neural networks exclusively learn individual nonlinear elements rather than complete system responses. Physics-based nondimensionalization and phase normalization facilitate the learning process and enable a single trained network to cover a wide range of parameter combinations. Building on the cubic spring, unilateral spring, and Jenkins elements considered here, the approach points toward a reusable library of nonlinear-element surrogates that can be combined in arbitrary number and location within a mechanical system. By bypassing the iterative force evaluation in time domain, the method offers favorable computational scaling for high-resolution analyses and systems with many nonlinear elements.

cs.CE↗