HETEROGENEOUS GRAPH NEURAL NETWORKS FOR STOCK PRICE PREDICTION: MODELING TEMPORAL AND CROSS-STOCK DEPENDENCIES

Open

Hilmi Aziz Bukhori, Elayaraja Aruchunan, Syaiful Anam, Saiful Bukhori, Avin Maulana

2026 Barekeng Vol. 20 Issue 2 Article Cited by 0 Quartile

Abstract

Stock price prediction remains a challenging task due to the complex interplay of temporal trends and relational dependencies within financial markets. This study proposes the GNN-LSTM Hybrid model, a novel framework that integrates Graph Neural Networks (GNNs) with Long Short-Term Memory (LSTM) units to simultaneously capture heterogeneous graph structures and temporal dynamics in stock data, leveraging GNNs to model relational dependencies and LSTMs to address long-term temporal patterns, with graph construction based on stock correlation and temporal edge features. Using a dataset covering 1,270 trading days from March 2015 to April 2020, we evaluate the model against traditional methods (ARIMA, LSTM) and modern graph-based approaches (T-GCN, GAT, Transformer-TS, Base GraphSAGE, SAGE-IS). The GNN-LSTM Hybrid achieves superior performance, with a Mean Absolute Error (MAE) of 0.740 (±0.13), Root Mean Squared Error (RMSE) of 1.100 (±0.21), Mean Absolute Percentage Error (MAPE) of 4.92% (±1.16), and Directional Accuracy (DA) of 67.0% (±2.7), and significantly outperforms all baselines, as confirmed by paired t-tests (p < 0.05). Hyperparameter analysis reveals that a configuration of 6 GNN layers and a hidden dimension size of 128 optimizes predictive accuracy, balancing computational efficiency (training time: 16.0 ± 0.7 s) and performance. Validation across 100 training epochs further confirms the model’s robust convergence across all metrics. With an inference time of 20.0 ± 1.0 ms, which is competitive compared to baselines like ARIMA (23.5 ± 1.1 ms) and GAT (20.5 ± 1.0 ms), the GNN-LSTM Hybrid demonstrates strong potential for practical financial forecasting, offering a scalable and accurate solution for capturing the multifaceted dynamics of stock markets, with implications for real-time applications and broader economic modeling. © 2026 Author(s) Journal homepage: https://ojs3.unpatti.ac.id/index.php/barekeng/ Journal e-mail: barekeng.math@yahoo.com; barekeng.journal@mail.unpatti.ac.id.

Affiliations

Department of Mathematics, Faculty of Mathematics and Natural Sciences, Universitas Brawijaya, Jln. Veteran, Ketawanggede, Lowokwaru, Malang, 65145, Indonesia; Department of Decision Science, Faculty of Business and Economics, University of Malaya, Lembah Pantai, Kuala Lumpur, 50603, Malaysia; Department of Information Technology, Faculty of Computer Science, Universitas Jember, Jln. Kalimantan Tegalboto No.37, Krajan Timur, Sumbersari, Sumbersari, Jember, 68121, Indonesia