COGRASP: Multi‑Scale Stock Price Prediction Using Co‑Occurrence Graphs

This article reviews the COGRASP method, which builds dynamic co‑occurrence graphs from online sources, embeds them with graph neural networks, extracts short, medium, and long‑term patterns via attention‑based LSTMs, and aggregates these signals to achieve state‑of‑the‑art stock price prediction performance on real‑world CSI‑300 data.

Bighead's Algorithm Notes
Bighead's Algorithm Notes
Bighead's Algorithm Notes
COGRASP: Multi‑Scale Stock Price Prediction Using Co‑Occurrence Graphs

Background Stock price prediction is a challenging problem; traditional time‑series models focus only on a single stock’s history, while modern approaches incorporate relationships among stocks. Existing graph‑based methods rely on static, predefined structures that cannot fully capture the multifaceted and dynamic nature of stock interactions.

Problem definition The task is reformulated as predicting relative price changes. Given a set of stocks S={s_1,…,s_n}, their historical feature vectors X_t^{s_i}, and a graph G=(S,E,W) where E denotes stock relationships and W their weights, a look‑back window T is used to predict the relative change Y_{t_0+1}^S for all stocks at the next trading day.

Method overview COGRASP consists of three modules: a multi‑relation mining module, a multi‑scale mining module, and an aggregation module.

3.1 Multi‑relation mining Instead of using fixed concept‑based graphs, COGRASP constructs a co‑occurrence graph from reports, news, and social‑media posts. An edge is created when two stocks are mentioned together; its weight equals the co‑mention frequency on the platform. This approach captures cross‑concept relations, reflects retail attention, distinguishes relationship strength, and allows flexible update frequencies. The graph is fed into a Graph Convolutional Network (GCN) built with a Chebyshev spectral operator and ReLU activation, producing node embeddings that are concatenated with raw time features for downstream processing.

3.2 Multi‑scale mining To capture dynamics at different horizons, three attention‑based LSTM (ALSTM) units are instantiated for short, medium, and long terms. From the original sequence X_{t_0‑T,…,t_0}^S, three subsequences X_{t_0‑s,…,t_0}^S, X_{t_0‑m,…,t_0}^S, and X_{t_0‑l,…,t_0}^S are generated (where s,m,l denote short, medium, long windows). Each ALSTM processes its subsequence, yields hidden states H, and applies an attention mechanism to compute weighted representations.

The medium‑ and long‑term units follow the same computation.

3.3 Aggregation module The three ALSTM outputs are combined by learnable weights w_s, w_m, w_l (constrained to sum to 1). The final prediction is a weighted sum of the three scale‑specific representations.

4.1 Experimental setup Datasets: CSI‑300 (top 300 A‑share stocks) and Xueqiu posts (over 300,000 posts from Oct 2023 to Feb 2024) to build the co‑occurrence graph. Stock features include open, close, high, low, volume, turnover, amplitude, price change percentage, etc., sourced from the open‑source AKShare repository. Training/validation use data from Jan 2015 to Feb 2024; testing covers Mar 2024 to Jun 2024.

Baselines: MLP, XGBoost, LSTM, ALSTM, Transformer, HIST (predefined concept graph), STGCN (GCN‑based spatio‑temporal model), SFM (frequency‑aware LSTM), StockMixer (time‑mixing mechanism), MDGNN (dynamic graph + Transformer, results taken from the original paper). Evaluation metrics: IC, RankIC, ICIR, RankICIR.

4.2 Results – Performance comparison COGRASP consistently outperforms all baselines on every metric. SFM beats LSTM, ALSTM, and Transformer by leveraging multi‑frequency information, confirming the benefit of modeling diverse temporal patterns. HIST and STGCN suffer from static or predefined graph structures, leading to inferior performance. MDGNN, lacking a multi‑scale component, also underperforms. These findings validate the effectiveness of jointly mining multi‑relation and multi‑scale information.

Ablation study Five variants are evaluated: (w.) single ALSTM only; (w.T) only multi‑scale module; (w.R) multi‑relation + single ALSTM; (w.TA) multi‑scale + aggregation; (w.RT) multi‑relation + multi‑scale. Performance improves monotonically as components are added, confirming the positive contribution of each module.

Network analysis The co‑occurrence graph is compared with a traditional industry‑sector graph and a correlation graph. Compared with the sector graph, the co‑occurrence graph captures richer cross‑concept relations; it is less densely connected than the correlation graph, avoiding over‑connectivity. Higher closeness centrality indicates a more comprehensive capture of market relationships. Applying STGCN and COGRASP on each graph shows that the co‑occurrence graph yields the best results across all models and metrics.

Case study – Shanghai Airport The top ten stocks most frequently co‑mentioned with Shanghai Airport in the graph include a duty‑free retailer (linked via rental income), three major airlines (major customers), another airport (same industry), railway construction firms, a port operator, a power company, and a hotel chain. These connections illustrate how the co‑occurrence graph captures heterogeneous relationships that are difficult to represent with single‑concept graphs, supporting the claim that such a graph can improve prediction accuracy.

graph neural networkfinancial AIstock predictionMulti-ScaleALSTMco-occurrence graph
Bighead's Algorithm Notes
Written by

Bighead's Algorithm Notes

Focused on AI applications in the fintech sector

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.