Hermes: A Multi-Scale Spatial-Temporal Hypergraph Network for Stock Time Series Forecasting

Xiangfei Qiu, Liu Yang, Xiangyu Xu, Hanyin Cheng, Xingjian Wu, Rongjia Wu, Zhigang Zhang, Ding Tu, Chenjuan Guo, Bin Yang, Christian S. Jensen, Jilin Hu

TL;DR

Hermes is a novel spatial-temporal hypergraph network framework designed to significantly improve stock time series forecasting. By explicitly modeling complex, time-delayed (lead-lag) relationships between different industries and adaptively fusing multi-scale market dynamics, Hermes achieves state-of-the-art prediction accuracy and investment returns while maintaining a highly efficient computational footprint.

What Problem Does This Paper Address?

Predicting stock prices is notoriously challenging due to the chaotic nature of financial markets. While stocks within the same industry naturally influence one another, existing forecasting methods struggle to capture the full picture of market interdependencies.

The authors identify two major limitations in current hypergraph-based stock forecasting models:

  1. Inter-industry lead-lag interactions: Economic ripples don't happen instantaneously. A breakthrough in the technology sector might drive efficiency and stock growth in the energy sector weeks or months later. Current models fail to capture these time-delayed dependencies between different industries.
  2. Multi-scale information blind spots: Financial markets exhibit different patterns depending on the time horizon. A coarse-grained view might show a long-term upward macro trend shared by two industries, while a fine-grained view reveals they are moving in opposite directions cyclically. Single-scale models miss these overlapping dynamics.

Methods

The authors introduce Hermes, a framework that embeds moving aggregation and multi-scale fusion modules directly into a spatial-temporal hypergraph network.

The architecture consists of several key stages:

  • Multi-Scale Feature Extraction: Raw stock data is down-sampled into multiple temporal granularities using 1D convolutional layers of varying sizes. A "Causal-Mixing" Multi-Layer Perceptron (MLP) technique is then applied to ensure the model only looks at past data, preserving temporal causality.
  • Adaptive Hypergraph Construction: Stocks are mapped as nodes, and industries are represented as hyperedges (which can connect multiple nodes simultaneously). Learnable weights allow the network to dynamically adjust how strongly a stock belongs to an industry based on current market conditions.
  • Hyperedge-based Moving Aggregation: To capture lead-lag effects, Hermes applies a fixed-size sliding window across industry hyperedges, utilizing dynamic temporal aggregation to model how changes in a "leading" industry impact a "lagging" one over time.
  • Hyperedge-based Multi-scale Fusion: Using metric learning (specifically a learnable Mahalanobis distance) and cross-scale, edge-to-edge message passing, Hermes unifies the information extracted from different granularities without losing the distinct consistency of each scale.
Figure 2: The architecture of Hermes.

Datasets

The framework was evaluated using three real-world datasets from the US stock market, containing daily End-of-Day (EOD) data and predefined stock-to-industry relationships:

  • NASDAQ: 1,026 stocks across 113 industries (characterized by higher volatility).
  • NYSE: 1,737 stocks across 130 industries (characterized by higher stability).
  • S&P500: 474 stocks across 11 industries.

Each stock dataset includes 5 primary technical indicators: opening price, closing price, highest price, lowest price, and trading volume.

Key Insights and Ideas

  • Hyperedges over Standard Graphs: Standard graphs only model pairwise relationships (Stock A to Stock B). Hypergraphs allow an arbitrary number of stocks to be grouped into a single industry hyperedge, making them fundamentally better suited for capturing higher-order market structures.
  • The Power of Lead-Lag Modeling: Explicitly separating the "leading" and "lagging" parts of a temporal patch prevents the model from treating market reactions as instantaneous, mirroring real-world economic propagation.
  • Scale Consistency: Instead of simply concatenating multi-scale data (which can introduce conflicting noise), Hermes uses edge-to-edge message passing to let different time horizons inform each other while keeping their individual structural properties intact.
  • Efficiency via MLPs: While many modern time-series models rely heavily on computationally expensive Transformers, Hermes strategically utilizes efficient MLP structures for temporal mixing, drastically reducing runtime and memory overhead.

Key Results

Hermes was benchmarked against 14 baseline methods spanning Recurrent Neural Networks (RNNs), Graph Neural Networks (GNNs), MLPs, Transformers, and other Hypergraph Neural Networks (HGNNs). Performance was measured using the Information Coefficient (IC), Information Ratio (ICIR), and Sharpe Ratio (SR).

  • Superior Investment Returns: Hermes consistently achieved State-of-the-Art (SOTA) performance. On the NASDAQ dataset, Hermes achieved a Sharpe Ratio of 2.161, vastly outperforming the next-best hypergraph model, STHAN-SR (1.416). On the S&P500, it achieved an SR of 2.247.
  • Drastic Efficiency Gains: Despite its architectural complexity, Hermes proved to be highly lightweight. On the NASDAQ dataset, Hermes required just 0.98 GB of memory and 42 ms of inference time per batch, compared to the baseline model ESTIMATE, which consumed 9.62 GB of memory and took 163 ms.
Table 1: Comparison results on public stock market datasets (measured by t-test with p-value < 0.01). The methods for comparison are mainly divided into five types: HGNN (HyperGraph Neural Network), Transformer, MLP (Multi-Layer Perceptron), GNN (Graph Neural Network), and RNN (Recurrent Neural Network). Bold indicates the best (SOTA) results.

Limitations and Future Work

  • Reliance on Predefined Industries: Hermes relies on static, predefined industry classifications to construct its initial hyperedges. This means it may fail to capture rapidly evolving or latent corporate relationships that cross traditional industry boundaries.
  • Scalability Bottlenecks: Although Hermes is significantly faster and lighter than existing hypergraph models, scaling it to massive global markets containing tens of thousands of assets with dense, real-time inter-industry interactions remains an open challenge.

Summary updated

BibTeX
@misc{qiu2025hermes,
  author = {Xiangfei Qiu and Liu Yang and Xiangyu Xu and Hanyin Cheng and Xingjian Wu and Rongjia Wu and Zhigang Zhang and Ding Tu and Chenjuan Guo and Bin Yang and Christian S. Jensen and Jilin Hu},
  title = {{Hermes: A Multi-Scale Spatial-Temporal Hypergraph Network for Stock Time Series Forecasting}},
  year = {2025},
  eprint = {2509.23668},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.23668},
}
Figure