0% found this document useful (0 votes)
7 views8 pages

Springer

This paper presents a hybrid deep learning architecture that combines Long Short-Term Memory (LSTM) networks with Graph Neural Networks (GNNs) for stock price prediction, achieving approximately 84% accuracy. The model effectively captures both temporal dependencies in stock price sequences and relational dependencies among stocks through dynamically constructed correlation graphs. Experiments demonstrate that this hybrid approach outperforms traditional LSTM models, confirming the importance of integrating relational graph learning in financial forecasting.

Uploaded by

subhamkumard21
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views8 pages

Springer

This paper presents a hybrid deep learning architecture that combines Long Short-Term Memory (LSTM) networks with Graph Neural Networks (GNNs) for stock price prediction, achieving approximately 84% accuracy. The model effectively captures both temporal dependencies in stock price sequences and relational dependencies among stocks through dynamically constructed correlation graphs. Experiments demonstrate that this hybrid approach outperforms traditional LSTM models, confirming the importance of integrating relational graph learning in financial forecasting.

Uploaded by

subhamkumard21
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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 is a challenging problem in financial


analytics owing to the volatile and interconnected nature of modern mar-
kets. Conventional approaches typically capture either temporal depen-
dencies or structural relationships among stocks, but rarely both. This
paper proposes a hybrid deep learning architecture integrating Long
Short-Term Memory (LSTM) networks with Graph Neural Networks
(GNNs). The LSTM component models temporal dependencies in se-
quential financial data, while the GNN captures inter-stock relationships
via dynamically constructed correlation graphs. Experiments on 2015–
2024 daily trading data for Reliance Industries, TCS, and Infosys show
that the hybrid model achieves approximately 84% prediction accuracy,
outperforming a standalone LSTM baseline (75%), confirming that rela-
tional graph learning significantly enhances forecasting performance.

Keywords: Stock Price Prediction · Graph Neural Networks · Long Short-Term


Memory · Financial Time Series · Deep Learning

1 Introduction
Predicting stock prices is a critical research area in quantitative finance. Finan-
cial markets exhibit highly nonlinear behaviour influenced by macroeconomic
indicators, global events, investor sentiment, and complex inter-company depen-
dencies. Traditional approaches such as ARIMA and linear regression struggle
to capture intricate temporal patterns in stock prices. LSTM networks have
proven effective at modelling long-range temporal dependencies, addressing the
vanishing gradient problem of conventional RNNs.
However, stock markets are not purely temporal systems. Individual stocks
frequently exhibit co-movements driven by sectoral dependencies and correlated
investor behaviour. GNNs offer an effective mechanism for modelling such rela-
tional data by representing stocks as nodes in a graph and their pairwise corre-
lations as weighted edges. This research proposes a unified hybrid architecture
that combines LSTM and GNN components to simultaneously learn temporal
patterns and relational dependencies among stocks.

2 Literature Review

Statistical approaches. ARIMA, GARCH, and linear regression have long


been applied to financial forecasting. While theoretically grounded, these meth-
ods assume linear relationships and therefore struggle with the nonlinear dy-
namics of volatile markets [7].
Deep learning for sequential modelling. LSTM networks have become
the dominant paradigm for financial forecasting owing to their capacity to model
long-term temporal dependencies [1]. Fischer and Krauss [3] demonstrated that
LSTMs outperform traditional models in stock-return prediction. Hybrid CNN–
LSTM architectures have also shown promise by extracting spatial features be-
fore sequential modelling [8].
Graph-based relational modelling. GNNs have emerged as a powerful
tool for representing financial markets as graphs, with stocks as nodes and pair-
wise relationships as edges [2, 4]. Studies show that incorporating stock correla-
tion graphs significantly improves forecasting performance [5,9,10]. Despite these
advances, most approaches address temporal or relational learning in isolation,
motivating the unified architecture proposed here.

3 Problem Statement

Stock price movements are jointly governed by two distinct but intertwined di-
mensions: the temporal dynamics embedded within individual price sequences,
and the structural relationships that exist across companies and economic sec-
tors. Conventional prediction models generally address only one of these dimen-
sions, resulting in representations that are either temporally rich but relationally
blind, or structurally expressive but temporally shallow.
Formally, given a universe of N stocks observed over T trading days, the
objective is to predict the next-day closing price ŷi,t+1 for each stock i using
its historical price sequence {xi,1 , xi,2 , . . . , xi,t } as well as the price sequences of
all other stocks {xj,τ }j̸=i that are structurally correlated with stock i. The core
challenge is to develop a unified learning framework capable of jointly capturing:

1. Temporal dependencies in individual stock price sequences, including


trend, seasonality, and momentum effects encoded over historical windows.
2. Structural inter-stock relationships arising from sectoral affiliations,
supply-chain linkages, shared macroeconomic sensitivities, and correlated
investor behaviour.
3. Nonlinear interactions among financial indicators such that complex com-
pounding effects between features are captured beyond what linear models
can represent.
Addressing this problem requires an architecture that is capable of represent-
ing both the sequential nature of financial time series and the graph-structured
nature of market relationships within a single end-to-end trainable framework.

4 Research Gap

Although LSTM models are highly effective at capturing sequential dependen-


cies in time-series data, they fundamentally treat each stock as an independent
entity. In practice, financial markets constitute deeply interconnected systems:
the movement of one stock routinely influences others through industry-level co-
movements, shared exposure to macroeconomic shocks, supply-chain dependen-
cies, and common investor sentiment. Purely sequential models such as LSTMs
are structurally incapable of representing these relational dynamics, since they
process each stock’s price history in isolation without any mechanism to propa-
gate information across correlated entities.
On the other hand, GNN-based approaches model structural dependencies
among stocks effectively by representing the market as a graph and applying
message-passing operations to propagate cross-stock information. However, most
graph-based financial models rely on static or slowly-evolving graph structures
and lack dedicated mechanisms for modelling the fine-grained temporal evolution
of individual stock prices over time [4]. As a result, GNN-only approaches may
capture which stocks are related, but fail to fully exploit how their price dynamics
evolve and interact over sequential time steps.
A survey of current literature reveals that unified frameworks capable of
simultaneously addressing the following requirements remain scarce:

– Dynamic market relationships: graph topology that reflects the non-


stationary, time-varying nature of inter-stock correlations rather than fixed
historical averages.
– Sequential financial pattern modelling: explicit learning of trend, mo-
mentum, and volatility patterns from ordered historical price sequences.
– Multi-stock interaction effects: propagation of predictive signals across
correlated stocks so that the model benefits from market-wide context when
forecasting any individual stock.

The proposed hybrid model directly addresses this gap by integrating LSTM
networks with GNN architectures within a unified, end-to-end trainable frame-
work. LSTM layers learn temporal dependencies from historical stock price se-
quences, while GNN layers model relational dependencies through correlation-
based graph structures. By combining the complementary strengths of both
paradigms, the model learns richer representations of financial market dynamics,
yielding improved prediction accuracy and deeper insight into complex market
interactions.
5 Proposed Hybrid Architecture

Fig. 1. Proposed Hybrid LSTM–GNN architecture. Temporal embeddings from the


LSTM and relational embeddings from the GNN are combined via a fusion layer prior
to final prediction.
The framework (Fig. 1) consists of four components: (i) a Temporal Learning
Module in which the LSTM processes sliding-window sequences to produce a
temporal embedding HLSTM ; (ii) a Graph Learning Module that constructs a
Pearson correlation graph over stocks and applies graph convolution to produce
a relational embedding HGNN ; (iii) a Fusion Layer that concatenates both
embeddings into a joint representation Z; and (iv) a Prediction Layer (fully
connected) that maps Z to the predicted next-day closing price.

6 Mathematical Formulation
6.1 LSTM Gating Equations
The forget gate, input gate, and cell-state update at time step t are:

ft = σ(Wf [ht−1 , xt ] + bf ) , it = σ(Wi [ht−1 , xt ] + bi ) , (1)

Ct = ft ⊙ Ct−1 + it ⊙ C̃t , (2)


where σ(·) is sigmoid, ⊙ is element-wise multiplication, and C̃t is the candidate
cell state.

6.2 Graph Convolution


The (l+1)-th layer GNN representation is:
 
H (l+1) = σ Â H (l) W (l) , (3)

where  is the symmetrically normalised adjacency matrix (with self-loops), H (l)


is the node feature matrix at layer l, and W (l) is the learnable weight matrix.

6.3 Fusion and Loss


Embeddings are fused as Z = [HLSTM ∥ HGNN ], and the model minimises the
MSE loss:
N
1 X 2
L= (yi − ŷi ) , (4)
N i=1
where yi and ŷi are the true and predicted prices.

7 Dataset and Methodology


Dataset. Historical daily stock price data were collected via the Yahoo Finance
API for Reliance Industries, TCS, and Infosys over 2015–2024 (≈2,300 trading-
day records per stock; Table 1). Features include open, high, low, close prices,
and trading volume. Data were MinMax-normalised to [0, 1] and partitioned into
60-day sliding-window sequences.
Table 1. Dataset statistics.

Stock Period Records


Reliance Industries 2015–2024 2,300
TCS 2015–2024 2,300
Infosys 2015–2024 2,300

Pipeline. The end-to-end methodology follows six stages: (1) data collec-
tion from financial data providers; (2) preprocessing (missing-value imputation,
outlier removal, normalisation); (3) feature engineering (Moving Averages, RSI,
MACD, volatility); (4) correlation-graph construction with Pearson-threshold
edges; (5) end-to-end model training (80/20 chronological split, Adam opti-
miser [6], learning rate 0.001, 100 epochs, batch size 32); and (6) evaluation
via MSE, RMSE, MAE, and accuracy against LSTM and ARIMA baselines
(Fig. 2).

Fig. 2. End-to-end training pipeline of the proposed hybrid model.

8 Experimental Setup

The model was implemented in Python using TensorFlow and PyTorch. Ta-
ble 2 lists the hyperparameter configuration. An 80/20 chronological train-test
split preserved temporal ordering and prevented data leakage; all baselines were
evaluated under identical conditions.
Table 2. Hyperparameter configuration.

Parameter Value
LSTM hidden units 128
GNN layers 2
Batch size 32
Training epochs 100
Optimiser Adam
Learning rate 0.001

9 Results and Discussion

Fig. 3. ROC curve for the hybrid LSTM–GNN model (AUC = 0.84).

The hybrid model achieves an AUC of 0.84 (Fig. 3), corresponding to ≈84% pre-
diction accuracy—a 9 percentage-point improvement over the 75% standalone
LSTM baseline (Table 3). This gain is attributable to the GNN component cap-
turing cross-stock relational dependencies that purely sequential models over-
look, producing richer representations of financial market dynamics and validat-
ing the core hypothesis of this work.

10 Conclusion and Future Work


This paper introduced a hybrid LSTM–GNN framework for stock price predic-
tion that jointly models temporal dependencies and inter-stock relational struc-
ture. Evaluated on Reliance Industries, TCS, and Infosys data (2015–2024), the
Table 3. Prediction accuracy comparison.

Model Accuracy (%)


LSTM (Baseline) 75
Hybrid LSTM–GNN 84

model achieves 84% accuracy, a 9 percentage-point improvement over a stan-


dalone LSTM. The architecture is scalable and directly applicable to intelligent
trading and portfolio management systems.
Future extensions include: (i) Dynamic GNNs with evolving graph topology;
(ii) Graph Attention Networks (GATs) for learnable edge weighting; (iii) integra-
tion of NLP-based news sentiment as additional features; (iv) multi-market gen-
eralisation across exchanges and asset classes; and (v) Reinforcement Learning-
based trading strategy optimisation as a downstream application.

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: 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. Wu, Z., et al.: A comprehensive study on graph neural networks. IEEE Trans.
Neural Netw. Learn. Syst. 32(1), 4–24 (2021)
5. Wang, X., et al.: Graph neural networks in finance. In: KDD Workshop on Mining
and Learning from Time Series (2022)
6. Vaswani, A., et al.: Attention is all you need. In: NeurIPS, vol. 30 (2017)
7. Tsay, R.S.: Analysis of Financial Time Series, 3rd edn. Wiley, Hoboken, NJ (2013)
8. 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)
9. Feng, Z., Yu, J., Zhang, M.: Graph neural networks for stock movement prediction
using financial news and market data. In: AAAI (2019)
10. Chen, Y., Liu, Z., Zhang, H.: Stock movement prediction using GNNs with tem-
poral attention. IEEE Trans. Knowl. Data Eng. (2021)

You might also like