Stock Price Prediction Using a Hybrid Graph
Neural Network and LSTM Architecture
Subham Kumar Das
Odisha University of Technology, Bhubaneswar, India
Dr. Subhadarshini Mohanty
Assistant Professor
Odisha University of Technology and Research, Bhubaneswar, India
March 29, 2026
Abstract. Stock price prediction remains one of the most challenging
problems in financial analytics, owing to the volatile and highly inter-
connected nature of modern financial markets. Conventional machine
learning approaches typically capture either temporal dependencies or
structural relationships among stocks, but rarely both simultaneously.
This paper proposes a hybrid deep learning architecture that integrates
Long Short-Term Memory (LSTM) networks with Graph Neural Net-
works (GNNs) to achieve more robust stock price forecasting. The LSTM
component models temporal dependencies inherent in sequential finan-
cial data, while the GNN component captures inter-stock relationships
by operating over dynamically constructed correlation graphs. Experi-
ments are conducted on historical daily trading data spanning 2015–2024
for three major Indian companies—Reliance Industries, Tata Consul-
tancy Services (TCS), and Infosys. The proposed hybrid model achieves
a prediction accuracy of approximately 84%, outperforming a standalone
LSTM baseline that achieves 75%. These results confirm that incorporat-
ing relational learning via graph structures significantly enhances fore-
casting performance. The framework is scalable and offers promising di-
rections for future research in intelligent financial trading systems.
Keywords: Stock Price Prediction · Graph Neural Networks · Long Short-Term
Memory · Financial Time Series · Deep Learning · Quantitative Finance · Hybrid
Architecture
1 Introduction
Predicting stock market prices has long been a critical research area in quantita-
tive finance and financial analytics. Financial markets exhibit highly nonlinear
behaviour influenced by a multitude of factors, including macroeconomic indica-
tors, global events, investor sentiment, and complex inter-company dependencies.
Traditional statistical approaches such as AutoRegressive Integrated Moving
Average (ARIMA) and linear regression models struggle to capture the intricate
temporal patterns present in stock price movements. Recent advances in deep
learning have demonstrated substantially improved performance in modelling se-
quential data. Long Short-Term Memory (LSTM) networks, in particular, have
proven effective at capturing long-range temporal dependencies in time-series
data, addressing the well-known vanishing gradient problem of conventional re-
current neural networks.
However, stock markets are not purely temporal systems. Individual stocks
frequently exhibit strong co-movements driven by sectoral dependencies, supply-
chain connections, and correlated investor behaviour. Ignoring these relational
structures fundamentally limits the predictive capability of purely sequential
models. Graph Neural Networks (GNNs) offer an effective mechanism for mod-
elling such relational data by representing stocks as nodes in a graph and their
pairwise correlations as weighted edges, enabling the propagation of structural
information across connected entities.
This research proposes a unified hybrid architecture that combines LSTM
and GNN components to simultaneously learn temporal patterns and relational
dependencies among stocks. The remainder of this paper is organised as fol-
lows. Section 2 reviews related work. Section 3 defines the problem statement.
Section 4 identifies the research gap. The proposed architecture is described in
Section 5, its mathematical formulation in Section 6, and the dataset in Sec-
tion 7. Sections 8–10 detail the methodology, experimental setup, and results.
Sections 11 and 12 discuss future directions and conclusions.
2 Literature Review
Stock market prediction has attracted significant research interest in the ma-
chine learning and financial analytics communities. Financial markets generate
massive volumes of time-series data—including stock prices, trading volumes,
and auxiliary market indicators—whose accurate forecasting is challenging due
to the dynamic, noisy, and highly nonlinear nature of market behaviour, which
is governed by economic conditions, company fundamentals, geopolitical events,
and investor sentiment.
2.1 Statistical and Econometric Approaches
Traditional econometric models such as ARIMA, Generalised AutoRegressive
Conditional Heteroskedasticity (GARCH), and linear regression have long been
applied to financial forecasting. ARIMA, in particular, has enjoyed wide adop-
tion due to its strong theoretical foundations and capacity to model temporal
dependencies. However, these approaches assume linear relationships between
variables and therefore fail to capture the complex nonlinear patterns inher-
ent in volatile financial markets, leading to limited predictive performance in
practice [10].
2.2 Deep Learning for Sequential Modelling
With the rapid advancement of deep learning, researchers have increasingly
adopted neural architectures for stock market prediction. Recurrent Neural Net-
works (RNNs), and specifically LSTM networks, have become the dominant
paradigm for financial forecasting owing to their ability to model long-term tem-
poral dependencies in sequential data [1]. Fischer and Krauss [3] conducted a
comprehensive comparative study demonstrating that LSTM networks outper-
form several traditional machine learning and econometric models in stock return
prediction, highlighting the capacity of deep architectures to uncover complex
patterns that conventional models cannot identify.
Hybrid architectures combining Convolutional Neural Networks (CNNs) with
LSTM networks have also been explored. CNN layers extract local spatial fea-
tures and meaningful patterns from structured financial indicators, after which
the extracted representations are passed to LSTM layers for sequential mod-
elling. This CNN-LSTM approach has demonstrated promising results in simul-
taneously capturing spatial and temporal characteristics of financial data [12].
2.3 Graph-Based Relational Modelling
Researchers have increasingly recognised that inter-stock relationships play a
critical role in market dynamics. Stocks influence one another through sectoral
dependencies, supply-chain linkages, and macroeconomic factors—structures that
traditional time-series models, which treat each stock in isolation, fundamentally
overlook. GNNs have emerged as a powerful tool for modelling such relational
data by representing financial markets as graphs in which nodes correspond to in-
dividual stocks and edges encode pairwise relationships [2,5]. Through message-
passing and graph convolution operations, GNNs can capture cross-stock in-
teraction patterns and propagate information across correlated entities. Studies
have shown that incorporating stock correlation graphs into predictive models
significantly improves forecasting performance [7, 13, 14]. More recent work has
further integrated temporal attention mechanisms within GNN frameworks to
exploit both structural and sequential information [14].
2.4 Summary
Despite these advances, the majority of existing approaches focus on either tem-
poral learning or relational learning in isolation. LSTM- based models effectively
capture sequential patterns but overlook inter-stock relationships, while GNN-
based models capture relational dependencies but may not adequately exploit
the temporal dynamics of financial time series. This motivates the development
of a unified architecture that integrates both modelling paradigms, as proposed
in the present work.
3 Problem Statement
Stock price movements are jointly influenced by temporal patterns within indi-
vidual price sequences and by structural relationships across different companies
and economic sectors. Existing prediction models generally fail to capture both
dimensions simultaneously, resulting in suboptimal forecasting performance. The
primary challenge addressed in this research is the development of a prediction
framework capable of jointly learning:
1. Temporal dependencies in individual stock price sequences.
2. Structural relationships among multiple stocks.
3. Nonlinear interactions between financial indicators.
4 Research Gap
Although LSTM models are highly effective at capturing sequential dependencies
in time-series data, they primarily learn temporal patterns from the historical
price movements of individual stocks treated independently. Financial markets,
however, constitute highly interconnected systems in which the movement of one
stock can materially influence others. Industry sectors, supply-chain dependen-
cies, macroeconomic conditions, and investor sentiment create complex relational
structures among stocks that purely sequential models cannot represent.
Conversely, GNN-based models excel at modelling structured relationships
among entities and have been applied to represent stocks as nodes connected
by correlation- or sector-based edges. Through graph convolution and message-
passing, these models capture interaction patterns among stocks. However, most
graph-based approaches focus on static or structural relationships and lack strong
mechanisms for modelling the temporal evolution of stock prices over time [5].
Both approaches therefore exhibit inherent limitations when applied in isola-
tion: LSTM models overlook inter-stock relational dependencies, whereas graph-
based models may not adequately capture sequential price dynamics. Current
research lacks unified frameworks that simultaneously learn:
– Dynamic market relationships.
– Sequential financial patterns.
– Multi-stock interaction effects.
The proposed hybrid model directly addresses this gap by integrating LSTM
networks with GNN architectures within a unified learning framework. LSTM
layers learn temporal dependencies from historical stock price sequences, while
GNN layers model relational dependencies through correlation-based graph struc-
tures. By combining the strengths of both paradigms, the model learns richer
representations of financial market dynamics, yielding improved prediction ac-
curacy and deeper insight into complex market interactions.
5 Proposed Hybrid Architecture
Fig. 1. Proposed Hybrid LSTM–GNN architecture for stock price prediction. The
model combines temporal embeddings produced by the LSTM component with re-
lational embeddings produced by the Graph Neural Network component via a fusion
layer prior to final prediction.
The proposed framework, illustrated in Fig. 1, consists of four principal compo-
nents.
5.1 Temporal Learning Module
The LSTM module processes sequential stock price data by operating on sliding-
window input sequences of fixed length. It produces a temporal embedding
HLSTM that encodes the historical dynamics of each stock.
5.2 Graph Learning Module
A correlation graph is constructed in which each node represents an individual
stock and each edge encodes the pairwise Pearson correlation between the corre-
sponding price sequences. The GNN operates on this graph to learn a relational
embedding HGNN that captures structural dependencies among stocks.
5.3 Fusion Layer
The temporal embedding HLSTM and the relational embedding HGNN are con-
catenated and passed through a series of fully connected dense layers, producing
a unified joint representation Z.
5.4 Prediction Layer
A final fully connected output layer maps the joint representation Z to the
predicted next-day closing price.
6 Mathematical Formulation
6.1 LSTM Gating Equations
The LSTM unit at time step t is governed by the following gate equations. The
forget gate ft determines what information to discard from the cell state:
ft = σ(Wf [ht−1 , xt ] + bf ) , (1)
where σ(·) is the sigmoid activation function, Wf is the weight matrix, ht−1 is
the previous hidden state, xt is the current input, and bf is the bias vector. The
input gate it controls what new information is stored:
it = σ(Wi [ht−1 , xt ] + bi ) . (2)
The cell state Ct is updated as:
Ct = ft ⊙ Ct−1 + it ⊙ C̃t , (3)
where ⊙ denotes element-wise multiplication and C̃t is the candidate cell state.
6.2 Graph Convolution
The GNN layer performs graph convolution to aggregate neighbourhood infor-
mation. The (l+1)-th layer representation is computed as:
H (l+1) = σ Â H (l) W (l) , (4)
where  denotes the symmetrically normalised adjacency matrix (incorporating
self-loops), H (l) is the node feature matrix at layer l, W (l) is the learnable weight
matrix at layer l, and σ(·) is a non-linear activation function.
6.3 Fusion Layer
The outputs of the LSTM and GNN modules are concatenated to form the joint
representation:
Z = [HLSTM ∥ HGNN ] , (5)
where ∥ denotes vector concatenation.
6.4 Loss Function
The model is trained by minimising the Mean Squared Error (MSE) loss over N
training samples:
N
1 X 2
L= (yi − ŷi ) , (6)
N i=1
where yi and ŷi denote the true and predicted stock prices, respectively.
7 Dataset Description
Historical daily stock price data were collected via the Yahoo Finance API for
three major Indian companies: Reliance Industries, Tata Consultancy Services
(TCS), and Infosys. The dataset spans the period from 2015 to 2024, yielding
approximately 2,300 trading-day records per stock, as summarised in Table 1.
Table 1. Dataset statistics for the three selected stocks.
Stock Period Records
Reliance Industries 2015–2024 2,300
TCS 2015–2024 2,300
Infosys 2015–2024 2,300
The feature set employed for each trading day comprises: open price, high
price, low price, close price, and trading volume. Data preprocessing involved
MinMax normalisation to scale all features to the range [0, 1], followed by the
generation of 60-day sliding window sequences to serve as model inputs.
8 Methodology
The proposed methodology is structured as a multi-stage pipeline that system-
atically processes financial data through the following stages.
Stage 1: Data Collection. Historical daily financial data—including open, high,
low, and close prices as well as trading volume—are collected from reliable fi-
nancial data providers. Additional market indices may be incorporated to enrich
the dataset and provide broader macroeconomic context.
Stage 2: Data Preprocessing. Raw financial data frequently contain noise, miss-
ing values, and temporal inconsistencies. Preprocessing steps include imputation
of missing values, removal of outliers, MinMax normalisation of numerical fea-
tures, and temporal alignment of multi-stock time series. This stage ensures that
the training data are consistent and conducive to effective deep learning.
Stage 3: Feature Engineering. Informative technical indicators are derived from
the raw price data, including Moving Averages (MA), the Relative Strength In-
dex (RSI), Moving Average Convergence Divergence (MACD), and price volatil-
ity measures. These engineered features encode latent market dynamics and im-
prove the model’s capacity to learn meaningful predictive signals.
Stage 4: Graph Construction. A correlation graph is constructed over the stock
universe. Each stock is represented as a graph node, and an edge is drawn be-
tween two nodes if the Pearson correlation between their price sequences exceeds
a predefined threshold. Edge weights may reflect correlation magnitude, industry
sector affiliation, or trading dependencies, enabling the GNN to exploit diverse
inter-stock relationships.
Stage 5: Model Training. The hybrid LSTM–GNN model is trained end-to-end
using the preprocessed time-series data and the constructed graph. The LSTM
component learns temporal dependencies from sequential price windows, while
the GNN component propagates relational information across the correlation
graph. The data are split into 80% for training and 20% for testing, and the
model is optimised using the Adam optimiser [8] with a learning rate of 0.001
over 100 epochs with a batch size of 32.
Stage 6: Performance Evaluation. Model performance is assessed using standard
regression metrics including Mean Squared Error (MSE), Root Mean Squared
Error (RMSE), Mean Absolute Error (MAE), and overall prediction accuracy.
Results are compared against baseline models, specifically a standalone LSTM
and an ARIMA model, to quantify the benefit of relational learning.
Fig. 2. End-to-end training pipeline of the proposed hybrid model, illustrating the data
flow from raw stock market data through preprocessing, graph construction, model
training (80%/20% train-test split), and final prediction generation evaluated by MSE,
RMSE, and MAE.
9 Experimental Setup
The proposed model was implemented in Python using the TensorFlow and
PyTorch deep learning frameworks. The key hyperparameters adopted during
training are listed in Table 2.
Table 2. Hyperparameter configuration for the hybrid LSTM–GNN model.
Parameter Value
LSTM hidden units 128
GNN layers 2
Batch size 32
Training epochs 100
Optimiser Adam
Learning rate 0.001
The dataset was partitioned using a chronological 80/20 train-test split to
preserve the temporal ordering of financial observations and prevent data leak-
age. All models were evaluated under identical experimental conditions to ensure
a fair comparison.
10 Results and Discussion
Fig. 3. Receiver Operating Characteristic (ROC) curve for the proposed hybrid LSTM–
GNN model, yielding an Area Under the Curve (AUC) of 0.84, which corresponds to
a prediction accuracy of approximately 84%.
The classification performance of the proposed hybrid model is evaluated through
the ROC curve presented in Fig. 3. The model achieves an AUC of 0.84, in-
dicative of strong discriminative capability. A quantitative comparison with the
standalone LSTM baseline is provided in Table 3.
Table 3. Prediction accuracy comparison between the baseline LSTM and the proposed
Hybrid LSTM–GNN model.
Model Accuracy (%)
LSTM (Baseline) 75
Hybrid LSTM–GNN 84
The hybrid model achieves a 9 percentage-point improvement in accuracy
over the standalone LSTM baseline. This performance gain is attributable to
the GNN component’s ability to capture cross-stock relational dependencies that
purely sequential models overlook. By jointly modelling temporal dynamics and
structural inter-stock relationships, the hybrid architecture produces richer rep-
resentations of financial market behaviour, leading to more accurate and reliable
price predictions. These results validate the central hypothesis of this research:
that incorporating relational graph learning significantly enhances financial fore-
casting performance beyond what temporal modelling alone can achieve.
11 Future Work
Several promising directions remain for extending this research. First, Dynamic
Graph Neural Networks could be adopted to allow the graph topology to evolve
over time, better reflecting the non-stationary nature of inter-stock relation-
ships. Second, Graph Attention Networks (GATs) could be incorporated to as-
sign learnable importance weights to individual edges, enabling the model to
focus adaptively on the most informative relational signals. Third, the integra-
tion of financial news sentiment analysis—derived from natural language pro-
cessing of news feeds and social media—could enrich the feature set and provide
the model with forward-looking signals beyond historical price data. Fourth,
extending the framework to multi-market prediction scenarios would assess its
generalisability across different exchanges and asset classes. Finally, the incor-
poration of Reinforcement Learning-based trading strategy optimisation would
provide a natural downstream application for the forecasting model, enabling
end-to-end intelligent trading systems.
12 Conclusion
This paper has introduced a hybrid deep learning framework that integrates
Long Short-Term Memory networks with Graph Neural Networks for stock price
prediction. The LSTM component captures temporal dependencies within in-
dividual stock price sequences, while the GNN component models structural
inter-stock relationships through dynamically constructed correlation graphs. A
fusion layer combines both sets of learned embeddings to produce a unified rep-
resentation that is passed to a prediction head.
Experimental evaluation on daily historical data for three major Indian companies—
Reliance Industries, TCS, and Infosys—over the period 2015–2024 demonstrates
that the proposed hybrid model achieves a prediction accuracy of approxi-
mately 84%, representing a 9 percentage-point improvement over a standalone
LSTM baseline (75%). These results confirm that incorporating relational learn-
ing through graph-based representations significantly enhances forecasting accu-
racy. The proposed architecture constitutes a scalable and principled framework
for financial time-series prediction, with direct applicability to intelligent trading
systems and portfolio management platforms.
References
1. Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Computation
9(8), 1735–1780 (1997)
2. Kipf, T.N., Welling, M.: Semi-supervised classification with graph convolutional
networks. In: Proceedings of the International Conference on Learning Represen-
tations (ICLR) (2017)
3. Fischer, T., Krauss, C.: Deep learning with long short-term memory networks for
financial market predictions. European Journal of Operational Research 270(2),
654–669 (2018)
4. Kim, Y.: Convolutional neural networks for sentence classification. In: Proceedings
of the 2014 Conference on Empirical Methods in Natural Language Processing
(EMNLP), pp. 1746–1751 (2014)
5. Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., Yu, P.S.: A comprehensive study
on graph neural networks. IEEE Transactions on Neural Networks and Learning
Systems 32(1), 4–24 (2021)
6. Zhang, J.: Deep learning for financial prediction. IEEE Access 9, 1–15 (2021)
7. Wang, X., et al.: Graph neural networks in finance. In: Proceedings of the KDD
Workshop on Mining and Learning from Time Series (2022)
8. Vaswani, A., et al.: Attention is all you need. In: Advances in Neural Information
Processing Systems (NeurIPS), vol. 30 (2017)
9. Hamilton, W.L.: Graph Representation Learning. Morgan & Claypool Publishers,
San Rafael, CA (2020)
10. Tsay, R.S.: Analysis of Financial Time Series, 3rd edn. Wiley, Hoboken, NJ (2013)
11. Bao, H., Yue, N., Rao, Y.: A deep learning framework for financial time series
using stacked autoencoders and LSTM. PLOS ONE 12(7), e0180944 (2017)
12. Bao, W., Yue, J., Rao, Y.: A deep learning framework for financial time series
prediction using stacked autoencoders and LSTM. IEEE Access 6, 23205–23212
(2018)
13. Feng, Z., Yu, J., Zhang, M.: Graph neural networks for stock movement prediction
using financial news and market data. In: Proceedings of the AAAI Conference on
Artificial Intelligence (2019)
14. Chen, Y., Liu, Z., Zhang, H.: Stock movement prediction using graph neural net-
works with temporal attention. IEEE Transactions on Knowledge and Data Engi-
neering (2021). [Link]
15. Sawhney, S., Agarwal, A., Singh, R.: Deep learning for stock price prediction using
LSTM and attention mechanism. IEEE Access 9, 151281–151292 (2021)