Higher-order Graph Attention Network for Stock Selection with Joint Analysis

Yang Qiao, Yiping Xia, Xiang Li, Zheng Li, Yan GearXiv 2023 · DOI

Introduction

Predicting stock movements is notoriously difficult due to market volatility and non-stationary data. While Graph Neural Networks (GNNs) have recently gained popularity for modeling stock relationships (e.g., "Company A and Company B are in the same industry"), they suffer from two major limitations. First, most GNNs rely on pairwise simplification, looking only at direct, one-to-one connections. In reality, stocks exist in complex clusters or "motifs"—such as a triangular relationship between a supplier, a buyer, and a competitor—that drive correlated price trends. Second, many models ignore fundamentals, focusing exclusively on Technical Analysis (TA) (price and volume) while overlooking Fundamental Analysis (FA) (earnings, debt, and profitability), which provides the "intrinsic value" signals necessary for long-term forecasting.

Stock price trends often correlate within higher-order motifs, such as the triangular relationship between major tech firms.

The authors propose H-GAT (Higher-order Graph Attention Network) to bridge these gaps by capturing higher-order structures and integrating financial statement data into the learning process.

The H-GAT Framework

The H-GAT architecture consists of three main components designed to fuse sequential data with relational structures:

The H-GAT architecture integrates sequential technical and fundamental data with motif-based relational embeddings.
  1. Sequence Embedding Layer: This layer uses a Long Short-Term Memory (LSTM) network to process time-series data. Crucially, the input vector concatenates TA factors (like 1-day returns and moving averages) with FA factors (like Gross Profit Margin, Earnings Per Share, and Asset-Liability Ratios).
  2. Relation Embedding Layer: This is the core innovation. Instead of a standard adjacency matrix, the authors extract motifs (subgraph patterns involving 3 or more nodes) from industry classifications and Wikidata. They use a "motif adjacency matrix" and a multi-head Graph Attention Network (GAT) to learn how these complex group dynamics influence a stock's potential.
  3. Prediction Layer: The model combines the sequential and relational embeddings to output a ranking score. Rather than predicting an exact price, it uses a joint loss function (Regression + Paired Ranking Loss) to optimize for selecting the stocks with the highest expected returns relative to their peers.

Experimental Setup

The researchers constructed a comprehensive, long-term dataset spanning over a decade (January 2012 to July 2022), covering 328 stocks from the NASDAQ and 455 from the NYSE. Features included daily closing prices and quarterly financial statements collected via XBRL/SEC filings. Relations were derived from GICS sector-industry classifications and Wikidata (e.g., shared board members, ownership). The model analyzed 13 different third-order structures (triangles and directed patterns) to capture market dynamics.

Key Insights

  • Motifs are Predictive Powerhouses: Stocks within a motif show highly synchronized price trends. For example, Google, Microsoft, and Meta are linked via a triangular motif. The authors found that even rare motifs are critical; removing certain structures can cause model performance to drop by over 60%.
  • The "Joint Analysis" Advantage: Price data suggests when to buy, but fundamental data reveals what is worth buying. By including debt risk and profitability metrics, the model captures long-term upside that technical indicators miss.
  • Ranking > Regression: In stock selection, relative order matters more than absolute price. By optimizing for the rank of returns, the model becomes more robust to market-wide fluctuations.

Performance Evaluation

H-GAT was evaluated against seven state-of-the-art baselines using the Internal Rate of Return (IRR) and Sharpe Ratio. H-GAT achieved the highest IRR on both datasets, reaching 0.85 on NASDAQ and 1.01 on NYSE. It also maintained a superior Sharpe Ratio (1.53 on NASDAQ, 1.97 on NYSE), indicating high returns were not achieved through excessive risk-taking. In a 5-year backtest (2017–2022), a strategy picking the top-ranked stock yielded an annualized IRR 9-10 times higher than major market indices like the S&P 500.

Conclusion

While H-GAT demonstrates significant predictive power, real-world application must account for transaction costs and slippage. Future work could incorporate explicit risk control mechanisms for sector diversification and short-selling capabilities to hedge against market downturns.

Summary updated

BibTeX
@misc{qiao2023higher,
  author = {Yang Qiao and Yiping Xia and Xiang Li and Zheng Li and Yan Ge},
  title = {{Higher-order Graph Attention Network for Stock Selection with Joint Analysis}},
  year = {2023},
  eprint = {2306.15526},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.15526},
}
Figure