0% found this document useful (0 votes)
20 views18 pages

Hybrid GCN-LSTM for Energy Stock Prediction

This study presents a novel hybrid model combining Graph Convolutional Networks (GCN) and Long Short-Term Memory (LSTM) networks for predicting energy stock prices, addressing the complexities and volatility of the energy market. By utilizing Dynamic Time Warping (DTW) to capture inter-stock relationships and an attention mechanism to enhance temporal dynamics, the model demonstrates superior predictive accuracy compared to traditional methods. Experimental results indicate that this approach significantly outperforms conventional models, providing valuable insights for investors and policymakers in the energy sector.

Uploaded by

alexys
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)
20 views18 pages

Hybrid GCN-LSTM for Energy Stock Prediction

This study presents a novel hybrid model combining Graph Convolutional Networks (GCN) and Long Short-Term Memory (LSTM) networks for predicting energy stock prices, addressing the complexities and volatility of the energy market. By utilizing Dynamic Time Warping (DTW) to capture inter-stock relationships and an attention mechanism to enhance temporal dynamics, the model demonstrates superior predictive accuracy compared to traditional methods. Experimental results indicate that this approach significantly outperforms conventional models, providing valuable insights for investors and policymakers in the energy sector.

Uploaded by

alexys
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

Received 10 January 2025, accepted 25 January 2025, date of publication 29 January 2025, date of current version 10 February 2025.

Digital Object Identifier 10.1109/ACCESS.2025.3536889

A Novel Hybrid GCN-LSTM Algorithm for Energy


Stock Price Prediction: Leveraging Temporal
Dynamics and Inter-Stock Relationships
BABAK AMIRI , AMIRALI HADDADI, AND KOSAR FARAJPOUR MOJDEHI
School of Industrial Engineering, Iran University of Science and Technology, Tehran 16846-13114, Iran
Corresponding author: Babak Amiri (babakamiri@[Link])

ABSTRACT Energy stock price prediction is a pivotal challenge in financial forecasting, characterized by
high volatility and complexity influenced by geopolitical factors, regulatory shifts, and sector-specific issues.
Traditional methods often struggle to account for the intricate dependencies and temporal patterns present in
energy stock data. To address these limitations, this study introduces a hybrid model that integrates a Graph
Convolutional Network (GCN) with an attention-enhanced Long Short-Term Memory (LSTM) architecture.
By employing a graph structure derived from Dynamic Time Warping (DTW), the GCN captures inter-
stock relationships, while the attention mechanism within the LSTM component refines the modelling of
temporal dynamics, allowing the model to focus on the most relevant historical information. Experimental
evaluations across multiple energy stocks show that this combined LSTMGC model significantly outper-
forms conventional approaches- including Linear Regression, GRU, MLP, and standalone LSTMs- when
assessed using Mean Squared Error (MSE) and R-squared (R2 ) metrics. By jointly leveraging spatial and
temporal dependencies, as well as the selective attention mechanism, the proposed framework enhances
predictive accuracy and reliability, offering valuable insights for investors and policymakers navigating the
evolving energy market.

INDEX TERMS Stock price, energy, graph neural networks, long short-term memory, dynamic time
warping, graph convolutional networks.

I. INTRODUCTION predictive accuracy. Gurrib et al. found that using a blend


Predicting energy stock prices has always been a challenging of different approaches can outperform models relying on a
task. The values of oil, gas, and renewable energy companies single method. Meanwhile, the introduction of deep learn-
are influenced by a wide range of factors, including political ing techniques has opened new possibilities. Models such
events, regulatory changes, technological advancements, and as Long Short-Term Memory (LSTM) networks and Con-
market sentiment. These diverse influences make it difficult volutional Neural Networks (CNNs) can identify patterns
for traditional financial models to accurately forecast price and relationships in data that traditional models may over-
movements. As a result, researchers and practitioners are look [1]. As Kim showed, integrating public sentiment into
increasingly turning to advanced methods- especially those deep learning models can capture psychological factors that
based on Artificial Intelligence (AI) and machine learning affect energy stock prices, helping to refine predictions [2].
(ML)- to better understand and predict trends in this sector. Other researchers have explored additional methods and
Recent studies have highlighted the effectiveness of com- data sources to enhance forecasting. Ma et al. demonstrated
bining both fundamental and technical analysis to improve that backpropagation neural networks can improve predic-
tion accuracy when applied thoughtfully [3], while Yu and
The associate editor coordinating the review of this manuscript and Li emphasized the importance of including a broad range
approving it for publication was Sajid Ali . of variables, such as macroeconomic indicators and global

2025 The Authors. This work is licensed under a Creative Commons Attribution 4.0 License.
VOLUME 13, 2025 For more information, see [Link] 24815
B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

events [4]. In addition, the use of unstructured information This study addresses an essential need in financial fore-
like social media data can offer valuable insights. Mehta et al. casting by improving predictive accuracy through innovative
showed that sentiment analysis from social media can detect methodologies. By leveraging DTW and GCN within the
mood shifts in the market, improving a model’s ability to LSTMGC model, it seeks to provide deeper insights into the
foresee price changes [5]. dynamics of energy stocks, supporting more precise invest-
Furthermore, hybrid approaches that combine multiple ment strategies and fostering resilience in an increasingly
machine learning techniques and data preprocessing steps interconnected and complex financial environment.
have gained popularity. Chen et al., for example, proposed This paper is structured as follows: Section II provides
a CNN-BiLSTM-ECA model that leverages both CNNs and a comprehensive literature review, introducing stock price
LSTMs for improved accuracy [6]. Statistical methods like prediction and discussing traditional methods, machine learn-
singular spectrum analysis have also been integrated into ing approaches, the role of hybrid GCN-LSTM models
neural network models, as demonstrated by Youssef et al., in financial forecasting, the application of DTW in time
leading to better forecasting performance [7]. series analysis, and existing hybrid models. The section
In summary, the prediction of energy stock prices now concludes by identifying gaps in the current literature.
benefits from a wide range of advanced analytical tools. Section III describes the proposed hybrid GCN-LSTM
Integrating fundamental and technical analysis, deep learning model. It outlines the datasets used, data preparation tech-
architectures, sentiment analysis, and hybrid models can help niques, graph construction for inter-stock relationships, the
capture the complex and fast-changing nature of these mar- model’s architecture, training processes, and evaluation met-
kets. As research in AI and data analytics continues to evolve, rics. Section IV presents the data and experimental results.
there is reason to expect even better forecasting results in the It evaluates the performance of the proposed model on various
future, ultimately supporting more informed decision-making stocks and summarizes comparisons with other approaches
by investors and stakeholders in the energy sector. in terms of accuracy, robustness, and computational effi-
The energy sector, comprising oil, gas and renewable ciency. Section V discusses the results, including deployment
energy sources, holds a critical position in the global econ- considerations and practical implications for the energy
omy, exerting substantial influence over financial markets stock market. Section VI outlines future research directions,
and economic stability. Energy stock prices are inherently addressing potential improvements, challenges, and unex-
volatile, affected by a myriad of factors including geopo- plored opportunities for enhancing hybrid models in financial
litical events, regulatory shifts, technological advancements forecasting.
and changing market demands. Accurately predicting these
price movements is crucial for investors, corporations and II. LITERATURE REVIEW
policymakers, as it supports informed decision-making and Stock price prediction remains a challenging and dynamic
effective financial risk management. area of research due to the inherent volatility and
Traditional approaches to stock price forecasting, such as non-stationarity of financial markets. Traditional meth-
linear regression and moving averages, often fail to capture ods, such as Autoregressive Integrated Moving Average
the complex and dynamic nature of financial markets. These (ARIMA), have long been a cornerstone for time series
methods struggle with the high volatility and intricate inter- forecasting, offering robust techniques for capturing temporal
dependencies among energy stocks, leaving a notable gap in dependencies in stock price data [1], [2]. However, their
handling the complexities of energy markets. In response to limitations in handling non-linear and high-dimensional data
these challenges, the integration of DTW with a LSTMGC have motivated the adoption of advanced machine learning
presents a promising solution. DTW, a time series alignment approaches.
technique, measures similarity between stock time series by Recent advancements in machine learning and deep
aligning their time points to minimize distance, providing learning have significantly enhanced stock price predic-
a robust framework for understanding relationships across tion accuracy. For instance, Long Short-Term Memory
stocks. Meanwhile, GCNs- a powerful class of machine learn- (LSTM) networks, known for their ability to model sequen-
ing models designed to process graph-structured data- excel tial data and long-term dependencies, have demonstrated
at analyzing complex interactions within a network of stocks. superior performance over traditional models, especially in
This approach is particularly well-suited to modeling the volatile markets [3], [4]. These advancements are further
dependencies between various energy stocks and predicting complemented by hybrid approaches that combine mul-
future price movements based on these interconnections. tiple techniques to improve predictive performance. One
By combining DTW’s ability to identify strong inter-stock such model integrates Complete Ensemble Empirical Mode
relationships with GCN’s advanced capabilities, we develop Decomposition (CEEMD), LSTM, and LightGBM, outper-
the LSTMGC model to address the limitations of traditional forming standalone models in both fitting and accuracy [5].
methods, aiming to enhance the accuracy and reliability of Another notable approach is the incorporation of senti-
energy stock price predictions. This integrated solution offers ment analysis from social media platforms, such as Twitter.
stakeholders a more effective tool for investment planning By analyzing public opinion, models like those combining
and risk management in the energy sector. sentiment analysis with LSTM have successfully captured

24816 VOLUME 13, 2025


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

market dynamics during periods of high uncertainty [6]. Sim- struggles with accuracy in predicting stock prices, under-
ilarly, optimization techniques have been applied to improve scoring its limitations when used in isolation [14]. The use
LSTM performance. For instance, the MS-SSA-LSTM model of graphical models, such as Fibonacci retracement, is also
uses swarm intelligence to optimize LSTM hyperparame- noted as a common technique within technical analysis,
ters, achieving enhanced predictive accuracy [7]. In addition, which attempts to forecast future price movements based on
innovative methods such as the TK-GAN model integrate historical price levels [15].
generative adversarial networks with sentiment analysis. Time Series Forecasting is another traditional method
By factoring in public opinion influences, this approach that employs historical data to predict future stock prices.
improves the training process and enhances predictive accu- The ARIMA model is one of the most widely used time
racy [8]. Furthermore, utilizing signature path features from series models in stock price prediction. It captures the
limit order book data has shown promising results, par- temporal dependencies in stock price data, allowing for
ticularly in improving prediction efficiency in developed effective short-term forecasting. Hsu et al. discuss the sig-
financial markets [9]. nificance of ARIMA models in recognizing price patterns,
Despite these advancements, stock price prediction particularly emphasizing the importance of sample size in
remains inherently challenging. The Efficient Market enhancing prediction performance [16]. However, the limita-
Hypothesis (EMH) posits that stock prices reflect all avail- tions of ARIMA models are also acknowledged, particularly
able information, making prediction inherently difficult. in efficient markets where price movements may not follow
However, deviations from EMH provide opportunities for predictable patterns [17]. The application of ARIMA has
predictive modeling [14]. Addressing these complexities been shown to yield varying degrees of success, often depend-
often requires combining advanced methodologies to bet- ing on market conditions and the specific characteristics of
ter capture the non-linear and dynamic nature of financial the stock being analyzed [17].
markets.
B. MACHINE LEARNING & DEEP LEARNING APPROACHES
A. TRADITIONAL METHODS The application of machine learning and deep learning (DL)
The traditional methods of stock price prediction have been approaches to stock price prediction has gained significant
foundational in financial analysis, providing frameworks that traction in recent years, driven by the increasing complexity
investors and analysts utilize to forecast future price move- of financial markets and the availability of vast amounts
ments. This literature review synthesizes key approaches, of data. This literature review synthesizes key studies that
including fundamental analysis, technical analysis, and highlight the methodologies, advantages, and challenges
time series forecasting, highlighting their methodologies, associated with these advanced predictive techniques.
strengths, and limitations.
Fundamental Analysis is a method that evaluates a stock’s 1) MACHINE LEARNING APPROACHES
intrinsic value by examining related economic, financial, and Traditional machine learning methods such as Support Vec-
other qualitative and quantitative factors. This analysis often tor Machines (SVM), Random Forest (RF), and Artificial
involves scrutinizing financial statements, market conditions, Neural Networks (ANN) have been widely employed for
and macroeconomic indicators. For instance, Fitriani et al. stock price prediction. For instance, Nõu’s comparative study
emphasize the importance of financial ratios in predicting on the Baltic stock market demonstrated that SVM and RF
stock prices, suggesting that a thorough analysis of these models yielded the most accurate predictions among various
ratios can yield insights into future price movements [10]. machine learning algorithms. Similarly, Bai and Sun empha-
Similarly, Xiong discusses the role of fundamental analysis sized the role of sentiment analysis combined with machine
in the context of the COVID-19 vaccine industry, illustrating learning, noting that social sentiment significantly enhances
how financial indicators can guide investment decisions [11]. prediction accuracy in stock markets [18]. The integration
However, the effectiveness of fundamental analysis can be of multiple features, including technical indicators and sen-
hindered by market efficiency, as noted by Rawlin and timent data, has been shown to improve the robustness of
Pakalapati, who argue that in efficient markets, accurately predictions, as evidenced by the findings of Xu and Yang,
forecasting prices based solely on fundamental data can be who applied various ML models to predict Tesla’s stock
challenging [12]. prices [19].
Technical Analysis, on the other hand, focuses on histori-
cal price movements and trading volumes to identify patterns
and trends. This approach utilizes various tools, such as 2) DEEP LEARNING TECHNIQUES
charts and indicators, to predict future price behavior. Gint- Deep learning methods, particularly LSTM networks, have
ing and Matondang highlight that technical analysis allows emerged as powerful tools for time series forecasting in
investors to discern trends by statistically analyzing past stock price prediction. Wang et al. highlighted the effec-
market data [13]. Moreover, Shiral and Torvi point out that tiveness of LSTM in capturing complex patterns in stock
despite the reliance on historical data, technical analysis often price movements, outperforming traditional models such as

VOLUME 13, 2025 24817


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

linear regression [20]. In a similar vein, Peng’s investigation can efficiently analyze massive and dynamic financial data,
into China’s new energy vehicle sector revealed that LSTM making them suitable for real-world applications such as
models provided superior predictive performance compared anti-money laundering and fraud detection [26]. This scal-
to conventional econometric models [21]. The ability of ability is essential for financial institutions that deal with vast
LSTM networks to learn from sequential data makes them amounts of data daily.
particularly suitable for financial time series, where past
prices influence future movements. D. DTW IN TIME SERIES ANALYSIS
Dynamic time warping is a widely recognized algorithm
in time series analysis, particularly noted for its ability to
C. GRAPH NEURAL NETWORKS IN FINANCIAL measure similarity between two temporal sequences that
FORECASTING may vary in speed. This characteristic makes DTW particu-
Graph Neural Networks (GNNs) have emerged as a powerful larly advantageous in various applications, including speech
tool in financial forecasting, leveraging their ability to model recognition, financial forecasting, and environmental mon-
complex relationships and dependencies inherent in financial itoring. One of the primary strengths of DTW lies in its
data. The application of GNNs in this domain is particularly flexibility to handle non-linear alignments between time
relevant due to their capacity to capture both spatial and series. Unlike traditional methods such as Principal Compo-
temporal dependencies among various financial entities, such nent Analysis (PCA) or correlation coefficients, which often
as stocks, commodities, and economic indicators. One of the assume linear relationships and fixed time intervals, DTW
primary advantages of GNNs is their ability to handle mul- allows for dynamic shifts in time points. This flexibility
tivariate time series data effectively. Traditional forecasting is crucial in scenarios where time series data exhibit asyn-
methods often struggle to fully exploit the interdependencies chronous behavior or varying lengths, as highlighted by Sakai
among multiple variables. Wu et al. highlight that GNNs can and Inenaga, who emphasize DTW’s capability to compute
model these relational dependencies more effectively than optimal one-to-many alignments [27]. This property enables
conventional methods, enhancing the accuracy of predictions DTW to capture complex temporal dynamics that are often
in fields such as finance and economics [22]. This capability overlooked by other methods, thereby enhancing the accuracy
is crucial in financial forecasting, where the performance of of analyses in fields like production forecasting and climate
one asset can significantly influence others, necessitating a studies [28]. Moreover, DTW’s robustness to noise and dis-
model that can account for these interactions. Furthermore, tortions in time series data further solidifies its utility. For
the robustness of GNNs to topology perturbations is a crit- instance, Dilmi et al. demonstrate the effectiveness of DTW in
ical factor in financial applications. Yang et al. discuss how comparing rainfall time series, showcasing its ability to pro-
GNNs maintain their predictive performance even when the vide a pertinent measure of dissimilarity even in the presence
underlying graph structure is altered, which is particularly of irregularities [29]. This robustness is particularly beneficial
relevant in dynamic financial markets where relationships in environmental applications, where data may be affected by
between entities can change rapidly [23]. This robustness various external factors. In the context of time series classifi-
allows for more reliable forecasting in environments char- cation, DTW has proven to be an effective distance measure.
acterized by volatility and uncertainty. In addition to their Mahajan introduces a novel approach called Graph-Theoretic
structural advantages, GNNs can also incorporate advanced Dynamic Time Warping (GT-DTW), which enhances tra-
mechanisms such as attention layers, which allow the model ditional DTW by representing time series as graphs. This
to focus on the most relevant features of the data. Xiong’s method not only improves computational efficiency but also
research introduces a complex network attention mecha- provides superior classification accuracy compared to con-
nism that significantly improves the forecasting accuracy of ventional DTW methods [30]. Such advancements are critical
multivariate time series, demonstrating the potential of inte- as they address the computational challenges associated with
grating attention mechanisms within GNN frameworks [24]. DTW’s quadratic time complexity, which can hinder its appli-
This integration can lead to a more nuanced understanding cation in large datasets [31]. Furthermore, the integration
and predictions of financial trends. Moreover, the ability of DTW with machine learning techniques has opened new
of GNNs to process negative edges—representing adverse avenues for its application. For example, Yu et al. propose
relationships—further enhances their applicability in finan- a gated recurrent neural network that incorporates DTW for
cial forecasting. Ni et al. emphasize that traditional GNNs daily peak load forecasting, demonstrating how DTW can
often fail to capture the complexities introduced by negative enhance predictive modeling in complex, non-linear time
edges, which are common in financial networks where cer- series [32]. This synergy between DTW and deep learning
tain relationships can be detrimental [25]. Addressing this illustrates the algorithm’s adaptability and relevance in mod-
limitation can lead to more accurate models that reflect the ern analytical frameworks.
true nature of financial interactions. The scalability of GNNs
is another significant advantage, particularly in the context E. HYBRID MODELS FOR STOCK PREDICTION
of large financial datasets. Weber’s work on scalable graph Hybrid models for stock prediction have gained significant
convolutional neural networks illustrates how these models attention in recent years due to their ability to combine

24818 VOLUME 13, 2025


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

various methodologies, enhancing predictive accuracy and hybrid approaches, several challenges remain. The inher-
robustness. These models often integrate machine learning ent volatility and non-linearity of stock markets, coupled
techniques with traditional statistical methods, deep learning with the dynamic interdependencies between stocks, present
architectures, and sentiment analysis to capture the complex ongoing hurdles for accurate forecasting. The limitations of
dynamics of financial markets. One prominent approach is data quality, model interpretability, and scalability further
the integration of LSTM networks with other machine learn- complicate the development of robust predictive systems.
ing algorithms, such as LightGBM. Ye et al. propose a hybrid Additionally, integrating complex temporal and relational
model that utilizes LSTM for capturing temporal dependen- dynamics, as required for energy stock prediction, demands
cies in stock price movements while employing LightGBM innovative algorithms that balance computational efficiency
to process historical stock data, thereby improving prediction and accuracy. Addressing these challenges is essential to
accuracy for stock rises and falls [33]. This combination advancing the field and unlocking the full potential of pre-
leverages the strengths of both models: LSTM’s ability to dictive models in financial markets.
handle sequential data and LightGBM’s efficiency in man-
aging large datasets. Another notable hybrid approach is III. PROPOSED MODEL
presented by Ilyas et al., who develop a model that combines This section introduces the proposed model, detailing its
Support Vector Regression (SVR) with a modified Hodrick- graph-based structure, architecture, training process, and
Prescott filter. Their findings indicate that this hybrid model evaluation metrics used to assess performance.
outperforms traditional neural network methods in forecast-
ing stock closing prices, showcasing the effectiveness of inte- A. MODEL STRUCTURE
grating filtering techniques with machine learning [34]. This
The proposed model for energy stock price prediction inte-
approach highlights the importance of preprocessing data to
grates GCN with LSTM networks to effectively tackle the
enhance the performance of predictive models. In the realm of
inherent challenges in financial forecasting. This hybrid
sentiment analysis, Bai and Sun emphasize the role of social
architecture leverages the strengths of GCNs in capturing spa-
sentiment in stock market predictions. Their intelligent model
tial dependencies and LSTMs in modeling temporal patterns,
incorporates sentiment analysis alongside machine learning
thereby offering a comprehensive framework for accurate
techniques, demonstrating that social sentiment can signifi-
predictions.
cantly improve the accuracy of stock price predictions [18].
This integration of qualitative data with quantitative models
1) GRAPH CONVOLUTIONAL NETWORK COMPONENT
represents a crucial advancement in understanding market
movements. Moreover, the work of Jiang et al. introduces The GCN component constructs a graph-based structure
a hybrid model that combines deep learning with investor where each node represents an energy stock, and edges
sentiment analysis. This model effectively captures the influ- signify the relationships between these stocks. These rela-
ence of market sentiment on stock prices, providing a more tionships are derived from historical price correlations, with
comprehensive prediction framework that accounts for both sector-specific interdependencies enhancing the contextual
quantitative and qualitative factors [35]. Such models are understanding of market dynamics. By modeling these spatial
particularly relevant in today’s market, where investor sen- dependencies, the GCN captures how stocks within the same
timent can heavily influence stock price movements. The sector or influenced by similar external factors (e.g., crude oil
application of hybrid models is not limited to LSTM and price fluctuations, geopolitical events) interact and influence
SVR; Lu et al. explore the use of convolutional neural each other’s price movements.
networks in conjunction with LSTM for stock price predic-
tion. Their research indicates that the CNN-LSTM model 2) LSTM NETWORK COMPONENT
can effectively analyze multivariate time series data, lead- Complementing the GCN, the LSTM network processes
ing to improved forecasting performance [36]. This hybrid sequential data to identify and learn temporal patterns
approach capitalizes on CNN’s strengths in feature extraction essential for stock price forecasting. Its gated architecture
and LSTM’s capabilities in sequence prediction. Further- adeptly handles both short-term fluctuations and long-term
more, Kumar et al. discuss the integration of evolutionary dependencies, mitigating issues like vanishing gradients.
algorithms with traditional econometric models, resulting To enhance the model’s capability in focusing on the most
in a hybrid system that enhances stock price forecasting relevant parts of the data, we introduce an attention mech-
accuracy. Their findings suggest that combining different anism within the LSTM layers. This addition allows the
methodologies can yield better results than relying on a single model to dynamically weigh the importance of different time
approach [37]. This trend of hybridization reflects a broader steps, improving its ability to capture significant temporal
movement in financial forecasting towards more sophisti- patterns and anomalies that may influence stock prices. The
cated models that can adapt to the complexities of market attention-enhanced LSTM not only boosts predictive accu-
behavior. racy but also provides better interpretability by highlighting
While significant advancements have been made in stock which historical data points the model prioritizes during
price prediction through traditional, machine learning, and prediction.

VOLUME 13, 2025 24819


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

FIGURE 1. Proposed model.

3) DTW FOR ENHANCED CORRELATION MEASUREMENT graph, where each stock serves as a node and edges between
Unlike traditional models that treat stocks as isolated entities, nodes indicate relationships between stocks. The relationship
our approach employs Dynamic time warping to measure between any two stocks was quantified by the historical
similarities in time series data. DTW effectively aligns price correlation, providing insights into how these stocks
time series that may be out of phase, capturing cross-stock tend to move together over time. This graph-based approach
dependencies even when stock movements are not per- allows us to go beyond analyzing each stock as an isolated
fectly synchronized. This dynamic alignment enriches the time series. By incorporating information about how stocks
graph structure with more meaningful connections, leading interact with each other, including temporal alignments that
to improved predictive performance over models like GRU, capture shifts and delays in stock movements, we enhance the
MLP, and standalone LSTM, as evidenced by superior met- accuracy of our predictions. This approach reveals underlying
rics such as Mean squared error and R-squared values. connections that may not be immediately apparent, such as
coordinated trends or sector-specific dependencies, providing
a more nuanced understanding of relationships within the
4) OVERALL FRAMEWORK same sector or market. For example, companies in the oil and
By combining GCNs with attention-enhanced LSTMs and gas sector often respond similarly to external factors such
leveraging DTW for sophisticated correlation analysis, the as changes in crude oil prices, geopolitical events, or shifts
proposed LSTMGC model offers a robust and versatile tool in regulatory policies. By representing these interdependen-
for forecasting energy stock prices. This integrated approach cies in the graph structure, the model captures how such
not only captures the intricate spatial and temporal dynam- factors simultaneously influence multiple stocks, enabling
ics of the energy market but also introduces mechanisms more accurate and context-aware predictions of intercon-
for enhanced focus and interpretability, providing valuable nected stock behavior.
insights for investors and policymakers navigating the com-
plexities of the energy sector. Fig.1 illustrates the structure of
the proposed model. a: CORRELATION MATRIX CONSTRUCTION (USING DTW)
Stage 1: Graph Structure and Representation To capture the relationships among energy stocks, we con-
The relationships between energy stocks are complex structed a correlation matrix based on their historical price
and are often influenced by various factors, including mar- movements. This matrix serves as the foundation for the
ket dynamics, geopolitical issues and sector-specific trends. graph representation, where each element C_ij represents
A key challenge in predicting the future prices of energy the correlation between stocks i and j, calculated using
stocks lies in capturing the interdependencies among these DTW. DTW allows us to measure similarities between time
stocks. In this study, we represented energy stocks as a series that may not be perfectly aligned in time, making it

24820 VOLUME 13, 2025


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

particularly valuable for financial data, where stock prices align the time series up to that point:
may not move simultaneously but still exhibit similar trends
C (i, j)
over time. The key advantage of DTW is its ability to handle
local variations in speed and duration between compared time = D (i, j)
series [17]. In Fig.2, a comparison of trends between two + min {C (i − 1, j) , C (i, j − 1) , C (i − 1, j − 1)}
different stocks is illustrated. (2)
Boundary conditions for C (1, 1) = D (1, 1) are defined
and values outside the matrix dimensions are set to
infinity. This recursive approach provides a dynamic
programming solution that minimizes total alignment
cost.
- Alignment Path: The optimal alignment is derived from
the cumulative distance matrix by tracing back from
C (n, m) to C (1, 1). This path is known as the alignment
path and its cumulative cost represents the overall sim-
ilarity between the two-time series. The DTW distance,
denoted as C (n, m), reflects the minimum cumulative
distance required to align the series.
The Dynamic time warping algorithm effectively compen-
FIGURE 2. A comparison of trends between PCCYF and XOM stocks.
sates for temporal discrepancies between two time series by
aligning them in a nonlinear manner. This alignment facil-
DTW employs nonlinear mapping to align time series itates the computation of a distance metric that quantifies
data [38], allowing it to uncover patterns that might not the similarity between the time series, which we subse-
be apparent through simple linear comparisons [39]. This quently transform into a correlation value for populating the
approach is especially useful in identifying underlying simi- correlation matrix. In this matrix, stocks exhibiting higher
larities among stocks, even when there are time lags or shifts correlation scores are represented by stronger connections
in the price movements, which are common in financial data. within the graph, whereas those with lower scores display
The main idea behind DTW is to stretch or compress weaker or no connections.
portions of a time series to achieve optimal alignment, thereby The computation of the correlation matrix involves the
minimizing the overall distance between the two sequences. following steps:
This technique calculates a distance metric that accounts • Data Input: We utilize historical price data from the
for temporal discrepancies by creating an ‘‘alignment path’’, training set encompassing 50 energy stocks.
which represents the optimal matching between the series. • Pairwise Comparison For each unique pair of stocks i
The DTW calculation begins with the construction of a and j, the DTW algorithm is applied to their respective
cumulative distance matrix that compares two sequences A = time series to calculate the distance metric Dij .
(a1 , a2 , . . . ,an ) and B = (b1 , b, . . . ,bn ). The goal is to deter- • Distance to Correlation Conversion: The computed
mine an optimal alignment path P = (p1 , p, . . . ,pk ) where DTW distance Dij is inversely transformed into a cor-
each point Pk = (ik , jk ) maps elements of A to elements of relation value Cij using an appropriate scaling function
B, minimizing the overall distance between the sequences. to ensure that smaller distances correspond to higher
The steps of the DTW algorithm involve constructing a local correlations.
distance matrix, calculating a cumulative cost matrix and • Thresholding: A correlation threshold of 0.7 is imple-
identifying an optimal alignment path that minimizes the mented, whereby only pairs of stocks with Cij ≥ 0.7 are
overall distance between two time series. retained. This thresholding step ensures that the graph
- Distance Matrix Construction: First, a local distance encapsulates only significant relationships, thereby min-
matrix D (i, j) is created, where D (i, j) represents the imizing the inclusion of noise from weaker, potentially
Euclidean distance between two points in the time series: irrelevant correlations.
q By applying this threshold, the resulting graph structure
D (i, j) = (ai − bi )2 (1) emphasizes meaningful inter-stock relationships, enhancing
the model’s ability to capture the underlying market dynamics
If the time series lengths are n and m, the distance matrix pertinent to energy stock price prediction.
will have dimensions n × m.
- Cumulative Cost Matrix Construction: Next, a cumu- b: GRAPH ADJACENCY MATRIX AND STORAGE OF GRAPH
lative cost matrix C (i, j) is calculated based on the local INFORMATION
distance matrix, where the cumulative cost at each point After calculating the correlation matrix, we constructed the
represents the minimum cumulative distance required to graph adjacency matrix. This square matrix, denoted as A, has

VOLUME 13, 2025 24821


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

details, ensuring seamless access and integration during the


model training process. The key components stored within
GraphInfo include:
- Node Indices: Each node index uniquely represents an
energy stock within our dataset, facilitating easy identi-
fication and reference throughout the model.
- Edge Indices: These indices denote pairs of nodes
(stocks) that exhibit correlations exceeding the prede-
fined threshold of 0.7. By storing only significant edges,
the graph maintains a focused representation of mean-
ingful inter-stock relationships.
- Total Number of Nodes: This attribute specifies the
total count of stocks included in the graph, which is 50 in
our case, providing a clear scope of the dataset being
analyzed.
This encapsulated structure ensured that the graph infor-
mation was readily accessible throughout the model training
and could be seamlessly integrated with the graph convolu-
FIGURE 3. Heatmap of relationships between stocks.
tional layers.
Stage 2: Model Architecture
elements Aij that indicate whether there is an edge between Our predictive model integrates the strengths of GCNs
stocks i and j. If the correlation between two stocks exceeds and LSTM networks, augmented with an attention mecha-
a threshold of 0.7, we assign a value of 1 to Aij , representing nism to enhance predictive performance. This architecture
a direct link between these stocks. Otherwise, Aij is set to 0, is specifically designed to capture both spatial dependencies
indicating no direct relationship between the two stocks. among energy stocks and temporal dependencies within their
The adjacency matrix serves as a critical input for the graph historical price data.
convolutional layers in our model. It provides information The first component of the model is a Graph Convolutional
about the graph structure, helping the model determine how Layer, which captures spatial dependencies among energy
to aggregate information from neighboring nodes (stocks) stocks represented as nodes in a graph. This layer processes
during the convolution operations. This structure enables the the adjacency matrix- constructed from stock correlations-
model to learn from both individual stocks and their neigh- and the stock price data formatted as time series.
bors in the graph, enhancing its predictive power. For each stock (node), the initial features corresponding to
To account for varying strengths in the relationships its historical prices are transformed into a higher-dimensional
between stocks, we applied a Gaussian kernel to weight the space using a learnable weight matrix. The features of
edges in the graph. The Gaussian kernel is defined as follows: neighboring stocks are then aggregated based on the graph
 ! ! structure, where the influence of each neighbor is weighted
 exp − d (i, j) d (i, j)2
2 by the strength of its connection in the adjacency matrix. This


if exp −
Aij = σ2 σ2 aggregation allows the model to learn the relational structure
 between stocks, effectively incorporating information from
0 otherwise

both the individual stock and its neighbors to produce an
(3)
updated feature representation.
where d (i, j) represents the distance between the time series The updated features from the Graph Convolutional Layer
of stocks i and j; σ 2 controls the width of the Gaussian kernel are subsequently fed into the LSTM layer to model temporal
and ε is a threshold that determines whether a meaningful dependencies. LSTMs are a type of Recurrent Neural Net-
edge exists between the stocks. work (RNN) adept at capturing long-term dependencies and
The weighted adjacency matrix allowed us to not only patterns in sequential data. The LSTM layer processes the
model the connections between stocks but also account for time series data for each stock over a sequence of time steps,
the strength of these connections. This weighting played an updating its hidden state at each step based on the current
important role in the graph convolutional layer, where each input and the previous hidden state. This capability allows the
node collected information from its neighbors based on these LSTM to retain memory of past information, which is crucial
weights. for predicting future stock prices based on historical patterns.
To efficiently manage and utilize the graph structure and To enhance the model’s ability to focus on the most relevant
its associated attributes, we encapsulated this information temporal features, we incorporate an attention mechanism
within a dedicated class object named GraphInfo. This class within the LSTM layer. The attention mechanism enables the
was meticulously designed to store and organize essential model to dynamically assign different weights to different

24822 VOLUME 13, 2025


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

time steps in the input sequence, effectively highlighting the batch size, learning rate, the number of LSTM units, and the
most influential historical data points for the prediction task. type of graph convolution aggregation. The specific steps in
Specifically, the attention mechanism computes a context our hyperparameter tuning process are as follows:
vector as a weighted sum of the LSTM outputs, where the - Batch Size: We tested batch sizes of 32, 64, and 128 to
weights (attention scores) are learned parameters that indicate determine the optimal number of samples processed
the relevance of each time step. This context vector captures simultaneously during training. This helped in balancing
the salient features necessary for accurate prediction, allow- training speed and model performance.
ing the model to focus on significant temporal patterns while - Learning Rate: To prevent the model from over-
diminishing the impact of less relevant information. shooting the optimal solution during gradient descent,
By integrating the attention mechanism, the model not only we explored learning rates of 0.001, 0.0005, and 0.0002.
improves predictive accuracy but also enhances interpretabil- Selecting an appropriate learning rate was crucial for
ity. It provides insights into which historical time steps have stable and efficient convergence.
the most significant influence on future stock prices, aiding - LSTM Units: We experimented with the number of
investors and analysts in understanding market dynamics. LSTM units set to 32, 64, and 128. This was aimed at
The combination of the Graph Convolutional Layer, the identifying the capacity needed for effectively capturing
LSTM layer, and the attention mechanism allows the model to temporal patterns in the data.
simultaneously capture spatial dependencies among stocks, - Graph Convolution Aggregation: The type of graph
temporal dependencies within stock price data, and focus on convolution aggregation was another critical hyper-
the most relevant temporal features. This hybrid approach parameter, with options including ‘‘mean,’’ ‘‘sum,’’
leverages inter-stock relationships and the dynamic temporal and ‘‘max.’’ This parameter influenced how informa-
patterns of individual stocks, resulting in a more robust and tion from neighboring nodes was aggregated, thereby
accurate predictive model for energy stock prices. impacting the model’s ability to learn the relationships
between stocks.
B. MODEL TRAINING AND OPTIMIZATION - Attention Mechanism Settings:
This section focuses on the process of training the predic- • Number of Attention Heads: We tested 2, 4, and
tive model and fine-tuning its parameters to ensure optimal 8 attention heads to determine the optimal focus
performance. This stage integrates advanced techniques, granularity.
including the use of GCNs and LSTM layers, requiring care- • Attention Dropout Rate: Dropout rates of 0.1, 0.3,
ful attention to both spatial and temporal dependencies in and 0.5 were explored to prevent overfitting within
the dataset. The following subsections outline the training the attention layers.
settings and the hyperparameter tuning process that enabled • Attention Vector Dimensionality: We evaluated
the development of a robust and generalizable model. attention vector dimensions of 64, 128, and 256 to
balance model complexity and performance.
1) TRAINING SETTINGS
- Training Epochs and Early Stopping: We set the num-
The training process was meticulously designed to ensure that
ber of training epochs to 20, incorporating early stopping
the model effectively learned from historical data while main-
based on validation performance to avoid overfitting.
taining the ability to generalize to unseen data. We utilized
Specifically, training was halted if no improvement
the TensorFlow and Keras frameworks to implement and train
was observed in the validation loss for 10 consecutive
our model, which integrates GCNs with LSTM layers. This
epochs.
combination required careful tuning of hyperparameters to
balance the learning of spatial dependencies among energy Through this rigorous hyperparameter tuning process, the
stocks (nodes) and the temporal dependencies present in optimal settings were identified as follows:
historical price data. • Batch Size: 64
The dataset was divided into three subsets: 70% for training • Learning Rate: 0.0002
(2301 samples), 20% for validation (657 samples) and 10% • LSTM Units: 64
for testing (330 samples). This partitioning strategy ensured • Graph Convolution Aggregation: ‘‘mean’’
that the model had ample data to learn intricate stock price • Number of Attention Heads: 4
patterns from the training set, while the validation set was • Attention Dropout Rate: 0.3
used for hyperparameter tuning and preventing overfitting. • Attention Vector Dimensionality: 128
The test set remained untouched during training and valida- The model was trained for up to 20 epochs, with early stop-
tion, serving solely to evaluate the model’s final performance ping triggered if no improvement in validation performance
and its ability to generalize to new, unseen data. was detected after 10 epochs. The Mean squared error was
employed as the loss function, effectively penalizing larger
2) HYPERPARAMETER TUNING errors more than smaller ones and encouraging the model to
To optimize the model’s performance, we conducted exten- minimize significant deviations between predicted and actual
sive experiments with various hyperparameters, including stock prices. For optimization, we selected the RMSProp

VOLUME 13, 2025 24823


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

optimizer with a learning rate of 0.0002 due to its ability to The RMSE is often easier to interpret as it directly relates
adapt the learning rate dynamically during training, making to the scale of the target variable (stock prices).
it well-suited for handling the evolving patterns in time series - Coefficient of Determination (R2 ): The R2 metric eval-
data. uates how well the predicted values fit the actual data,
The optimization process aimed to minimize the MSE indicating the proportion of variance in the target vari-
on the training data while ensuring the model’s generaliz- able explained by the model:
ability through validation performance. Early stopping based Pn 2
on validation loss was implemented to prevent the model 2 i=1 yi − ŷi
R = 1 − Pn (7)
i=1 (yi − µ)
from overfitting to the training data, ensuring that the final 2

model maintained high performance on unseen data. This


comprehensive approach to training and optimization enabled Here, µ is the mean of the actual values. Higher R2
the development of a robust predictive model capable of values (closer to 1) indicate better model performance.
accurately forecasting energy stock prices by leveraging both These metrics allowed us to comprehensively evaluate the
spatial and temporal dependencies inherent in the dataset. model’s performance, considering both the magnitude and
distribution of the errors.
C. EVALUATION METRICS
Accurate evaluation of a prediction model is critical to 2) VALIDATION SET EVALUATION
understanding its effectiveness and reliability. In this section, During the training process, a validation set was used to
we outline the metrics used to assess the model’s perfor- monitor the model’s performance at each epoch. The model’s
mance, focusing on both the magnitude of errors and the error on the validation set was carefully tracked and training
model’s ability to generalize to unseen data. was stopped when the validation error ceased to improve.
This ensured the model did not overfit the training data and
1) PERFORMANCE METRICS maintained its ability to generalize to unseen data.
To evaluate the performance of the prediction model, we used At the end of each epoch, the MAE, MSE and RMSE were
several metrics commonly employed in time series forecast- calculated for both the training and validation sets. By com-
ing. These metrics are as follows: paring these metrics, we ensured that the model was not
excessively optimized for the training set while retaining its
- Mean Absolute Error (MAE): The MAE measures
generalization capability on the validation set. This approach
the average magnitude of errors between predicted and
balanced training and validation errors, ultimately improving
actual values, regardless of their direction. It is computed
the model’s robustness and reliability.
as:
n IV. DATA AND RESULTS
1X
MAE = yi − ŷi (4) A. DATA
n
i=1 This section outlines the datasets and data preparation tech-
where yi is the actual stock price and ŷi is the predicted niques employed to ensure high-quality inputs for the model.
stock price. The MAE is useful for understanding the In this study, historical data for the top 50 energy stocks
average deviation of predictions from actual values in by market capitalization was sourced from Yahoo Finance.
monetary units, providing a straightforward measure of These stocks were selected due to their prominent repre-
error. sentation of the global energy sector and their considerable
- Mean squared error: The MSE calculates the average influence on broader economic trends (Fig.4). Collecting
squared differences between predicted and actual values: data from such high-impact stocks is crucial for develop-
ing a model that accurately reflects the dynamics of the
n
1X 2 energy market. Initially, comprehensive time series data for
MSE = yi − ŷi (5)
n each stock was retrieved. However, during preprocessing,
i=1
we identified a discrepancy in the time series lengths across
where yi is the actual stock price and ŷi is the predicted stocks, resulting from differences in listing dates and market
stock price. Unlike the MAE, the MSE penalizes larger availability over the years. To ensure uniformity and compa-
errors more heavily, making it valuable for identifying rability across all stocks, we confined the dataset to a fixed
models that occasionally make large errors. time period, specifically from March 1, 2011, to September
- Root Mean Squared Error (RMSE): The RMSE is the 26, 2024. This period was carefully chosen to encompass
square root of the MSE and expresses the error in the a substantial amount of historical data for each stock, thus
same unit as the predicted variable (stock price): providing a robust foundation for analysis while minimizing
v the potential loss of valuable information.
uX yi − ŷi 2
u n
The data collected is on a daily frequency, with the opening

RMSE = t (6) price of each trading day selected as the primary variable
n
i=1 for analysis. The choice of daily opening prices aligns with

24824 VOLUME 13, 2025


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

is essential. In the context of our study, forward filling was


crucial for aligning and standardizing time series data across
50 energy stocks from diverse markets. This method proved
especially reliable given the strong temporal correlations typ-
ically observed in stock price movements. By using forward
filling, we minimized disruptions caused by trading calendar
differences while maintaining the integrity and realism of our
dataset.
Moreover, this approach enhances the robustness of pre-
dictive models by ensuring they are trained on datasets that
closely represent market conditions. The technique aligns
with established best practices in time series forecasting and
financial analytics, as supported by Kamalov and Sulieman,
who highlight its reliability in preserving data fidelity and
FIGURE 4. The names of the stocks under review, categorized by different
energy sectors.
reducing distortion in sequential datasets [40].

V. RESULTS
To evaluate the performance of the LSTMGC model in pre-
our objective of capturing day-to-day market dynamics and dicting energy stock prices, we conducted a comprehensive
allows for a more granular understanding of price trends and comparison with several well-established forecasting models.
fluctuations over time. These models included Linear Regression, GRU, LSTM and
By standardizing the start and end dates for all stocks, MLP. The primary goal of this comparison was to assess the
we ensured that our model would be trained on a consistent ability of each model to predict stock prices by capturing
dataset across the entire time series. This alignment not only both spatial dependencies (relationships between stocks) and
enhances the model’s reliability in capturing sector-wide pat- temporal dependencies (time series trends) in the dataset.
terns but also supports accurate comparative analysis across By comparing the proposed LSTMGC model with these
the various stocks in the dataset. Such uniformity is crucial baseline models, we aimed to demonstrate that the integration
for the validity of the predictive model, as it minimizes biases of Graph Convolutional layers and LSTM layers can lead to
that could arise from unequal data lengths or irregular time significant improvements in prediction accuracy. This com-
intervals, ultimately contributing to the robustness of our parison highlights the robustness of the LSTMGC model and
forecasting approach. its ability to generalize to unseen data, which is crucial for
real-world financial forecasting applications.
B. DATA PREPARATION The main objective of this comparison was to determine
Preparing the data is a crucial step in ensuring the accu- whether combining Graph Convolutional layers (to capture
racy and reliability of stock price prediction models. This inter-stock correlations) with LSTM layers (to model time
involves addressing missing data due to market differ- series dependencies) could outperform models that either
ences and employing techniques like data smoothing to focus solely on temporal data (e.g., LSTM, GRU) or rely
reduce noise while preserving essential trends in the time on simpler architectures (e.g., LR, MLP). In the subsequent
series. sections, we will present the performance results of each
Managing missing data is a critical aspect of working model, highlighting the strengths of the LSTMGC model.
with stock prices from global markets, as differences in We will also discuss specific areas where baseline models
trading schedules and holidays can lead to inconsistencies may have demonstrated better performance, providing a bal-
in datasets. For instance, some energy stocks in our dataset anced evaluation of the proposed approach.
are traded in non-Western markets, such as China, where
holiday schedules often diverge significantly from those of A. RESULTS FOR XOM STOCK
Western markets like the U.S. and Europe. Consequently, The performance of the LSTMGC model was initially eval-
missing data points frequently occurred for these stocks on uated using the stock prices of Exxon Mobil Corporation
days when their markets were closed but Western markets (XOM), one of the largest energy companies globally and a
remained operational. To address these gaps, we adopted the key player in the energy sector. The results for XOM were
‘‘forward filling’’ method, where missing values are replaced then compared to those of five other models, as shown in
with the last available stock price. This approach ensures the Table.1.
continuity of the time series data while avoiding the introduc- The LSTMGC model significantly outperformed all other
tion of artificial trends or biases that could arise from external models across evaluation metrics, as seen in Fig.5. Its Mean
interpolations. Forward filling effectively preserves the inher- squared error was 0.078, indicating the smallest squared
ent patterns of the data, making it particularly suitable for differences between predicted and actual prices. Similarly,
financial time series analysis, where maintaining consistency the Root Mean Squared Error (RMSE) of 0.279 confirms

VOLUME 13, 2025 24825


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

TABLE 1. Results for different models’ prediction applied to XOM stock.

FIGURE 5. The results for different models applied to XOM stock.

the model’s high accuracy by demonstrating low average from actual prices. The inability of GRU to account for
error between predicted and actual prices. Moreover, the inter-stock relationships likely contributed to this underper-
mean absolute error of 0.224 suggests that the model’s abso- formance.
lute prediction errors were minimal. The high R2 value of The MLP model, a feed-forward neural network, fared
0.815 highlights that the model explained 81.5% of the vari- even worse than GRU. Its MSE of 2.952 and RMSE of
ance in the XOM stock prices, showcasing its ability to adapt 1.718 were the highest among all models, indicating the
to the data and make reliable predictions. most significant prediction errors. The MAE of 1.708 further
The percentage-based error metrics further affirm the confirms the model’s struggle to produce accurate forecasts.
model’s precision, with the mean absolute percentage error With an R2 of -28.558, the MLP demonstrated very limited
at 7.383% and RMSE% at 9.203%. These metrics indicate capability to explain stock price movements, as expected
that the predicted stock prices deviated only slightly from due to its lack of inherent temporal or spatial dependency
the actual values. The superior performance of the LSTMGC modeling. Its MAPE (108.881%) and RMSE% (109.513%)
model can be attributed to its dual capabilities: temporal further underscore the model’s unreliability, as its predictions
dependency modeling through LSTM and spatial relationship deviated massively from actual prices.
modeling via GCN, effectively capturing both time-series The LSTM model, while more effective than GRU and
patterns and inter-stock relationships. MLP, still lagged behind the LSTMGC model. It achieved
In contrast, the GRU model, while generally effective in an MSE of 1.126 and an RMSE of 1.061, demonstrating
time series prediction, performed poorly in this case. Its MSE some ability to capture patterns in the XOM stock price data
of 1.899 and RMSE of 1.378 were significantly higher than but still producing larger errors compared to LSTMGC. Its
those of LSTMGC, reflecting substantial prediction errors. MAE of 1.011 highlights the relatively larger average predic-
With an MAE of 1.348 and an R2 of −18.012, the GRU tion deviations. An R2 of −10.275 indicates that the model
model not only exhibited large errors but also failed to capture struggled to account for the variance in stock prices effec-
meaningful variance in the stock prices. The negative R2 tively. Although LSTM is well-suited for capturing temporal
value suggests that the model performed worse than simply dependencies, its inability to model inter-stock relationships
predicting the mean stock price, a strong indicator of poor likely led to its inferior performance. Furthermore, its MAPE
performance. Similarly, its MAPE (85.886%) and RMSE% (79.930%) and RMSE% (82.650%) reveal considerable inac-
(87.829%) reveal that the predictions deviated drastically curacy in predictions.

24826 VOLUME 13, 2025


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

TABLE 2. Results for different models’ prediction applied to CVX stock.

The LR model, while simple, performed better than GRU 0.331 and an R2 value of −2.916, underscoring its inability
and MLP but fell short of both LSTM and LSTMGC. Its to fit the data effectively.
MSE of 0.944 and RMSE of 0.972 reflect relatively higher Overall, the LSTMGC model consistently outperformed
prediction errors than LSTMGC. The MAE of 0.933 suggests the alternative approaches, confirming its ability to leverage
that while it provided better predictions than GRU and MLP, both temporal and spatial dependencies in energy stocks like
it was less effective than the more advanced models. The R2 CVX for more accurate predictions. These findings reinforce
of −8.450 indicates limited success in explaining stock price the importance of combining these features to achieve supe-
variance, as linear models struggle with the non-linear rela- rior stock price forecasting (Fig.6).
tionships often present in stock price movements. Percentage
errors such as MAPE (59.475%) and RMSE% (61.923%) C. RESULTS FOR PCCYF STOCK
further confirm its reduced accuracy compared to LSTMGC. As shown in Table.4, the LSTMGC model once again
Figure 5 clearly illustrates the superiority of the LSTMGC demonstrated superior performance compared to other mod-
model, which combines temporal and spatial modeling capa- els in predicting the stock prices of Panasonic Corporation
bilities to provide highly accurate predictions. Other models, (PCCYF). With a MSE of 0.003 and a RMSE of 0.057,
particularly GRU, MLP and LR, showed notable limitations this model achieved the lowest error rates, showcasing its
in capturing the complex patterns in XOM stock prices, ability to accurately forecast PCCYF stock prices. The MAE
emphasizing the importance of integrating both temporal and of 0.045 and the R2 value of 0.946 further emphasize its
spatial features for accurate stock price forecasting. effectiveness, as it explained 94.6% of the variance in PCCYF
stock prices, establishing it as a highly reliable tool for predic-
tion. While the percentage-based error metrics were positive
B. RESULTS FOR CVX STOCK (MAE%: 5.887% and RMSE%: 7.422%), these small values
As shown in Table.2, the LSTMGC model once again out- confirm the model’s accuracy.
performed all other models in predicting the stock prices of In contrast, alternative models such as GRU, MLP and
Chevron Corporation (CVX). With a Mean Squared Error of LSTM exhibited significantly higher error rates. The GRU
0.008 and a Root Mean Squared Error of 0.090, the LSTMGC model, for instance, had an MSE of 0.129 and an RMSE of
achieved the lowest error rates, demonstrating its exceptional 0.359, reflecting its lower effectiveness in identifying patterns
capability for accurate stock price forecasting. The model in PCCYF stock prices. The MLP and LSTM models also
also exhibited a Mean Absolute Error of 0.070 and an R2 performed poorly, with MSE values of 0.381 and 0.311,
value of 0.924, indicating that it explained 92.4% of the respectively, along with negative R2 values, indicating their
variance in CVX stock prices. These results highlight the reli- inability to fit the data adequately. While the LR model out-
ability and precision of the predictions made by the LSTMGC performed GRU, MLP and LSTM, it still displayed relatively
model. Despite some negative percentage-based error values high error levels, with an MSE of 0.051 and an R2 value of
(MAPE: −27.039% and RMSE%: −34.909%), these figures 0.242, highlighting its limitations in capturing the stock price
still reflect the model’s overall low error levels. movements with precision.
In contrast, other models, including GRU, MLP and Overall, the LSTMGC model consistently outperformed
LSTM, demonstrated inferior performance. The GRU model, all other approaches, reaffirming its superior ability to capture
for example, had an MSE of 0.190 and an RMSE of 0.436, both temporal and spatial dependencies in predicting PCCYF
which were significantly higher than those of the LSTMGC stock prices. These results further validate its potential as a
model, indicating larger prediction errors. Similarly, the MLP robust and reliable forecasting method.
and LSTM models produced MSEs of 0.121 and 0.127,
respectively, alongside negative R2 values, further emphasiz- D. SUMMARY OF MODEL COMPARISONS
ing their weaker performance. The Linear Regression (LR) In the evaluation of all stocks, the LSTMGC model consis-
model exhibited the poorest performance, with an MSE of tently outperformed other models (GRU, MLP, LSTM and

VOLUME 13, 2025 24827


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

FIGURE 6. The results for different models applied to CVX stock.

TABLE 3. Results for different models’ prediction applied to PCCYF stock.

FIGURE 7. The results for different models applied to PCCYF stock.

LR) in terms of prediction accuracy. This superior perfor- and LSTM models were unable to match the performance
mance was evidenced by significantly lower error metrics, of the LSTMGC model, exhibiting significantly higher error
including MSE, RMSE and MAE. For most stocks, the LST- rates and even negative R2 values, particularly for stocks
MGC model achieved the lowest values for these metrics, with more complex price movements. Models such as MLP
indicating fewer prediction errors compared to other mod- and Linear Regression, which do not account for temporal
els. Additionally, the high R2 values obtained by this model dependencies as effectively as recurrent models, consistently
demonstrated its ability to explain a substantial portion of demonstrated higher error percentages and lower predictive
the variance in stock prices. In contrast, the GRU, MLP capabilities.

24828 VOLUME 13, 2025


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

FIGURE 8. (a) Differences in MSE values for each of the nine selected stocks across the five implemented models.
(b) Differences in RMSE values for each of the nine selected stocks across the five implemented models. (c) Differences
in MAE values for each of the nine selected stocks across the five implemented models. (d) Differences in R 2 values for
each of the nine selected stocks across the five implemented models.

The results highlight that the LSTMGC model, which inte- in predicting energy stock prices. The spatial relationships
grates both spatial (inter-stock relationships) and temporal captured through graph convolution layers provide a distinct
(time series) data, is significantly more robust and effective advantage over models that rely solely on time-series data

VOLUME 13, 2025 24829


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

FIGURE 9. Results for different models applied to six other stock: (a) SHEL, (b) RYDAF, (c) TTFNF, (d) TTE, (e) COP, (f) PBR-A, (g) PBR.

or linear relationships. To further illustrate the comparative prices using a hybrid approach that combines GCN with
performance, charts depicting the results of different models LSTM networks. Energy stock prices are influenced by
for a sample of 10 stocks out of 50 are presented in the numerous factors, such as geopolitical events, commodity
following sections. price volatility and sector-specific developments, making
In the previous sections, a detailed analysis of the fore- accurate forecasting a significant challenge. Our approach
casted prices for each of the three selected stocks using aimed to address this complexity by leveraging graph
the five mentioned models was presented, along with corre- convolution layers to capture inter-stock relationships and
sponding comparative charts. To further evaluate the predic- LSTM layers to model temporal dependencies in stock price
tive performance of the proposed model for the ten stocks data.
analyzed (as shown in Fig.8), a comparison chart illustrating A comprehensive comparison with other models, including
the model results for six additional stocks is provided below LR, GRU, MLP and standalone LSTM, demonstrated that the
(Fig.9).Conclusion LSTMGC model consistently outperformed the alternatives
The primary goal of this study was to develop and eval- in terms of prediction accuracy. Specifically, the LSTMGC
uate a robust predictive model for forecasting energy stock model exhibited lower error rates and higher R2 values,

24830 VOLUME 13, 2025


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

indicating superior capability in explaining the variance in of multiple methods. Such a hybrid approach could miti-
stock price data. The key advantage of the LSTMGC model gate the limitations inherent in individual models, improving
lies in its ability to capture interdependencies among various overall reliability and performance under various market
stocks. Unlike traditional models that treat each stock as an conditions.
isolated time series, our approach utilized DTW to represent Finally, adjusting the time horizons and data granularity
inter-stock relationships in the form of a correlation matrix. used for model training and prediction could yield valuable
This enabled the model to deliver more precise predictions by insights. Exploring higher-resolution data, such as hourly
incorporating spatial and temporal information. or minute-level data, alongside varying prediction horizons,
Despite these promising results, the study revealed certain would allow the model to cater to the needs of both short-term
limitations, particularly in highly volatile market conditions and long-term investors. Understanding how these param-
or during sudden geopolitical shocks. While the LST- eters influence prediction accuracy could refine the model
MGC model performed well across most scenarios, further further for practical applications and provide tailored solu-
improvements are required to enhance its robustness and pre- tions for diverse investment strategies.
dictive power under such extreme conditions. This research
underscores the potential of hybrid deep learning approaches, REFERENCES
like LSTMGC, in financial forecasting and highlights future [1] A. A. Ariyo, A. O. Adewumi, and C. K. Ayo, ‘‘Stock price prediction
opportunities for refining and expanding their application in using the ARIMA model,’’ in Proc. UKSim-AMSS 16th Int. Conf. Comput.
Model. Simul., Mar. 2014, pp. 106–112.
dynamic and complex markets.
[2] Z. Zhang, ‘‘An empirical study of Shanghai composite index forecasts and
trend trading strategies based on ARIMA model,’’ Adv. Econ., Manage.
VI. FUTURE DIRECTIONS Political Sci., vol. 65, no. 1, pp. 302–308, Dec. 2023, doi: 10.54254/2754-
While this study successfully demonstrated the effectiveness 1169/65/20231677.
[3] S. Dong and A. Wang, ‘‘Systematic optimization of long short-term
of combining GCN and LSTM for energy stock price predic- memory model for predicting NYSE arca airline index (XAL) dur-
tion, there remain several promising avenues for future explo- ing COVID-19,’’ J. Student Res., vol. 10, no. 1, Mar. 2021, doi:
ration and enhancement to improve prediction accuracy and 10.47611/jsrhs.v10i1.1297.
[4] K. E. Hoque and H. Aljamaan, ‘‘Impact of hyperparameter tuning on
broaden the applicability of the model. One significant limita- machine learning models in stock price forecasting,’’ IEEE Access, vol. 9,
tion of the current approach is its reliance solely on historical pp. 163815–163830, 2021, doi: 10.1109/ACCESS.2021.3134138.
stock price data. Stock prices are also influenced by external [5] Y. Sun, S. Mutalib, N. Omar, and L. Tian, ‘‘A novel integrated approach
factors, including market sentiment, news, and social media for stock prediction based on modal decomposition technology and
machine learning,’’ IEEE Access, vol. 12, pp. 95209–95222, 2024, doi:
trends. Incorporating sentiment analysis derived from news 10.1109/ACCESS.2024.3425727.
articles, financial reports, and social media platforms could [6] L. Bacco, L. Petrosino, D. Arganese, L. Vollero, M. Papi, and M. Merone,
provide valuable insights into the impact of public perception ‘‘Investigating stock prediction using LSTM networks and sentiment anal-
ysis of tweets under high uncertainty: A case study of North American and
on stock price movements. By integrating such alternative European banks,’’ IEEE Access, vol. 12, pp. 122239–122248, 2024, doi:
data sources, especially during periods of market uncer- 10.1109/ACCESS.2024.3450311.
tainty, the model’s predictive power could be significantly [7] G. Mu, N. Gao, Y. Wang, and L. Dai, ‘‘A stock price prediction
model based on investor sentiment and optimized deep learning,’’ IEEE
enhanced. Another area of potential improvement lies in gen- Access, vol. 11, pp. 51353–51367, 2023, doi: 10.1109/ACCESS.2023.
eralizing the model to different portfolios beyond the energy 3278790.
sector. This study focused specifically on energy stocks, [8] R. Zhang and V. Y. Mariano, ‘‘Integration of emotional factors with
GAN algorithm in stock price prediction method research,’’ IEEE
but applying the LSTMGC model to other sectors such as Access, vol. 12, pp. 77368–77378, 2024, doi: 10.1109/ACCESS.2024.
technology, healthcare, or consumer goods would test its 3406223.
adaptability and generalizability. Investigating cross-sector [9] T. Sidogi, W. T. Mongwe, R. Mbuvha, P. Olukanmi, and T. Marwala,
‘‘A signature transform of limit order book data for stock price
dependencies and sector-specific dynamics could provide a
prediction,’’ IEEE Access, vol. 11, pp. 70598–70609, 2023, doi:
more comprehensive evaluation of the model’s versatility and 10.1109/ACCESS.2023.3293064.
validate its performance across diverse market conditions. [10] N. Fitriani, A. Minanurohman, and G. L. Firmansah, ‘‘Financial ratio
Further, enriching the graph structure used in this study with analysis in stock price: Evidence from Indonesia,’’ Jurnal ASET (Akuntansi
Riset), vol. 14, no. 2, pp. 285–296, Dec. 2022.
external variables offers a promising direction for future [11] Z. Xiong, ‘‘Fundamental stock analysis in COVID-19 vaccines indus-
research. Factors such as commodity prices, macroeconomic try,’’ BCP Bus. Manage., vol. 38, pp. 1061–1066, Mar. 2023, doi:
indicators, or sector-specific metrics could be incorporated 10.54691/bcpbm.v38i.3827.
[12] R. S. Rawlin and S. S. N. R. Pakalapati, ‘‘Forecasting stock prices of
into the graph correlation matrix to better capture complex select Indian private sector banks—A time series approach,’’ SDMIMD J.
inter-stock dependencies. A more comprehensive repre- Manage., vol. 13, no. 1, p. 35, Mar. 2022, doi: 10.18311/sdmimd/2022/
sentation of these relationships would likely improve the 29270.
[13] E. Dutiva Br. Ginting and S. Matondang, ‘‘Effect of macroeconomic factors
model’s ability to reflect the multifaceted influences on
(exchange, inflation, sbi interest rate, world oil Price) on stock returns
stock prices. Hybrid modeling approaches also present an with profitability as intervening variables in mining sector companies in
intriguing opportunity to enhance the robustness and accu- the Indonesia stock exchange 2015–2019,’’ Int. J. Educ. Res. Social Sci.,
vol. 3, no. 4, pp. 1577–1586, Sep. 2022, doi: 10.51601/ijersc.v3i4.459.
racy of predictions. Combining the LSTMGC framework
[14] S. Shiral and H. Torvi, ‘‘A detail survey on predicting stock price movement
with other predictive techniques, such as Random Forest or based on communication network,’’ Int. J. Comput. Appl., vol. 178, no. 47,
XGBoost, in an ensemble model could leverage the strengths pp. 36–41, Sep. 2019, doi: 10.5120/ijca2019919396.

VOLUME 13, 2025 24831


B. Amiri et al.: Novel Hybrid GCN-LSTM Algorithm for Energy Stock Price Prediction

[15] A. Dwi Miranda, S. Yosmar, and S. Damayanti, ‘‘Application of [35] N. Jing, Z. Wu, and H. Wang, ‘‘A hybrid model integrating deep
fuzzy time series with Fibonacci retracement for forecasting stock learning with investor sentiment analysis for stock price predic-
price PT. Bank rakyat Indonesia,’’ BAREKENG, Jurnal Ilmu Matem- tion,’’ Exp. Syst. Appl., vol. 178, Sep. 2021, Art. no. 115019, doi:
atika dan Terapan, vol. 17, no. 2, pp. 787–796, Jun. 2023, doi: 10.1016/[Link].2021.115019.
10.30598/barekengvol17iss2pp0787-0796. [36] W. Lu, J. Li, Y. Li, A. Sun, and J. Wang, ‘‘A CNN-LSTM-based model
[16] M.-W. Hsu, S. Lessmann, M.-C. Sung, T. Ma, and J. E. V. Johnson, to forecast stock prices,’’ Complexity, vol. 2020, pp. 1–10, Nov. 2020, doi:
‘‘Bridging the divide in financial market forecasting: Machine learners vs. 10.1155/2020/6622927.
fnancial economists,’’ Exp. Syst. Appl., vol. 61, pp. 215–234, Nov. 2016, [37] G. Kumar, U. P. Singh, and S. Jain, ‘‘Hybrid evolutionary intelligent
doi: 10.1016/[Link].2016.05.033. system and hybrid time series econometric model for stock price forecast-
[17] T. Mashadihasanli, ‘‘Stock market price forecasting using the Arima ing,’’ Int. J. Intell. Syst., vol. 36, no. 9, pp. 4902–4935, Sep. 2021, doi:
model: An application to Istanbul, Turkiye,’’ J. Econ. Policy Researches, 10.1002/int.22495.
vol. 9, no. 2, pp. 439–454, Jul. 2022, doi: 10.26650/jepr1056771. [38] D. J. Berndt and J. Clifford, ‘‘Using dynamic time warping to find patterns
[18] M. Bai and Y. Sun, ‘‘An intelligent and social-oriented sentiment in time series,’’ in Proc. 3rd Int. Conf. Knowledge Discovery Data Mining,
analytical model for stock market prediction using machine learn- Seattle, WA, USA, 1994, pp. 359–370.
ing and big data analysis,’’ Artif. Intell. Appl., vol. 26, pp. 213–223, [39] T. Rakthanmanon, B. Campana, A. Mueen, G. Batista, B. Westover,
Oct. 2022. Q. Zhu, J. Zakaria, and E. Keogh, ‘‘Addressing big data time series: Mining
[19] J. Xu and Y. Yang, ‘‘Analysis of stock price prediction in context trillions of time series subsequences under dynamic time warping,’’ ACM
of machine learning models for Tesla,’’ BCP Bus. Manage., vol. 38, Trans. Knowl. Discovery Data, vol. 7, no. 3, pp. 1–31, Sep. 2013, doi:
pp. 317–324, Mar. 2023, doi: 10.54691/bcpbm.v38i.3710. 10.1145/2500489.
[20] Q. Wang, K. Kang, Z. Zhang, and D. Cao, ‘‘Application of LSTM [40] F. Kamalov and H. Sulieman, ‘‘Time series signal recovery methods: Com-
and CONV1D LSTM network in stock forecasting model,’’ Artif. Intell. parative study,’’ in Proc. Int. Symp. Netw., Comput. Commun. (ISNCC),
Adv., vol. 3, no. 1, pp. 36–43, Apr. 2021, doi: 10.30564/aia.v3i1. Oct. 2021, pp. 1–5, doi: 10.1109/ISNCC52172.2021.9615669.
2790.
[21] Y. Peng, ‘‘Prediction and investigation of stock price related to chinas new
energy vehicles after the opening of the pandemic based on the LSTM
model,’’ Appl. Comput. Eng., vol. 22, no. 1, pp. 176–182, Oct. 2023, doi:
10.54254/2755-2721/22/20231213.
[22] Z. Wu, S. Pan, G. Long, J. Jiang, X. Chang, and C. Zhang, ‘‘Connecting
the dots: Multivariate time series forecasting with graph neural networks,’’
BABAK AMIRI received the Ph.D. degree in infor-
in Proc.26th ACM SIGKDD Int. Conf. Knowledge Discovery Data Mining,
2020, pp. 753–763.
mation technology from The University of Sydney,
[23] Y. Song, Q. Kang, S. Wang, Z. Kai, and W. P. Tay, ‘‘On the robustness of in 2014. He is currently an Assistant Professor
graph neural diffusion to topology perturbations,’’ in Proc. Adv. Neural Inf. with Iran University of Science and Technology.
Process. Syst., 2022, pp. 6384–6396. He has published extensively in highly regarded
[24] X. Xiong, D. Zhang, D. Xu, H. Chen, and Q. Xiao, ‘‘A new method scientific journals and has contributed to the
of financial multivariate time series forecasting based on complex advancement of knowledge in fields, such as
network attention mechanism,’’ Res. Square, 2024, doi: 10.21203/[Link]- machine learning and data science. His research
4319238/v1. interests include artificial intelligence, big data
[25] P. Ni, Q. Yuan, R. Khraishi, R. Okhrati, A. Lipani, and F. Medda, analytics, and social computing, with a particular
‘‘Eigenvector-based graph neural network embeddings and trust rating focus on the application of complex network theories to various business and
prediction in Bitcoin networks,’’ in Proc. 3rd ACM Int. Conf. AI Finance, engineering problems.
2022, pp. 27–35.
[26] M. Weber, J. Chen, T. Suzumura, A. Pareja, T. Ma, H. Kanezashi, T. Kaler,
C. E. Leiserson, and T. B. Schardl, ‘‘Scalable graph learning for anti-money
laundering: A first look,’’ 2018, arXiv:1812.00076.
[27] Y. Sakai and S. Inenaga, ‘‘A faster reduction of the dynamic time warping
distance to the longest increasing subsequence length,’’ Algorithmica,
vol. 84, no. 9, pp. 2581–2596, Sep. 2022, doi: 10.1007/s00453-022-00968-
AMIRALI HADDADI received the degree in
2.
industrial engineering from Iran University of
[28] S. Lu, C. Cui, Y. Qian, and J. He, ‘‘Well production forecast post-liquid
lifting measures: A transformer-based Seq2Seq method with attention
Science and Technology, Tehran, Iran. He has
mechanism,’’ Energy Fuels, vol. 38, no. 15, pp. 14072–14084, Aug. 2024, experience working in the machine learning and
doi: 10.1021/[Link].4c02123. AI industry, contributing to various projects and
[29] M. D. Dilmi, L. Barthès, C. Mallet, and A. Chazottes, ‘‘Iterative multiscale companies. His research interests include machine
dynamic time warping (IMs-DTW): A tool for rainfall time series compar- learning, text mining, and financial markets.
ison,’’ Int. J. Data Sci. Analytics, vol. 10, no. 1, pp. 65–79, Jun. 2020, doi:
10.1007/s41060-019-00193-1.
[30] S. Mahajan, ‘‘GT-DTW: Bridging graph theory and dynamic time warping
for complex time series analysis,’’ Authorea Preprints, Tech. Report, 2023,
doi: 10.36227/techrxiv.23967054.v2.
[31] D. Silva and G. Batista, ‘‘Speeding up all-pairwise dynamic time warp-
ing matrix calculation,’’ in Proc. SIAM Int. Conf. Data Mining, 2016,
pp. 837–845.
[32] Z. Yu, Z. Niu, W. Tang, and Q. Wu, ‘‘Deep learning for daily peak load
KOSAR FARAJPOUR MOJDEHI received the
forecasting—Novel gated recurrent neural network combining dynamic
[Link]. degree in mathematics from Alzahra Univer-
time warping,’’ IEEE Access, vol. 7, pp. 17184–17194, 2019, doi:
10.1109/ACCESS.2019.2895604.
sity, Tehran, Iran, in 2020, and the [Link]. degree in
[33] Y. Guo, Y. Li, and Y. Xu, ‘‘Study on the application of LSTM-LightGBM industrial engineering from Iran University of Sci-
model in stock rise and fall prediction,’’ in Proc. MATEC Web Conf., ence and Technology, Tehran, in 2024, with a focus
vol. 336, Jan. 2021, p. 5011, doi: 10.1051/matecconf/202133605011. on information systems. Her research interests
[34] Q. M. Ilyas, K. Iqbal, S. Ijaz, A. Mehmood, and S. Bhatia, ‘‘A hybrid model include credit risk assessment, topological data
to predict stock closing price using novel features and a fully modified analysis, machine learning, and AI algorithms.
Hodrick–Prescott filter,’’ Electronics, vol. 11, no. 21, p. 3588, Nov. 2022,
doi: 10.3390/electronics11213588.

24832 VOLUME 13, 2025

Common questions

Powered by AI

Dynamic Time Warping (DTW) is advantageous in the LSTMGC model because it allows the model to effectively align time series data that may not be perfectly synchronized. This capability enables the model to capture cross-stock dependencies more accurately, even when stock movements are out of phase, leading to a more enriched graph structure with meaningful connections. By incorporating DTW, the LSTMGC model improves its predictive performance over standalone models, evidenced by better metrics such as Mean Squared Error and R-squared values . DTW's dynamic alignment facilitates a more comprehensive representation of inter-stock relationships, contributing to the model's superior accuracy .

The integration of GCNs and LSTMs in the LSTMGC model improves energy stock price prediction by effectively capturing both spatial and temporal dependencies, which traditional models often treat separately or fail to capture comprehensively. GCNs are adept at modeling the spatial dependencies among stocks by constructing a graph where nodes represent stocks, and edges indicate relationships like historical price correlations. This provides a context-rich understanding of market dynamics influenced by factors such as crude oil price fluctuations and geopolitical events . Meanwhile, LSTM networks handle temporal patterns, leveraging their capability to model sequential and long-term data dependencies, further enhanced by an attention mechanism that prioritizes relevant time steps . Integrating these components allows the LSTMGC model to provide more accurate and reliable predictions than models that do not account for these complex interdependencies .

Traditional models like ARIMA are limited in stock price prediction mainly due to their inability to effectively handle non-linear and high-dimensional data commonly encountered in financial markets. ARIMA excels at capturing temporal dependencies but struggles with the complexity introduced by the volatile and non-stationary nature of financial data . Hybrid models address these limitations by combining multiple techniques to improve predictive performance. For example, integrating models like Complete Ensemble Empirical Mode Decomposition (CEEMD), LSTM, and LightGBM can outperform standalone models by providing a more comprehensive analysis of both temporal and non-linear aspects, thus enhancing accuracy and robustness in predictions .

The attention mechanism enhances the predictive accuracy and interpretability of the LSTM component in the LSTMGC model by allowing it to dynamically weigh the importance of different time steps during the sequence modeling process. This capability helps the model focus on the most relevant parts of the data, effectively capturing significant temporal patterns and anomalies that could influence stock prices. As a result, the LSTM becomes better at identifying critical patterns within volatile markets, thus boosting predictive accuracy. Additionally, the attention mechanism aids in interpretability by highlighting which historical data points are deemed essential by the model, providing insight into its decision-making process .

Deploying the LSTMGC model in the energy stock market involves several considerations and practical implications. Firstly, the model offers stakeholders a powerful tool for investment planning and risk management by providing more accurate and reliable forecasts. However, its deployment requires careful calibration and ongoing management to account for market changes and ensure computational efficiency. Practical implications include enhanced strategic planning capabilities due to better prediction accuracy and resilience in the face of complex market dynamics. Additionally, the model's insights into inter-stock relationships and market factors support more precise investment strategies, which can mitigate risks due to sudden market changes .

Despite advancements in machine learning technologies, several challenges persist in stock price prediction models. Key issues include the inherent volatility and non-linearity of stock markets, which complicate accurate forecasting. Additionally, the dynamic interdependencies between stocks pose significant modeling challenges, requiring innovative algorithms capable of balancing computational efficiency with prediction accuracy. Limitations also arise from data quality issues, model interpretability, and scalability. These factors contribute to the complexity of developing robust predictive systems that can effectively integrate complex temporal and relational dynamics, necessary for applications like energy stock prediction .

The LSTMGC model demonstrates superiority over models like GRU, MLP, and standalone LSTM through its integration of both spatial and temporal data, which enhances prediction accuracy and robustness. The model's graph convolutional layers effectively capture spatial inter-stock relationships that standalone models may overlook. At the same time, the attention-enhanced LSTM layers model temporal dependencies and focus on crucial data points. Comparative studies show that the LSTMGC model consistently records lower error rates and higher R-squared values, indicating better performance in explaining variance in stock price data. This integrated approach allows the LSTMGC model to outperform other models in both fitting accuracy and general robustness, particularly in the energy sector .

The LSTMGC model addresses the inherent volatility and non-stationarity of financial markets by combining Graph Convolutional Networks (GCNs) and Long Short-Term Memory (LSTM) networks, enhanced with an attention mechanism. GCNs model spatial relationships between stocks, capturing how stocks influence each other's price movements due to shared sector characteristics or external market factors. This spatial modeling accounts for market co-movements and dependence. LSTM layers, enhanced with attention, process temporal patterns effectively, learning from both short-term fluctuations and long-term dependencies, which is crucial in non-stationary environments. Together, these components provide a robust framework that captures complex interactions and market dynamics, improving prediction robustness and accuracy in volatile conditions .

Sentiment analysis plays a crucial role in enhancing the prediction accuracy of stock prices by incorporating emotional factors into the predictive modeling process. Recent models combine sentiment data, often derived from social media platforms, with traditional financial data to capture the market's psychological aspects that influence stock movements. This integration helps models better anticipate market reactions and trends that are not solely driven by quantitative factors. For instance, sentiment-driven hybrid models that leverage LSTM and other deep learning techniques have shown improvements in prediction accuracy, especially during periods of high uncertainty or significant market events .

Future research directions suggested to enhance hybrid models in financial forecasting include developing methods to improve model robustness under extreme market conditions. This involves addressing challenges such as handling highly volatile markets and sudden geopolitical shocks. Improving model scalability and interpretability remain priorities, as well as integrating additional data sources like alternative data and behavioral insights to enrich the forecasting models. Enhanced computational techniques and algorithms that balance prediction accuracy with efficiency are required for handling increasingly large and complex datasets. Furthermore, exploring new hybrid approaches that incorporate advancements in artificial intelligence and machine learning, such as deep learning and reinforcement learning, can further advance the accuracy and utility of these models in financial forecasting .

You might also like