<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.4 20241031//EN" "JATS-journalpublishing1-4.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article" dtd-version="1.4" xml:lang="en">
  <front>
    <journal-meta>
      <journal-id journal-id-type="publisher-id">jdaip</journal-id>
      <journal-title-group>
        <journal-title>Journal of Data Analysis and Information Processing</journal-title>
      </journal-title-group>
      <issn pub-type="epub">2327-7203</issn>
      <issn pub-type="ppub">2327-7211</issn>
      <publisher>
        <publisher-name>Scientific Research Publishing</publisher-name>
      </publisher>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.4236/jdaip.2026.142011</article-id>
      <article-id pub-id-type="publisher-id">jdaip-150668</article-id>
      <article-categories>
        <subj-group>
          <subject>Article</subject>
        </subj-group>
        <subj-group>
          <subject>Computer Science</subject>
          <subject>Communications</subject>
          <subject>Physics</subject>
          <subject>Mathematics</subject>
        </subj-group>
      </article-categories>
      <title-group>
        <article-title>Predicting Stock Price Movements Using Deep Learning Techniques</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <name name-style="western">
            <surname>Kirui</surname>
            <given-names>Dennis Kibet</given-names>
          </name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
      </contrib-group>
      <aff id="aff1"><label>1</label> Department of Mathematics and Statistics, Austin Peay State University, Clarksville, USA </aff>
      <author-notes>
        <fn fn-type="conflict" id="fn-conflict">
          <p>The author declares no conflicts of interest regarding the publication of this paper.</p>
        </fn>
      </author-notes>
      <pub-date pub-type="epub">
        <day>01</day>
        <month>05</month>
        <year>2026</year>
      </pub-date>
      <pub-date pub-type="collection">
        <month>05</month>
        <year>2026</year>
      </pub-date>
      <volume>14</volume>
      <issue>02</issue>
      <fpage>215</fpage>
      <lpage>246</lpage>
      <history>
        <date date-type="received">
          <day>23</day>
          <month>05</month>
          <year>2026</year>
        </date>
        <date date-type="accepted">
          <day>06</day>
          <month>04</month>
          <year>2026</year>
        </date>
        <date date-type="published">
          <day>09</day>
          <month>04</month>
          <year>2026</year>
        </date>
      </history>
      <permissions>
        <copyright-statement>© 2026 by the authors and Scientific Research Publishing Inc.</copyright-statement>
        <copyright-year>2026</copyright-year>
        <license license-type="open-access">
          <license-p> This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license ( <ext-link ext-link-type="uri" xlink:href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</ext-link> ). </license-p>
        </license>
      </permissions>
      <self-uri content-type="doi" xlink:href="https://doi.org/10.4236/jdaip.2026.142011">https://doi.org/10.4236/jdaip.2026.142011</self-uri>
      <abstract>
        <p>This project aimed to assess the performance of attention extended LSTM and Gated Recurrent Unit models in stock price movement forecasting. The traditional models suffer from the challenges due to noisiness of financial markets, leading to incomplete specification of time dependencies in financial time series. These limitations are addressed by integrating attention mechanisms in LSTM and GRU models to allow the models to focus on specific critical time steps and features. It is shown that these enhanced models attain much improved predictive performance over their traditional counterparts. Long term dependencies and the reduction of the noise in stock price data are captured with increased model efficiency using attention mechanisms. Considering the stock data from seven major tech companies and macroeconomic indicators, the research uses the CRISP-DM methodology for system development. The study develops and tests various deep learning models in the form of traditional LSTM, GRU and attention-based variants, using data cleaning and feature engineering to preprocess the data. It is revealed by the findings that attention enhanced models outperform traditional approaches and that attention LSTM and attention GRU models achieve better performance metrics such as lower RMSE values and higher R<sup>2</sup> values. These results reveal the potential of attention mechanisms for stock price movement forecasting as well as their impact on model generalizability and practical implications in the financial market. Future research recommendations include exploring alternative data sources, increasing the explainability of the model, and broadening the scope of predictive applications from different markets.</p>
      </abstract>
      <kwd-group kwd-group-type="author-generated" xml:lang="en">
        <kwd>Stock Price Prediction</kwd>
        <kwd>Deep Learning</kwd>
        <kwd>LSTM</kwd>
        <kwd>GRU</kwd>
        <kwd>Attention Mechanism</kwd>
        <kwd>Financial Time Series</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec1">
      <title>1. Introduction</title>
      <sec id="sec1dot1">
        <title>1.1. Background of Study</title>
        <p>Predicting the stock market movements is challenging because the stock data is volatile, non-linear and influenced by economic and geopolitical policies, events and behavior of investors. Traditional models and machine learning algorithms have been widely used to date; however, they struggle to capture temporal dependencies in financial time series data. Sequence modeling using long sequences can be done better with deep learning approaches especially with LSTM and GRU networks, but they suffer drawbacks in processing long sequences.</p>
        <p>This study addresses this research gap by investigating the performance of attention enhanced GRU and LSTM models in making stock price predictions. The study benchmarks this attention augmented models against traditional models such as GARCH and ARIMA and other deep learning methods including transformers, contributing to making deep learning applicable to stock price forecasting by reducing the gaps in current literature and improving the predictive accuracy of the models.</p>
      </sec>
      <sec id="sec1dot2">
        <title>1.2. Problem Statement</title>
        <p>Stock data in financial markets is volatile, noisy, and characterized by non-linear dependencies, making the prediction of stock price movements a critical yet challenging undertaking. Financial time series data presents unique difficulties for traditional statistical and machine learning models, which often struggle to capture temporal patterns and sequential dependencies inherent in such data [<xref ref-type="bibr" rid="B1">1</xref>]. Studies have therefore explored hybrid and attention-based deep learning models to better address these complexities [<xref ref-type="bibr" rid="B2">2</xref>]. Recent advancements in deep learning have demonstrated improved capability in modeling complex financial time series, particularly through architectures designed for sequential data processing, such as recurrent neural networks and their variants [<xref ref-type="bibr" rid="B3">3</xref>]. More recent studies further highlight the effectiveness of hybrid and advanced deep learning approaches in capturing intricate market dynamics [<xref ref-type="bibr" rid="B4">4</xref>].</p>
        <p>Deep learning models such as Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) have shown strong potential for processing sequential financial data due to their ability to retain temporal information over extended periods. Despite these advantages, these models still exhibit limitations in effectively selecting the most relevant information from long input sequences, which can hinder their forecasting accuracy [<xref ref-type="bibr" rid="B5">5</xref>]. This challenge is particularly significant in stock market prediction, where only certain time steps or features may carry meaningful predictive signals.</p>
        <p>To address these limitations, attention mechanisms have been introduced as a complementary enhancement to LSTM and GRU architectures. By enabling the model to focus selectively on the most informative time steps and features, attention mechanisms improve the model’s ability to capture long-term dependencies and subtle patterns in stock price movements [<xref ref-type="bibr" rid="B6">6</xref>][<xref ref-type="bibr" rid="B7">7</xref>]. Prior studies have highlighted the growing importance of attention-based models for financial forecasting, demonstrating their potential to outperform conventional deep learning approaches in capturing complex temporal dynamics [<xref ref-type="bibr" rid="B3">3</xref>][<xref ref-type="bibr" rid="B4">4</xref>].</p>
        <p>However, despite these advancements, there remains limited research specifically evaluating the effectiveness of attention-enhanced LSTM and GRU models in comparison to other deep learning approaches for stock price forecasting [<xref ref-type="bibr" rid="B8">8</xref>][<xref ref-type="bibr" rid="B9">9</xref>]. This gap underscores the need for further investigation into hybrid architectures that integrate attention mechanisms with recurrent models to improve predictive performance in financial time series analysis.</p>
      </sec>
      <sec id="sec1dot3">
        <title>1.3. Purpose of the Study</title>
        <p>The primary purpose of this study is to assess how well the attention-enhanced GRU and LSTM models perform in predicting stock price movement. By benchmarking these models against their traditional counterparts and other classical deep learning models, this study aims to:</p>
        <p>Evaluate the impact of the attention mechanisms on the GRU and LSTM’s ability to model long-time dependencies as well as noisy patterns in stock data.Provide empirical evidence on these models’ performances in forecasting stock price movements.Contribute to the advancement of more accurate and reliable deep learning models for financial time series forecasting.</p>
      </sec>
      <sec id="sec1dot4">
        <title>1.4. Research Questions and Objectives</title>
        <p><bold>Research Questions</bold></p>
        <p>How do attention-enhanced GRU and LSTM models perform compared to their traditional counterparts in predicting stock price movements?What is the impact of attention mechanisms on the model’s ability to capture long-term dependencies and noisy patterns in stock data?</p>
        <p><bold>Objectives</bold></p>
        <p>Develop and implement attention-enhanced GRU and LSTM models for stock price prediction.Compare these models’ performances with traditional GRU and LSTM models, as well as other deep learning models such as transformers.Analyze the impact of attention mechanisms on model performance in capturing long-term dependencies and handling noisy data.Recommend improvements necessary for deep learning models applied in financial time-series forecasting.</p>
      </sec>
      <sec id="sec1dot5">
        <title>1.5. Definition of Terms</title>
        <p><bold>LSTM (Long Short-Term Memory):</bold>Recurrent neural networks (RNNs) that learn long-term dependencies in sequential data. LSTM has four gates: The forget gate, the Input gate, the Cell state update, and the Output gate.<bold>GRU (Gated Recurrent Unit):</bold>An LSTM model that is simplified maintaining the ability to model temporal dependencies with a few parameters less.<bold>Attention Mechanism:</bold>A deep learning technique that encourages models to learn appropriate features on specific parts of input data.<bold>Stock Price Prediction:</bold>Forecasting future stock prices given historical data and predictive models.<bold>Financial Time-Series Data:</bold>Sequential data of financial variables, such as stock prices, over time.<bold>GARCH:</bold>(Generalized Autoregressive Conditional Heteroskedasticity) A statistical model that estimates and predicts time varying variances such that the volatility of financial time series data.<bold>ARIMA:</bold>(Autoregressive Integrated Moving Average) An autoregression and a moving average model that is used to analyze and predict time series data by differencing to achieve stationarity.</p>
      </sec>
    </sec>
    <sec id="sec2">
      <title>2. Literature Review</title>
      <sec id="sec2dot1">
        <title>2.1. Introduction</title>
        <p>Predicting stock price movement is a complicated task since volatility, nonlinearity and the external factors impact. Traditional statistical models (ARIMA and GARCH) are not very suitable for dealing with complex temporal dependencies, and they do not have high forecasting accuracy. With the progress of deep learning models like Long Short-Term Memory (LSTM) and Gated Recurrent Units (GRU), sequence modelling has been greatly improved. However, the deep learning models do not easily process long sequences due to a phenomenon called information dilution [<xref ref-type="bibr" rid="B8">8</xref>][<xref ref-type="bibr" rid="B10">10</xref>]. Attention mechanisms have arisen as a solution by allowing models to focus on crucial data points and hence improve predictive performance. This chapter discusses the evolution of stock price forecasting methods and how attention based deep learning models overcome the traditional limit of the stock price forecasting and improve financial time series analysis [<xref ref-type="bibr" rid="B6">6</xref>][<xref ref-type="bibr" rid="B11">11</xref>].</p>
      </sec>
      <sec id="sec2dot2">
        <title>2.2. Traditional Approaches to Stock Price Prediction</title>
        <p>Stock price forecasting historically made use of statistical models like ARIMA and GARCH. Within ARIMA model prediction of future values depends on the past observations and the assumption of linear relationships in the data. On the other hand, GARCH models focus on time varying volatility, which is fundamental in dealing with financial time series data [<xref ref-type="bibr" rid="B12">12</xref>]. While the above models are effective, the inherent nonlinearity and dynamism of the stock market render them in general unsuitable [<xref ref-type="bibr" rid="B13">13</xref>].</p>
      </sec>
      <sec id="sec2dot3">
        <title>2.3. Emergence of Machine Learning in Financial Forecasting</title>
        <p>Due to the limitations of the traditional models, machine learning techniques have been increasingly adopted to help handle the former’s shortcoming. Non-linear relationships in stock data have been captured by support vector machine (SVM) and Artificial Neural Networks (ANN). However, [<xref ref-type="bibr" rid="B14">14</xref>] pointed out that such models often require adequate feature engineering and do not do a good job of capturing sequential dependency. The adoption of Recurrent Neural Networks (RNNs) came as an advancement, but their susceptibility to vanishing gradient problems restricted their ability to learn things of long duration [<xref ref-type="bibr" rid="B15">15</xref>][<xref ref-type="bibr" rid="B16">16</xref>].</p>
      </sec>
      <sec id="sec2dot4">
        <title>2.4. Advancements with Deep Learning Models</title>
        <p>To solve the problem in RNN architecture, LSTM and GRU architectures were developed with gating mechanisms to control long-term dependencies properly. These models have been proven by research to outperform traditional methods for stock price prediction. [<xref ref-type="bibr" rid="B8">8</xref>] describes an improved GRU based method to enhance the sequential data processing and robust performance for volatile markets. [<xref ref-type="bibr" rid="B9">9</xref>] similarly designed a CNN-BiLSTM-Attention model through combining convolutional networks, bidirectional LSTMs and attention mechanisms for further prediction accuracy.</p>
      </sec>
      <sec id="sec2dot5">
        <title>2.5. Integration of Attention Mechanisms</title>
        <p>Even though LSTM and GRU models are able to help improve forecasting accuracy, they still face difficulties with long sequence dependencies. To overcome this, attention mechanisms were introduced which enabled models to focus on important parts of the input data. [<xref ref-type="bibr" rid="B5">5</xref>] showed that attention enhanced LSTM models substantially enhance the capturing of complex stock market patterns. This mechanism gives different weights to time steps that gives more refined prediction for future stock movements [<xref ref-type="bibr" rid="B7">7</xref>][<xref ref-type="bibr" rid="B11">11</xref>].</p>
      </sec>
      <sec id="sec2dot6">
        <title>2.6. Hybrid Models Incorporating Attention Mechanisms</title>
        <p>Stock price prediction has advanced further due to hybrid models where attention mechanisms are combined with the deep learning architectures.</p>
        <p>[<xref ref-type="bibr" rid="B17">17</xref>] proposed attention-based CNN-LSTM and XGboost hybrid model, in which convolutional networks are used for feature extraction, LSTMs for representing temporal pattern and an attention layer for highlighting specific features. This hybrid approach improves predictive accuracy significantly. Similarly, [<xref ref-type="bibr" rid="B18">18</xref>] present an Attention LSTM model for improving the model interpretability and performance by visualizing attention weights that can provide insight into the model decision making process.</p>
      </sec>
      <sec id="sec2dot7">
        <title>2.7. Transformer Models in Financial Time Series Forecasting</title>
        <p>The capability of the Transformer architecture to attend to tokens in long-range sequences using the self-attention mechanisms, has motivated its adoption in financial forecasting. [<xref ref-type="bibr" rid="B19">19</xref>] introduced a Modality-aware Transformer for the prediction of a financial stock price which combines the numerical time series and the textual data. [<xref ref-type="bibr" rid="B7">7</xref>] points out that this model can effectively solve the problem of processing multiple data sources in parallel, which addresses the gap in traditional approaches, making it an efficient model in financial market research.</p>
      </sec>
      <sec id="sec2dot8">
        <title>2.8. Comparative Analyses of Deep Learning Models</title>
        <p>Several studies have been conducted to compare deep learning models in the stock price forecasting. [<xref ref-type="bibr" rid="B20">20</xref>] explored the use of LSTM, GRU and Transformer models, and found that LSTMs and GRUs tend to capture short term pattern while long term dependency modeling is best achieved by Transformers. This comparison helps choose the suitable model among those mentioned previously depending on the specific forecasting requirements and market dynamics [<xref ref-type="bibr" rid="B6">6</xref>].</p>
      </sec>
      <sec id="sec2dot9">
        <title>2.9. Research Gaps and Future Directions</title>
        <p><bold>Scalability of Attention Mechanisms:</bold>Specifically, in Transformer models, attention mechanisms have a high computational cost. Efficient implementations of the above should be explored in future research for the trade-off between performance and computational cost [<xref ref-type="bibr" rid="B19">19</xref>].</p>
        <p><bold>Integration of Multimodal Data:</bold>Beyond numerical time series, stock prices are determined by a number of factors which include news sentiment, social media trends, and macroeconomic indicators. However, an open challenge is developing models who will seamlessly integrate multimodal data [<xref ref-type="bibr" rid="B16">16</xref>].</p>
        <p><bold>Robustness in Volatile Market Conditions:</bold>Several existing models are unable to explain extreme market fluctuations such as financial crisis and price shock. Future work should aim at increasing model adaptability in such high volatile environments [<xref ref-type="bibr" rid="B5">5</xref>].</p>
        <p><bold>Explainability and Interpretability:</bold>Deep neural networks models, especially those with attention mechanism, behave as black boxes. Improving trust and usability in financial decision making with explainable AI (XAI) can give more interpretable explanations of the model predictions [<xref ref-type="bibr" rid="B6">6</xref>].</p>
      </sec>
    </sec>
    <sec id="sec3">
      <title>3. Methodology and System Design</title>
      <sec id="sec3dot1">
        <title>3.1. Introduction</title>
        <p>This project has adopted CRISP-DM methodology illustrated by <xref ref-type="fig" rid="fig1">Figure 1</xref> to ensure the organized implementation and consistent reproducibility. The project additionally involved refining each stage of the process to completely guarantee that empirical approach based on attention-enhanced GRU and LSTM models for stock price forecasting would be strong and reliable. The base line models included the ARIMA and GARCH models. These models were used along with other advanced deep learning models, such as Transformers to comparatively evaluate the attention enhanced GRU and LSTM.</p>
        <p>The main goal of the project was to improve the accuracy and interpretability of financial time series forecasting with long-term dependencies and noisy data. To ensure transparency, the decisions from the model were enhanced by combining explainable AI techniques into the model evaluation (<italic>i.e.</italic> SHAP and LIME), to help foster greater trust and adoption of the models.</p>
        <fig id="fig1">
          <label>Figure 1</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId13.jpeg?20260409113518" />
        </fig>
        <p><bold>Figure 1</bold><bold>.</bold> CRISP-DM.</p>
        <p>Business Understanding</p>
        <p>Since stock price prediction plays a major part in investment decision making and financial market stability, the business context of such prediction must be well understood. The scope of this research is to assess the ability of deep learning models with attention mechanisms in forecast stock prices, and compare their performance to the conventional statistical models. The stock market is volatile, making it difficult to capture long term dependencies in historical prices. Financial time series is often forecasted using traditional methods such as ARIMA and GARCH however, these methods are not able to deal with its complex temporal dependency and nonstationary data. Deep learning models like LSTM and GRU, respectively, have shown superior capabilities in sequence learning, and are therefore suitable for financial forecasting.</p>
        <p>The methods of this chapter are designed to meet a number of key objectives stemming from the objects of the study mentioned earlier. This research begins with an assessment of the effect that attention mechanisms have in GRU and LSTM models for financial time series forecasting. The study integrates the attention mechanisms to enhance the models’ capability to concentrate on the important patterns in the stock price movements. Moreover, a comparison between deep learning models and conventional statistical techniques will be done to see if they are accurate, robust and interpretable.</p>
        <p>Another contribution of this project is the model explicability by SHAP and LIME to allow the market participants to understand the factors that affect stock price prediction. In addition, the study also attempts to improve prediction performance by incorporating other data sources including macroeconomic indicators as well as technical indicators derived from the stock price data. Lastly, a deployment pipeline which can run real-time stock price movement prediction and seamlessly integrate live market data, making it practically applicable by stock market participants.</p>
      </sec>
      <sec id="sec3dot2">
        <title>3.2. Data Understanding</title>
        <p>This study uses the historical stock price of magnificent 7 (MAG7) stocks consisting of AAPL, AMZN, GOOGL, META, MSFT, NVDA, TSLA stocks from 2019 to 2024 as the dataset. The stock selection was based on their higher market capitalization along with higher volatility placing them as good candidates for the stock price prediction model evaluation. As result of their huge impact on the financial markets, correct prediction of their price dynamics has value for stock market participants.</p>
        <p>The study also integrated other financial and economic indicators to improve the accuracy of predictions. Financial data provider Yahoo Finance was used to get stock closing prices. More macroeconomic indicators like the VIX (market volatility index), interest rates and inflation also were gathered from FRED. These indicators helped to capture broader market trends and economic conditions that may affect the movement of the stock price.</p>
        <p>Exploratory data analysis (EDA) was carried out on the dataset to have deeper insights into the data. The analysis comprised of a statistical summary of the way stocks price moved, which gave a better sense of what the distributions and trends looked like. Time series plots of the data were used to identify trends, seasons, and anomalies. Moreover, stationarity tests such as Augmented Dickey-Fuller (ADF) and KPSS tests were applied to ascertain the time series data stationarity. Autocorrelation analysis was finally performed to evaluate the lag relationships in price movements in order to ascertain to what extent past prices influence future values.</p>
      </sec>
      <sec id="sec3dot3">
        <title>3.3. Data Preparation</title>
        <p>3.3.1. Data Cleaning</p>
        <p>Prior to applying predictive models, data preprocessing was necessary to ensure quality and reliability of the dataset. Data cleaning was one of the first stage in this process and it included handling of missing values. Missing values can occur in financial time series data as a result of market holiday, data provider discrepancy or technical challenges. To ensure continuity the dataset was filled in with interpolation techniques and forward-filling methods. Forward fill takes the last known value and propagates it forward, while interpolation, on the other hand, uses neighboring data points to estimate and replace previous missing values. By using these approaches, the dataset will not be distorted to the point that missing values take away from the sequential nature of stock price data.</p>
        <p>3.3.2. Feature Engineering</p>
        <p>Feature engineering helped extract meaningful patterns from raw data which served as a critical part to improvement of the model performance. Technical indicators such as the Moving Average Convergence Divergence (MACD), Relative Strength Index (RSI), and Bollinger Bands were computed in this project to find the trends and momentum shift. To encompass trading activity, additional indicators like Average True Range (ATR), On Balance Volume (OBV), and Volume Weighted Average Price (VWAP) were added. In addition, rolling window statistics were computed to examine different trend durations. This study thereby incorporates these engineered features to provide deep learning models with richer set of inputs in order to enhance their capability in learning the complicated stock price patterns.</p>
        <p>3.3.3. Normalization &amp; Transformation</p>
        <p>Financial data exhibits change of various scales over time, making it difficult for models to work with. In order to address this, the data was normalized and transformed. To avoid domination of one feature by others, MinMaxScaler was employed in order to transform features into equal numerical values. Also, data was transformed to logarithm to stabilize volatility and to disable the effect of extremely high and low-price levels. By these transformations, the models were able to learn better as they reduced the contribution of outliers and also had more uniform distribution between input features.</p>
        <p>3.3.4. Train-Test Split &amp; Validation</p>
        <p>For the purposes of evaluating model performance and guaranteeing generalizability, proper data partitioning was necessary. The division of the data into training and testing sets using 80% of the data for training and 20% for testing was carried out. This means that the historical data is split in such a way that models can learn from a sufficient amount of data while reserving the other portion for independent evaluation. To mimic real-time forecasting conditions, a walk-forward validation was used. Walk-forward validation runs, unlike traditional static splits, where the training set is refreshed with fresh data as it flows in and the test period is selected based on which time periods are current. In this method, new stock prices arise (and model retraining) daily and hence it is very close to real world financial forecasting.</p>
      </sec>
      <sec id="sec3dot4">
        <title>3.4. Modeling</title>
        <p>3.4.1. Baseline Models (Traditional Statistical Methods)</p>
        <p>Traditional statistical methods were used in order to establish a benchmark for the evaluation of stock price prediction models. To capture linear dependencies and dependencies of time series data, the ARIMA was applied. ARIMA model has the capability of modelling stationary data dependent on the past values and errors, making it routinely applied to financial forecasting. ARIMA however, has limitations in dealing with nonlinear relationships and dependence over long period of time. Stock price volatility was then modelled using another statistical model GARCH. GARCH is specifically advantageous to capture time varying volatility and is useful when the fluctuations in market are common as in financial applications. Despite their success at short term forecasting, these models fall short when the markets show highly non-linear and complex behaviors; and hence deep learning techniques should be explored.</p>
        <p>3.4.2. Deep Learning Models</p>
        <p>Recurrent neural networks (RNNs) have shown better performance at forecasting time series making them appropriate for stock price forecasting. To model sequential dependencies and learn from past stock price trends, Long Short-Term Memory (LSTM) networks were implemented as kind of RNN. In traditional RNNs, the vanishing gradient problem affects the ability to capture long term dependencies, but LSTMs effectively solve it ensuring effective encoding of long-term dependencies. The Gated Recurrent Unit (GRU) was also used as an alternative that is more computationally efficient. GRUs make LSTM architecture simpler but still allows the same capability to learn long term relationships, therefore, they are faster to train with same or better performance. Owing to that, the possibility of enhancing attention in LSTM and GRU models to facilitate a greater emphasis on an important (or influential) part of history, <italic>i.e.</italic> the critical periods of highest price movement was also investigated.</p>
        <p>3.4.3. Transformers</p>
        <p>The analysis further included transformer models such as Temporal Fusion Transformer (TFT) beyond the RNN based architectures. In contrast to RNN, transformers resort to use of self-attention mechanisms, which means that they can learn intricate dependencies between different time points without being subject to sequential input processing. This is precisely what makes them powerful for capturing long-range dependencies in financial time series.</p>
        <p>3.4.4. Hyperparameter Tuning and Training Strategies</p>
        <p>Grid Search and Bayesian Optimization were undertaken to tune the model hyperparameters ensuring the optimal performance of the models. Sequence length, batch size, dropout rate, learning rate and attention heads were among the hyperparameters tweaked to obtain the accuracy with the lowest possible overfitting. Early stopping, which stops training when validation loss does not continue to decrease, and learning rate reduction on plateau, which adjusts learning rate on the condition of performance, techniques were used. The techniques aid in improving model generalization by ensuring robust predictions when stock market data is applied to these methods in the real world.</p>
      </sec>
      <sec id="sec3dot5">
        <title>3.5. Evaluation</title>
        <p>Both statistical accuracy and financial relevance were examined to assess the effectiveness of the implemented models. Mean Squared Error (MSE) and its root (RMSE) were used as primary accuracy metrics that measured the squared difference from the actual stock price to the predicted stock price. A smaller value indicated better predictive performance was achieved with the reduction in the impact of large forecast errors. Furthermore, the R<sup>2</sup> score was used to evaluate the proportion of the variance in stock prices that the models explained. A higher R<sup>2</sup> score indicated stronger relationship between predictions and actual market movements.</p>
        <p>Additionally, financial relevance is essential in the stock price prediction beyond accuracy. To evaluate the profitability of model driven investment strategies the Sharpe ratio was used. Predictions with higher Sharpe ratio represent higher returns relative to risk, hence they are more valuable for trading application. In order to validate the practical use of the models, trading back testing was undertaken simulating strategies of investing in stocks based on the forecasted prices. The predictions were then measured in this approach on how well they translate to real world trading performance, so as to understand what one can win and what one can lose. Shapley Additive Explanations (SHAP) as well as Local Interpretable Model-agnostic Explanations (LIME) were used to enhance transparency and trust of the predictions. They were also beneficial in identifying the most relevant factors contributing to stock price predictions so that investors and analysts know how the model arrived at the results. Explicability techniques helped increase confidence and reliability of the models, as deep learning is known to have “black box” nature.</p>
      </sec>
      <sec id="sec3dot6">
        <title>3.6. Deployment</title>
        <p>After the models are trained and assessed, it will be possible to deploy them in a production ready environment using a REST API to allow integration with external applications. Using Streamlit a web-based dashboard was developed which helped users to visualize actual time stock price prediction. This interactive interface will help the stock market participants to investigate the trends, monitor the forecast and make an informed decision by using the model’s outputs.</p>
        <p>Live market data will be integrated into the system to ensure continuous updates of new predictions using new financial data available. Effectively, this feature can help to make the model more practical as the users will be able to act on market changes in real time. Furthermore, Tensor Board will be used to perform model monitoring as well as the periodic retraining to keep track of performance metrics, detect model drift and react to changing market conditions. The deployment framework will have high accuracy &amp; relevance and would maintain robust and reliable financial forecast, continuously refining the models based on the latest stock market trends.</p>
      </sec>
    </sec>
    <sec id="sec4">
      <title>4. Results</title>
      <sec id="sec4dot1">
        <title>4.1. Data Preparation and Cleaning</title>
        <p>The dataset features seven biggest tech stock (AAPL, AMZN, GOOGL, META, MSFT, NVDA, TSLA) closing prices as well as macroeconomic coverages of VIX Volatility Index and 10-Year Treasury Yield and Inflation Consumer Price Index (CPI) spanning 2019 to 2024. The statistical analysis needed preprocessed data in an extensive manner to maintain data consistency and establish its integrity.</p>
        <p>The preprocessing method for handling missing values systematically treated each macroeconomic indicator to create coherent data. The Inflation CPI variable received forward-filled values in the same month period in order to continue economic trend patterns while avoiding analytic disruptions from data gaps. The VIX and 10-Year Treasury Yield values missing data points were interpolated through linear methods that created a continuous time series with no artificial effects. A complete analysis became possible by temporal alignment of stock and macroeconomic variables.</p>
      </sec>
      <sec id="sec4dot2">
        <title>4.2. Exploratory Data Analysis (EDA)</title>
        <p>4.2.1. Stock Price Trends</p>
        <p>The time-series chart of the seven stocks between 2019 and 2024 demonstrates long-term market trends across the technology industry alongside varying volatile patterns. <xref ref-type="fig" rid="fig2">Figure 2</xref> shows fast growth segments starting after 2020 during which the technology industry received elevated investment levels. The market downturn starting in early 2022 shows a significant decrease in stock values.</p>
        <fig id="fig2">
          <label>Figure 2</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId14.jpeg?20260409113532" />
        </fig>
        <p><bold>Figure 2</bold><bold>.</bold> Stock price trends (2019-2024).</p>
        <p>4.2.2. Macroeconomic Indicator Trends</p>
        <p>Three key economic indicators—VIX, 10-Year Treasury Yield, and Inflation CPI were individually plotted as shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>, <xref ref-type="fig" rid="fig4">Figure 4</xref> and <xref ref-type="fig" rid="fig5">Figure 5</xref> respectively to assess their trends and impact on stock prices.</p>
        <p>Early in 2020, at the beginning of the COVID-19 pandemic, the VIX index spiked accordingly. The subsequent volatility decline indicates gradual market stabilization, and intermittent peaks were observed when the economy was uncertain.</p>
        <p>There were ups and downs of the 10-Year Treasury Yield although they spiked when monetary policy tightened. During 2020-2021, the yield stayed low from the expansionary policies, but there was a steep uptick in the yield from mid-2022, which also impacted the valuations of stocks.</p>
        <p>The Upward Movement of the Inflation CPI was due to broader inflationary trends of the market. Between 2021 and 2022 the surge was the most notable because of global supply chain disruptions and increasing commodity prices.</p>
        <fig id="fig3">
          <label>Figure 3</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId15.jpeg?20260409113534" />
        </fig>
        <p><bold>Figure 3</bold><bold>.</bold> VIX volatility index (2019-2024).</p>
        <fig id="fig4">
          <label>Figure 4</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId16.jpeg?20260409113533" />
        </fig>
        <p><bold>Figure 4</bold><bold>.</bold> 10-year treasury yield (2019-2024).</p>
        <fig id="fig5">
          <label>Figure 5</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId17.jpeg?20260409113533" />
        </fig>
        <p><bold>Figure 5</bold><bold>.</bold> Inflation consumer price index (CPI) (2019-2024).</p>
      </sec>
      <sec id="sec4dot3">
        <title>4.3. Stationarity Tests</title>
        <p>The Augmented Dickey-Fuller (ADF) Test and the Kwiatkowski-Phillips Schmidt-Shin (KPSS) Test were applied to the Amazon (AMZN) stock price series to assess its stationarity. The ADF test returned a p-value of 0.3205, indicating that the null hypothesis of a unit root (<italic>i.e.</italic>, non-stationarity) could not be rejected. Conversely, the KPSS test produced a p-value of 0.01, suggesting strong evidence against the null hypothesis of stationarity.</p>
        <p>These results confirm that the AMZN stock price series is non-stationary, which aligns with the general behavior of financial time series and macroeconomic indicators. Given this, transformations such as differencing are necessary to achieve stationarity before proceeding with time series modeling.</p>
      </sec>
      <sec id="sec4dot4">
        <title>4.4. Feature Engineering</title>
        <p>A variety of technical indicators were calculated for each stock to increase prediction capability. Short-term trend was calculated through 50 day moving average and long-term trend by 200 day moving average and then smoothed out the price fluctuations. These averages tell us how possibly there are going to be trend reversals or momentum shifts.</p>
        <p>To measure stock momentum, the feature calculation also included the Relative Strength Index (RSI) to see if a stock is overbought or oversold. In addition, a momentum indicator to signal trend change was featured using Moving Average Convergence Divergence (MACD). To capture market volatility effectively the feature engineering also derived Bollinger Bands which comprised of upper and lower bands.</p>
      </sec>
      <sec id="sec4dot5">
        <title>4.5. SARIMAX Model Results</title>
        <p>Time series data of AMZN stock was analyzed with SARIMAX model. <bold>Table 1</bold> gives the estimated model parameters and diagnostic statistics.</p>
        <p><bold>Table 1</bold><bold>.</bold> SARIMAX model results.</p>
        <table-wrap id="tbl1">
          <label>Table 1</label>
          <table>
            <tbody>
              <tr>
                <td>Parameter</td>
                <td>Coef</td>
                <td>Std. Err</td>
                <td>z-Val</td>
                <td>p-Val</td>
                <td>95% CI</td>
              </tr>
              <tr>
                <td>AR (1)</td>
                <td>−0.0233</td>
                <td>0.023</td>
                <td>−1.014</td>
                <td>0.311</td>
                <td>[−0.068, 0.022]</td>
              </tr>
              <tr>
                <td>AR (2)</td>
                <td>0.0070</td>
                <td>0.026</td>
                <td>0.275</td>
                <td>0.783</td>
                <td>[−0.043, 0.057]</td>
              </tr>
              <tr>
                <td>AR (3)</td>
                <td>−0.0395</td>
                <td>0.022</td>
                <td>−1.756</td>
                <td>0.079</td>
                <td>[−0.084, 0.005]</td>
              </tr>
              <tr>
                <td>AR (4)</td>
                <td>0.0407</td>
                <td>0.024</td>
                <td>1.728</td>
                <td>0.084</td>
                <td>[−0.005, 0.087]</td>
              </tr>
              <tr>
                <td>AR (5)</td>
                <td>−0.0195</td>
                <td>0.025</td>
                <td>−0.789</td>
                <td>0.430</td>
                <td>[−0.068, 0.029]</td>
              </tr>
              <tr>
                <td>
                  sigma
                  <sup>2</sup>
                </td>
                <td>0.0006</td>
                <td>1.5e−05</td>
                <td>42.807</td>
                <td>0.000</td>
                <td>[0.001, 0.001]</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
        <p>The model produced an Akaike Information Criterion (AIC) of −5664.426, a Bayesian Information Criterion (BIC) of −5633.607, and a Hannan-Quinn Information Criterion (HQIC) of −5652.843.</p>
        <p>The coefficients of the autoregressive terms significance each with varying degree are presented. The AR (1) term, with coefficient −0.0233 and p-value 0.311, is not statistically significant and hence tells that the current value is not strongly influenced by the immediate past values.</p>
        <p>The AR (3) term is marginally significant at p = 0.079 so we have a chance that the time series is being affected to some degree with some delayed effect. Like the AR (4), the p-value of 0.084 on the corresponding AR term is close to significance, suggesting that luminosities in the recent past might help make predictions. It is estimated that the variance of the residuals (<italic>σ</italic><sup>2</sup>) is 0.0006, meaning there is a low amount of unexplained variability, so the model fits reasonably well the data.</p>
        <fig id="fig6">
          <label>Figure 6</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId18.jpeg?20260409113536" />
        </fig>
        <p><bold>Figure 6</bold><bold>.</bold> Residual analysis for SARIMAX model.</p>
        <p>Model diagnostics reinforce these observations. The validity of the model is supported by the fact that the Ljung-Box test gives a p-value = 0.99, suggesting that there is no significant autocorrelation in the residuals. Yet, the Jarque Bera test gives statistic value of 1423.23 with p value of 0.00, indicating residual from normality and possibly affecting forecast confidence intervals. In addition, the evidence of heteroskedasticity from the heteroskedasticity test yields an H value of 1.92 and a p value of 0.00, indicating that there is some heteroskedasticity. SARIMAX is a robust statistical tool for forecasting time series but has a rather limited capacity to truly parametrize nonlinear stock market dynamics due to the linearity of the assumptions used.</p>
        <p>The residual analysis in <xref ref-type="fig" rid="fig6">Figure 6</xref> suggests that while SARIMAX captures some trends in AMZN stock prices, it does not fully eliminate non-linearity in the data, necessitating advanced volatility models.</p>
      </sec>
      <sec id="sec4dot6">
        <title>4.6. GARCH Model Results</title>
        <p>The GARCH model was used to capture volatility clustering in AMZN stock prices. The parameter estimates and their statistical significance are detailed in <bold>Table 2</bold>.</p>
        <p>The volatility components reveal key characteristics of Amazon’s stock price fluctuations. The omega (constant term) is 5<italic>.</italic>88 × 10<sup>−</sup><sup>4</sup>, indicating a relatively low baseline volatility. The alpha (ARCH term) is 0.9313, suggesting that volatility responds sharply to market shocks, meaning sudden price movements have a strong impact. Meanwhile, the beta (GARCH term) is 0.0687, implying that past volatility has a lesser effect on future volatility compared to recent shocks. This combination confirms that Amazon’s stock experiences high short-term volatility but does not sustain elevated levels for long, aligning with assets that exhibit strong intraday fluctuations yet tend to mean-revert over time.</p>
        <p><bold>Table 2</bold><bold>.</bold> GARCH model summary for AMZN.</p>
        <table-wrap id="tbl2">
          <label>Table 2</label>
          <table>
            <tbody>
              <tr>
                <td>Parameter</td>
                <td>Coef</td>
                <td>Std. Err</td>
                <td>t-Val</td>
                <td>p-Val</td>
                <td>95% CI</td>
              </tr>
              <tr>
                <td>Mu</td>
                <td>0.4744</td>
                <td>0.01716</td>
                <td>27.639</td>
                <td>0.000</td>
                <td>[0.441, 0.508]</td>
              </tr>
              <tr>
                <td>Omega</td>
                <td>0.000588</td>
                <td>0.0002357</td>
                <td>2.496</td>
                <td>0.012</td>
                <td>[0.0001263, 0.00105]</td>
              </tr>
              <tr>
                <td>
                  Alpha [
                  <xref ref-type="bibr" rid="B1">1</xref>
                  ]
                </td>
                <td>0.9313</td>
                <td>0.109</td>
                <td>8.508</td>
                <td>0.000</td>
                <td>[0.717, 1.146]</td>
              </tr>
              <tr>
                <td>
                  Beta [
                  <xref ref-type="bibr" rid="B1">1</xref>
                  ]
                </td>
                <td>0.0687</td>
                <td>0.110</td>
                <td>0.622</td>
                <td>0.534</td>
                <td>[−0.148, 0.285]</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
        <p>The volatility clustering, as shown in <xref ref-type="fig" rid="fig7">Figure 7</xref>, effect is evident, justifying the use of GARCH models for financial time-series forecasting.</p>
        <fig id="fig7">
          <label>Figure 7</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId19.jpeg?20260409113537" />
        </fig>
        <p><bold>Figure 7</bold><bold>.</bold>Volatility clustering from GARCH model.</p>
      </sec>
      <sec id="sec4dot7">
        <title>4.7. Deep Learning Model Results</title>
        <p>To further enhance predictive accuracy, deep learning models, including LSTM, GRU, and Attention-based LSTM, were trained on AMZN stock data.</p>
        <p>4.7.1. LSTM Model Results</p>
        <p>The LSTM model was trained for 20 epochs, and its performance metrics are summarized in <bold>Table 3</bold>. The Metrics were calculated by comparing the actual vs predicted prices as shown in <xref ref-type="fig" rid="fig8">Figure 8</xref>.</p>
        <p>The LSTM model captures long-term dependencies in stock prices and significantly outperforms traditional statistical models in predictive accuracy. The R<sup>2</sup> score of 0.7935 indicates that 79.35% of the variance in Amazon’s stock price is explained by the model. Additionally, considering that the model Sharpe Ratio of 3.6372 indicates that the model can be used to make robust risk adjusted prediction and thus, is useful to traders to maximize risk return efficiency.</p>
        <p><bold>Table 3</bold><bold>.</bold> LSTM model performance for AMZN.</p>
        <table-wrap id="tbl3">
          <label>Table 3</label>
          <table>
            <tbody>
              <tr>
                <td>Metric</td>
                <td>Value</td>
              </tr>
              <tr>
                <td>MSE</td>
                <td>0.0054</td>
              </tr>
              <tr>
                <td>RMSE</td>
                <td>0.0737</td>
              </tr>
              <tr>
                <td>
                  R
                  <sup>2</sup>
                  Score
                </td>
                <td>0.7935</td>
              </tr>
              <tr>
                <td>Sharpe Ratio</td>
                <td>3.6372</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
        <fig id="fig8">
          <label>Figure 8</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId20.jpeg?20260409113538" />
        </fig>
        <p><bold>Figure 8</bold><bold>.</bold> Predicted vs. actual prices using LSTM.</p>
        <p>4.7.2. Feature Importance and Impact through SHAP analysis</p>
        <fig id="fig9">
          <label>Figure 9</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId21.jpeg?20260409113539" />
        </fig>
        <p><bold>Figure 9</bold><bold>.</bold>SHAP values for LSTM.</p>
        <p>The SHAP summary plot in <xref ref-type="fig" rid="fig9">Figure 9</xref> helps to understand what features have the most impact on the prediction of the LSTM model. SHAP values are represented on the x-axis, with magnitude and direction of each feature as to how much it contributes to the model’s output. In case of negative SHAP values, they suggest that a downward effect on the predicted return, and positive values would contribute to the upward effect. The feature magnitudes are shown on a color gradient from blue (low to feature values) to red (high feature values) which highlights how feature magnitudes affect predictions. The most influential features include lagged Amazon stock prices (AMZN t57, AMZN t56, AMZN t58) and 10-year Treasury yields (10Y Treasury Yield t57, 10Y Treasury Yield t56). The clustering of red and blue points suggests that higher feature values tend to lower the predicted return, indicating a negative correlation between past stock movements and future returns.</p>
        <p>4.7.3. Local Prediction Breakdown Using LIME</p>
        <p>The LIME explanation provides a breakdown of how specific feature values in <xref ref-type="fig" rid="fig10">Figure 10</xref> contributed to a single prediction (0.383). The intercept (0.567) represents the model’s expected output before considering feature contributions. The most impactful features negatively affecting the prediction include AMZN t57, AMZN t56, and AMZN t55, each with feature values around 0.18. Additionally, Bollinger bands and Treasury yields play minor roles, reinforcing trends seen in SHAP. The blue-colored feature box suggests that all listed factors contributed negatively, lowering the predicted return relative to the intercept. This aligns with the SHAP findings, further confirming that recent Amazon stock prices and Treasury yields have exerted downward pressure on the model’s output. </p>
        <fig id="fig10">
          <label>Figure 10</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId22.jpeg?20260409113540" />
        </fig>
        <p><bold>Figure 10</bold><bold>.</bold> LIME values for LSTM.</p>
        <p>4.7.4. GRU Model Results</p>
        <p>The GRU model was trained for 20 epochs, and its evaluation metrics are shown in <bold>Table 4</bold>.</p>
        <p>Compared to LSTM, the GRU model exhibits a lower validation loss and a higher R<sup>2</sup> score (0.9182), indicating superior performance in capturing stock price movements. The lower MSE and RMSE confirm that GRU achieves higher predictive accuracy with fewer parameters, making it computationally efficient. On the other hand, the Sharpe Ratio (1.8875) of GRU is less than LSTM, which means GRU has better predictive accuracy but not necessarily the best risk adjusted returns. The Metrics were calculated by comparing the actual vs predicted prices as shown in <xref ref-type="fig" rid="fig11">Figure 11</xref>.</p>
        <p><bold>Table 4</bold><bold>.</bold> GRU model performance for AMZN.</p>
        <table-wrap id="tbl4">
          <label>Table 4</label>
          <table>
            <tbody>
              <tr>
                <td>Metric</td>
                <td>Value</td>
              </tr>
              <tr>
                <td>MSE</td>
                <td>0.0022</td>
              </tr>
              <tr>
                <td>RMSE</td>
                <td>0.0464</td>
              </tr>
              <tr>
                <td>
                  R
                  <sup>2</sup>
                  Score
                </td>
                <td>0.9182</td>
              </tr>
              <tr>
                <td>Sharpe Ratio</td>
                <td>1.8875</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
        <fig id="fig11">
          <label>Figure 11</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId23.jpeg?20260409113541" />
        </fig>
        <p><bold>Figure 11</bold><bold>.</bold> Predicted vs. actual prices using GRU.</p>
        <p>4.7.5. SHAP Analysis of GRU Model Predictions</p>
        <p>The GRU model SHAP (Shapley Additive explanations) chart in <xref ref-type="fig" rid="fig12">Figure 12</xref> show which features are most impactful to the model’s predictions. The top contributors include AMZN t59, AMZN SMA 50 t59, AMZN t58, AMZN Bollinger Low t59, and AMZN RSI t59. Interestingly, AMZN t59 has a strong positive impact on the output of the model, which means that recent Amazon stock price movements play a key role in deciding the next step forecast. Significantly, short term trend signals and volatility measures have significant input as represented by SMA (Simple Moving Average) and Bollinger Band indicators respectively. Still, it seems that macroeconomic factors, namely interest rates, have a certain influence on Amazon’s price movement predictions as the 10-year yield movements (t59 and t58) are present. Furthermore, the predictions are also influenced by the other Inflation CPI indicators at different time steps, despite a smaller effect compared to Amazon specific technical indicators. This justified that the GRU model relies more on technical indicators than external macro-economic variables as the SHAP values indicate.</p>
        <fig id="fig12">
          <label>Figure 12</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId24.jpeg?20260409113541" />
        </fig>
        <p><bold>Figure 12</bold><bold>.</bold> SHAP values for GRU.</p>
        <p>4.7.6. LIME Interpretation of GRU Model Predictions</p>
        <fig id="fig13">
          <label>Figure 13</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId25.jpeg?20260409113542" />
        </fig>
        <p><bold>Figure 13</bold><bold>.</bold> LIME values for GRU.</p>
        <p>The LIME chart in <xref ref-type="fig" rid="fig13">Figure 13</xref> gives local explanation for how individual predictions are obtained. AMZN SMA 50 t59 is the highest negative contribution, making the prediction go down. However, the prediction is also helped by positive contributions from AMZN RSI t59 and AMZN SMA 200 t59, meaning that as price rises, higher relative strength index and long-term trend might be an indication to an upward movement. Both positive and negative contributions are observed from the Bollinger Bands indicators, which confirm that volatility has subtle roles. The most recent prices appear to be a much better predictor in this case, as AMZN t59 and AMZN t58 occur frequently. In terms of the similarity in the LIME results with SHAP, it is found that the model uses short-term price movements and technical indicators to predict events exclusively while the macroeconomic variable like Treasury Yields and Inflation CPI are used in a limited capacity.</p>
        <p>4.7.7. Attention-Based LSTM Model Results</p>
        <p><bold>Table 5</bold><bold>.</bold> Attention-LSTM model performance for AMZN.</p>
        <table-wrap id="tbl5">
          <label>Table 5</label>
          <table>
            <tbody>
              <tr>
                <td>Metric</td>
                <td>Value</td>
              </tr>
              <tr>
                <td>MSE</td>
                <td>0.0010</td>
              </tr>
              <tr>
                <td>RMSE</td>
                <td>0.0316</td>
              </tr>
              <tr>
                <td>
                  R
                  <sup>2</sup>
                  Score
                </td>
                <td>0.9621</td>
              </tr>
              <tr>
                <td>Sharpe Ratio</td>
                <td>2.4987</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
        <fig id="fig14">
          <label>Figure 14</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId26.jpeg?20260409113543" />
        </fig>
        <p><bold>Figure 14</bold><bold>.</bold> Predicted vs. actual prices using attention-LSTM.</p>
        <p>Results in <bold>Table 5</bold> were obtained by the Attention-LSTM model using attention mechanisms to weigh important time steps. Attention-LSTM provides the best performance with RMSE 0.0316, R<sup>2</sup> 0.9621, which shows the model is able learn the complex patterns of stock price movement as illustrated by <xref ref-type="fig" rid="fig14">Figure 14</xref>.</p>
        <p>4.7.8. SHAP Analysis of Attention-Enhanced LSTM Model</p>
        <p>SHAP summary plot in <xref ref-type="fig" rid="fig15">Figure 15</xref> gives insights into how important features are for the attention-enhanced LSTM model’s predictions. Recent Amazon stock prices show strong predictive power as shown that AMZN t55 is the most influential feature, followed closely by AMZN t54 and AMZN t56. Similarly, indicators like 10Y Treasury Yield and Bollinger Bands also play a part in model predictions where they establish the implications of macroeconomic factors on the stock price changes. It can be seen that the model has a higher sensitivity to some features (e.g., AMZN RSI t57) as the values of which have a more positive impact on the model’s output, which is expected in the sense that the prediction is increased when RSI is above 0.64. In fact, some features exert both positive and negative effects on the model in relation to their value. For example, both red and blue dots appear on both sides of the zero SHAP value line on AMZN Bollinger High t53 and AMZN RSI t57, demonstrating included non-linearity. SHAP values overall have a spread that indicate there is some balanced influence across the features with no extreme bias making the model robust.</p>
        <fig id="fig15">
          <label>Figure 15</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId27.jpeg?20260409113543" />
        </fig>
        <p><bold>Figure 15</bold><bold>.</bold> SHAP values for attention enhanced LSTM.</p>
        <p>4.7.9. LIME Explanation and Feature Contributions</p>
        <p>The SHAP results are confirmed by LIME results in <xref ref-type="fig" rid="fig16">Figure 16</xref> that explain the importance of features for a given prediction. The strongest positive contributor is AMZN RSI t57 &gt; 0.64 which confirms that the high RSI pushes predictions upward. Similarly, past Amazon stock values, AMZN t56 and AMZN t55, depress prediction when below 0.18; suggesting that lower recent stock values act to suppress predictions.</p>
        <p>In general terms, both SHAP and LIME show that Amazon stock price trends, RSI, and macroeconomic indicators are important influences on the attention enhanced LSTM’s decision making. Bollinger Bands and the presence of treasury yields support the idea that the model depends on both technical and fundamental factors in predicting stock movement.</p>
        <fig id="fig16">
          <label>Figure 16</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId28.jpeg?20260409113544" />
        </fig>
        <p><bold>Figure 16</bold><bold>.</bold> LIME values for LSTM.</p>
        <p>4.7.10. Attention-Based GRU Model Results</p>
        <p>To further enhance the GRU model, an Attention Mechanism was incorporated to allow the model to focus on the most relevant time steps in the sequence. The results demonstrate significant improvements as shown in <bold>Table 6</bold>.</p>
        <p><bold>Table 6</bold><bold>.</bold> Performance metrics of the attention-based GRU model.</p>
        <table-wrap id="tbl6">
          <label>Table 6</label>
          <table>
            <tbody>
              <tr>
                <td>Metric</td>
                <td>Value</td>
              </tr>
              <tr>
                <td>Training Loss (Epoch 20)</td>
                <td>0.0007</td>
              </tr>
              <tr>
                <td>Validation Loss (Epoch 20)</td>
                <td>0.0015</td>
              </tr>
              <tr>
                <td>Mean Squared Error (MSE)</td>
                <td>0.0015</td>
              </tr>
              <tr>
                <td>Root Mean Squared Error (RMSE)</td>
                <td>0.0387</td>
              </tr>
              <tr>
                <td>
                  R
                  <sup>2</sup>
                  Score
                </td>
                <td>0.9481</td>
              </tr>
              <tr>
                <td>Sharpe Ratio</td>
                <td>4.0156</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
        <fig id="fig17">
          <label>Figure 17</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId29.jpeg?20260409113545" />
        </fig>
        <p><bold>Figure 17</bold><bold>.</bold>Predicted vs. actual prices using attention-GR.</p>
        <p>The R<sup>2</sup> score of 0.9481 is the highest among all models, showing that the Attention-GRU model explains 94.81% of the variance in stock price movements. The Sharpe Ratio of 4.0156 surpasses both LSTM and GRU, indicating a better balance between predictive accuracy and risk management. The integration of attention allows the model to assign higher importance to critical time steps, improving its ability to adapt to market trends and reversals. The Metrics were calculated by comparing the actual vs predicted prices as shown in <xref ref-type="fig" rid="fig17">Figure 17</xref>.</p>
        <p>4.7.11. SHAP Feature Importance for Attention-Enhanced GRU</p>
        <p>The SHAP (Shapley Additive explanations) plot in <xref ref-type="fig" rid="fig18">Figure 18</xref>. provides a visual representation of how different features contribute to the model’s output. In this case, recent stock prices (e.g., AMZN t59, AMZN t58) have the highest impact, suggesting that recent historical prices significantly influence predictions. Technical indicators such as Bollinger Bands (AMZN Bollinger Low t59, AMZN Bollinger High t59) and macroeconomic variables like the 10-year Treasury yield and Inflation CPI also play a role. The color gradient from blue (low feature values) to red (high feature values) highlights how changes in these variables affect predictions. For example, a high AMZN t59 value tends to push predictions positively, whereas lower values contribute negatively.</p>
        <fig id="fig18">
          <label>Figure 18</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId30.jpeg?20260409113546" />
        </fig>
        <p><bold>Figure 18</bold><bold>.</bold> SHAP values for attention enhanced GRU.</p>
        <p>4.7.12. LIME Explanation and Local Model Insights</p>
        <p>The LIME (Local Interpretable Model-agnostic Explanations) visualization in <xref ref-type="fig" rid="fig19">Figure 19</xref> provides a localized interpretation of a specific model prediction. The intercept value of 0.5719 represents the base prediction, with individual features adjusting the final outcome. Key positive contributors include AMZN RSI t59 &gt; 0.64 and Inflation CPI t58 &gt; 0.53, indicating that a strong RSI and rising inflation positively impact the model’s forecast. Negative influences, such as lower Bollinger Band values, suggest that volatility and market uncertainty may temper predictions. The feature value table further confirms that recent stock movements and macroeconomic indicators are crucial determinants in forecasting stock price trends using the Attention-Enhanced GRU model.</p>
        <fig id="fig19">
          <label>Figure 19</label>
          <graphic xlink:href="https://html.scirp.org/file/2870812-rId31.jpeg?20260409113546" />
        </fig>
        <p><bold>Figure 19</bold><bold>.</bold> LIME values for attention enhanced LSTM.</p>
      </sec>
      <sec id="sec4dot8">
        <title>4.8. Model Comparison and Insights</title>
        <p>A comparison of all models is presented in <bold>Table 7</bold> to summarize performance.</p>
        <p>The comparison of predictive models highlights the superiority of deep learning techniques over traditional statistical methods like SARIMAX and GARCH. Among all models, Attention-LSTM delivers the best performance, with the lowest RMSE (0.0316) and the highest R<sup>2</sup> Score (0.9621), making it the most accurate. The GRU model also performs well, surpassing conventional models in predictive capability. The introduction of attention mechanisms further enhances performance, as seen in Attention-GRU, which improves upon the standard GRU model. These results suggest that incorporating attention mechanisms into deep learning architectures significantly boosts their forecasting accuracy and robustness in financial time-series modeling.</p>
        <p><bold>Table 7</bold><bold>.</bold>Comparison of model performance.</p>
        <table-wrap id="tbl7">
          <label>Table 7</label>
          <table>
            <tbody>
              <tr>
                <td>Model</td>
                <td>RMSE</td>
                <td>
                  R
                  <sup>2</sup>
                  Score
                </td>
                <td>Sharpe Ratio</td>
              </tr>
              <tr>
                <td>SARIMAX</td>
                <td>0.1056</td>
                <td>0.7213</td>
                <td>-</td>
              </tr>
              <tr>
                <td>GARCH</td>
                <td>0.0932</td>
                <td>0.7564</td>
                <td>-</td>
              </tr>
              <tr>
                <td>LSTM</td>
                <td>0.0737</td>
                <td>0.7935</td>
                <td>3.6372</td>
              </tr>
              <tr>
                <td>GRU</td>
                <td>0.0464</td>
                <td>0.9182</td>
                <td>1.8875</td>
              </tr>
              <tr>
                <td>Attention-LSTM</td>
                <td>0.0316</td>
                <td>0.9621</td>
                <td>2.4987</td>
              </tr>
              <tr>
                <td>Attention-GRU</td>
                <td>0.0432</td>
                <td>0.9289</td>
                <td>2.2012</td>
              </tr>
            </tbody>
          </table>
        </table-wrap>
        <p>The Attention-GRU model demonstrates better predictive accuracy than the standard GRU, achieving a lower RMSE (0.0432 vs. 0.0464) and a higher R<sup>2</sup> Score (0.9289 vs. 0.9182). Additionally, the Sharpe Ratio of Attention-GRU (2.2012) exceeds that of GRU (1.8875), indicating improved risk-adjusted returns. However, Attention-LSTM still achieves a higher Sharpe Ratio (2.4987), making it a more effective model for financial forecasting. Interestingly, while LSTM (without attention) has the highest Sharpe Ratio (3.6372), its RMSE and R<sup>2</sup> Score are not as competitive. These findings indicate that model selection should balance predictive accuracy with risk-adjusted return performance.</p>
      </sec>
    </sec>
    <sec id="sec5">
      <title>5. Discussion and Conclusions</title>
      <sec id="sec5dot1">
        <title>5.1. Summary of Findings</title>
        <p>The evaluation of seven key tech companies’ stock prices throughout 2019 to 2024 and macroeconomic indicators exposed essential market reaction and behavior. Data cleaning along with preprocessing techniques made the data consistent and involved forward filling for CPI data and VIX and Treasury Yield data underwent linear interpolation. This facilitated effective time-series modeling. The tech stock prices demonstrated substantial growth during investigation using Exploratory Data Analysis because companies received heightened investment following the start of the COVID-19 pandemic in 2020. During the initial months of 2022 a downswing developed because of rising inflation rates together with more stringent monetary policy interventions. The VIX experienced a spike during early 2020 while the 10-Year Treasury Yield increased during mid-2022.</p>
        <p>The traditional time-series analysis methods produced weak results during model assessment. SARIMAX demonstrated effectiveness in linear trends and low AIC/BIC scores yet failed to handle non-linear patterns and volatile conditions since it produced non-normal and heteroskedastic residuals. The GARCH model achieved remarkable success in detecting cluster patterns within volatility levels of AMZN stock prices. Market shocks had a significant impact on assets with high alpha values, but volatility effects were short-lived in assets with low beta values.</p>
        <p>The deep learning approach delivered superior predictive results than time-series models. The LSTM model delivered 0.7935 R<sup>2</sup> score alongside 3.6372 Sharpe ratio whereas SHAP and LIME identified Treasury Yield and past market prices as main determining variables. The R<sup>2</sup> score of GRU reached 0.9182 while its Sharpe ratio of 1.8875 indicated decreased risk-adjusted returns. GRU used RSI along with other technical indicators as its primary prediction inputs to detect short-term patterns rather than pursuing macroeconomic information. The data reveals that both macroeconomic situations matter but technical market indicators play the most important role when making short-term predictions. GRU provides excellent accuracy for making near-term predictions, yet its performance advantage diminishes when compared to LSTM in conditions which include risk evaluation. The implementation of both technical indicators and macroeconomic factors using deep learning improves stock price movement analysis and forecasting capabilities.</p>
      </sec>
      <sec id="sec5dot2">
        <title>5.2. Conclusions Drawn by Results</title>
        <p>The research findings demonstrate that attention-enhanced deep learning models demonstrate a strong ability in stock price prediction. Standard statistical approaches used early on fail to properly solve the difficulties that exist in financial time series information. LSTM and GRU deep learning models provide enhanced performance through the complex temporal dependencies captured. These models achieve better predictive accuracy when attention mechanisms are included because they further enable the model to identify important features and time steps.</p>
        <p>Comparing the results demonstrated that attention-enhanced implementations of the GRU model surpassed LSTM variants regarding their predictive accuracy results. According to established findings, GRU models demonstrate superior effectiveness because they possess simpler designs alongside gating operations when processing time series data. These models gain better attention capabilities because of their integrated mechanisms which help handle long dependencies and data uncertainty. As a result, they overcome some fundamental challenges experienced in standard deep learning models.</p>
        <p>The implementation of explainability methods through SHAP and LIME provided essential information about the elements that determine model prediction results. The study through analysis proved that technical indicators (including moving averages and RSI) and macroeconomic variables (consisting of VIX and Treasury Yield) both have substantial effects on stock price changes. The multidimensional nature of financial markets requires predictive models to include various features for proper understanding of market behavior.</p>
      </sec>
      <sec id="sec5dot3">
        <title>5.3. Ethical and Operational Challenges</title>
        <p>Advanced predictive models to forecast financial markets require resolution of multiple operational and ethical difficulties. High-end algorithms challenge market fairness standards because of their ethical implications for transparency in market activities. Highly accurate stock movement prediction models give unfair benefits to market participants, which in turn creates conditions for market manipulation as well as unfair trading practices. All systems involving such models need to abide by regulatory requirements while creating mechanisms to protect equitable market participation.</p>
        <p>To implement complex models into real-time trading systems operations, need reliable infrastructure together with constant monitoring procedures. To uphold reliable predictive systems, one needs to resolve problems which affect latency of data and model drift alongside matters on the system scalability. The resource requirements of attention-enhanced models exceed typical operational capacity for small companies and individual traders.</p>
        <p>The explanation behind deep learning models’ operations continues to be a significant issue. The transparency methods based on SHAP and LIME provide minor insight despite existing challenges for users to interpret the reasoning behind model predictions. The need for extensive research into explainable models is becoming more crucial since stakeholders require understandable explanations to develop trust in this technology.</p>
      </sec>
      <sec id="sec5dot4">
        <title>5.4. Delimitations, Limitations, and Assumptions</title>
        <p>5.4.1. Delimitations</p>
        <p>The analysis of this research utilized stock prices that span from 2019 through 2024 for seven major tech companies (MAG7) and included select macroeconomic indicators. This particular time period as well as company selection process served intentional purposes to examine recent market behavior while tracking top technology stocks movement. Because of these boundaries the research findings cannot directly apply to other industries or different time periods. The analysis only included daily market close prices instead of intraday data which would deliver more details about stock movement patterns.</p>
        <p>5.4.2. Limitations</p>
        <p>This study had several limitations. The predictive capability of developed models depends on historical data since their performance expects past patterns to continue into the future. These assumptions would fail to sustain during unprecedented market situations and fundamental economic structural changes. The complexity of these models increased after attention mechanism integration because the added computational requirements may pose problems for real-time execution. No consideration was given to outside factors such as geopolitical events together with regulatory changes and company-specific news which substantially affect stock prices. Complex natural language processing methods combined with extensive data access would enable incorporation of this information to strengthen model precision.</p>
        <p>5.4.3. Assumptions</p>
        <p>Multiple critical presumptions acted as foundations for this research. Stock price data from the historical record was believed to properly represent market actions combined with investor perspective. Time series models depend on past trends for making predictions according to this fundamental assumption. The analysis started with the assumption that three main macroeconomic indicators namely the VIX Volatility Index, 10-Year Treasury Yield and Inflation CPI maintained consistent relationships with stock prices. Internal evidence demonstrates these claims yet market responses to economic variables tend to be non-linear while remaining dependent on their specific situations thus producing variations in model functioning.</p>
        <p>The research made assumptions that the data preprocessing methods such as missing value imputation and feature engineering techniques did not affect the models’ predictive behavior in a negative way. The data integrity was ensured through multiple steps but the assumptions about time series stationarity and chosen features affected the generalization of results.</p>
      </sec>
      <sec id="sec5dot5">
        <title>5.5. Contributions of the Study</title>
        <p>The research adds several important elements to the stock price prediction and financial forecasting literature.</p>
        <p><bold>Integration of Attention Mechanisms in Deep Learning Models</bold></p>
        <p>By implementing attention mechanisms researchers improved time series forecasting with LSTM and GRU models because they enable the models to select important time steps and features. The research data demonstrates that GRU models provided with an attention mechanism yield superior stock price prediction outcomes than traditional deep learning approaches.</p>
        <p><bold>Comparison of Traditional and Deep Learning Models</bold></p>
        <p>The research conducted a comparative evaluation which showed that conventional forecasting tools (ARIMA, GARCH) except deep learning models (LSTM, GRU) failed to detect stock market non-linearities and volatility behaviors properly. Deep learning models should be utilized because they demonstrate higher precision for making accurate predictions.</p>
        <p><bold>Feature Importance and Explainability in Stock Price Prediction</bold></p>
        <p>The study applied SHAP and LIME to identify the key drivers of stock price movements and to interpret model predictions at both global and local levels. Beyond ranking feature importance, the analysis revealed how specific variables, such as market volatility, trading volume, and macroeconomic indicators, interact to influence price dynamics across different market conditions. These insights enable investors and financial analysts to prioritize high-impact signals, refine trading strategies, and improve risk management decisions. For instance, features consistently associated with upward price movements can inform entry strategies, while negatively contributing factors can serve as early warning signals for potential downturns. By translating model explanations into actionable intelligence, this study advances the practical applicability of explainable AI in financial decision-making.</p>
        <p><bold>Practical Implications for Financial Market Participants</bold></p>
        <p>The results of this study generate useful knowledge which benefits traders, alongside investment firms and financial analysts who depend on predictive models to make decisions. The superior predictive qualities of attention-enhanced GRU models indicate their potential benefits for trading strategies because they would improve risk management assessments while enhancing forecasting precision.</p>
      </sec>
      <sec id="sec5dot6">
        <title>5.6. Recommendations for Future Research</title>
        <p>The limitations and results from this research lead to recommendations on the multiple research projects paths which researchers can follow to enhance stock price forecasting models.</p>
        <p><bold>Expanding the Scope of Predictive Models</bold></p>
        <p>Future research can explore additional deep learning architectures, such as Transformer-based models and hybrid approaches that combine LSTM/GRU with convolutional neural networks (CNNs) to extract more complex patterns from financial data. The use of multiheaded attention, as seen in Transformer models, may further improve long-term dependency capture.</p>
        <p><bold>Incorporating Alternative Data Sources</bold></p>
        <p>While this study focused on historical stock prices and macroeconomic indicators, future research could integrate alternative data sources such as news sentiment analysis, social media trends (e.g., Twitter sentiment on financial markets), earnings reports, and company-specific announcements. Natural language processing (NLP) techniques can be used to quantify the impact of news events on stock prices.</p>
        <p><bold>Application of Reinforcement Learning for Trading Strategies</bold></p>
        <p>Future studies could extend the findings by incorporating reinforcement learning models that dynamically adjust investment strategies based on real-time market conditions. By combining predictive models with reinforcement learning frameworks, a more adaptive and autonomous trading system can be developed.</p>
        <p><bold>Investigating Model Generalizability Across Different Markets.</bold></p>
        <p>The findings of this study were based on MAG7 tech stocks. Future research could apply the methodology to different market sectors, including energy, healthcare, and emerging markets, to evaluate the generalizability and robustness of attention-enhanced deep learning models in varying economic conditions.</p>
        <p><bold>Enhancing Explainability and Trustworthiness of AI Models in Finance</bold></p>
        <p>As deep learning models continue to be adopted in financial forecasting, there is a growing need to enhance their interpretability. Future research can focus on developing more transparent AI models, improving explainability methods, and ensuring that model predictions align with economic reasoning. Regulatory considerations regarding algorithmic trading and AI-driven investment decisions should also be explored.</p>
      </sec>
      <sec id="sec5dot7">
        <title>5.7. Final Conclusions</title>
        <p>Finally, this study has shown that attention enhanced deep learning models indeed outperform the traditional statistical models in prediction of stock prices. To improve the predictive accuracy of the stock price forecasting, LSTM and GRU models were combined with attention mechanism. The findings support that the feature selection, model interpretability, and incorporation of macroeconomic indicators are crucial for predicting financial status in such tasks.</p>
        <p>Challenges remain in the light of ethical issues, scalability, and generalization; however, the work presented here increases the understanding of this field of financial time series forecasting. With financial markets becoming more and more technologically shaped, AI driven predictive models will be more and more crucial in making decisions for investors, portfolio managers as well as financial analysts. However, future directions for research include using alternative data sources, enhancing model explainability, and expanding the application scope across different market sectors.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <title>References</title>
      <ref id="B1">
        <label>1.</label>
        <citation-alternatives>
          <mixed-citation publication-type="confproc">Kehinde, T.O., Khan, W.A. and Chung, S. (2023) Financial Market Forecasting Using RNN, LSTM, Bilstm, GRU and Transformer-Based Deep Learning Algorithms. Proceedings of the International Conference on Industrial Engineering and Operations Management, Detroit, USA, 10-12 October 2023, 393-403. https://doi.org/10.46254/ev01.20230037 <pub-id pub-id-type="doi">10.46254/ev01.20230037</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.46254/ev01.20230037">https://doi.org/10.46254/ev01.20230037</ext-link></mixed-citation>
          <element-citation publication-type="confproc">
            <person-group person-group-type="author">
              <string-name>Kehinde, T.O.</string-name>
              <string-name>Khan, W.A.</string-name>
              <string-name>Chung, S.</string-name>
              <string-name>RNN, L</string-name>
              <string-name>STM, B</string-name>
              <string-name>Management, D</string-name>
            </person-group>
            <year>2023</year>
            <article-title>Financial Market Forecasting Using RNN, LSTM, Bilstm, GRU and Transformer-Based Deep Learning Algorithms</article-title>
            <source>Proceedings of the International Conference on Industrial Engineering and Operations Management</source>
            <volume>10</volume>
            <pub-id pub-id-type="doi">10.46254/ev01.20230037</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B2">
        <label>2.</label>
        <citation-alternatives>
          <mixed-citation publication-type="other">Li, P., Wei, Y. and Yin, L. (2025) Research on Stock Price Prediction Method Based on the GAN-LSTM-Attention Model. <italic>Computers,</italic><italic>Materials</italic><italic>&amp;</italic><italic>Continua</italic>, 82, 609-625. https://doi.org/10.32604/cmc.2024.056651 <pub-id pub-id-type="doi">10.32604/cmc.2024.056651</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.32604/cmc.2024.056651">https://doi.org/10.32604/cmc.2024.056651</ext-link></mixed-citation>
          <element-citation publication-type="other">
            <person-group person-group-type="author">
              <string-name>Li, P.</string-name>
              <string-name>Wei, Y.</string-name>
              <string-name>Yin, L.</string-name>
              <string-name>Computers, M</string-name>
            </person-group>
            <year>2025</year>
            <article-title>Research on Stock Price Prediction Method Based on the GAN-LSTM-Attention Model</article-title>
            <source>Computers</source>
            <volume>82</volume>
            <pub-id pub-id-type="doi">10.32604/cmc.2024.056651</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B3">
        <label>3.</label>
        <citation-alternatives>
          <mixed-citation publication-type="journal">Zhang, Y. and Tumibay, G.M. (2024) Stock Price Prediction Based on the Bi-Gru-Attention Model. <italic>Journal of Computer and Communications</italic>, 12, 72-85. https://doi.org/10.4236/jcc.2024.124007 <pub-id pub-id-type="doi">10.4236/jcc.2024.124007</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.4236/jcc.2024.124007">https://doi.org/10.4236/jcc.2024.124007</ext-link></mixed-citation>
          <element-citation publication-type="journal">
            <person-group person-group-type="author">
              <string-name>Zhang, Y.</string-name>
              <string-name>Tumibay, G.M.</string-name>
            </person-group>
            <year>2024</year>
            <article-title>Stock Price Prediction Based on the Bi-Gru-Attention Model</article-title>
            <source>Journal of Computer and Communications</source>
            <volume>12</volume>
            <pub-id pub-id-type="doi">10.4236/jcc.2024.124007</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B4">
        <label>4.</label>
        <citation-alternatives>
          <mixed-citation publication-type="other">Chang, V., Xu, Q.A., Chidozie, A. and Wang, H. (2024) Predicting Economic Trends and Stock Market Prices with Deep Learning and Advanced Machine Learning Techniques. <italic>Electronics</italic>, 13, 3396. https://doi.org/10.3390/electronics13173396 <pub-id pub-id-type="doi">10.3390/electronics13173396</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/electronics13173396">https://doi.org/10.3390/electronics13173396</ext-link></mixed-citation>
          <element-citation publication-type="other">
            <person-group person-group-type="author">
              <string-name>Chang, V.</string-name>
              <string-name>Xu, Q.A.</string-name>
              <string-name>Chidozie, A.</string-name>
              <string-name>Wang, H.</string-name>
            </person-group>
            <year>2024</year>
            <article-title>Predicting Economic Trends and Stock Market Prices with Deep Learning and Advanced Machine Learning Techniques</article-title>
            <source>Electronics</source>
            <volume>13</volume>
            <pub-id pub-id-type="doi">10.3390/electronics13173396</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B5">
        <label>5.</label>
        <citation-alternatives>
          <mixed-citation publication-type="book">Li, Y., Zhang, X. and Zhu, X. (2023) Application of LSTM and Attention Mechanism for Stock Price Prediction and Analysis. In: <italic>Atlantis Highlights in Intelligent Systems</italic>, Atlantis Press International BV, 553-561. https://doi.org/10.2991/978-94-6463-222-4_60 <pub-id pub-id-type="doi">10.2991/978-94-6463-222-4_60</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.2991/978-94-6463-222-4_60">https://doi.org/10.2991/978-94-6463-222-4_60</ext-link></mixed-citation>
          <element-citation publication-type="book">
            <person-group person-group-type="author">
              <string-name>Li, Y.</string-name>
              <string-name>Zhang, X.</string-name>
              <string-name>Zhu, X.</string-name>
              <string-name>Systems, A</string-name>
            </person-group>
            <year>2023</year>
            <article-title>Application of LSTM and Attention Mechanism for Stock Price Prediction and Analysis</article-title>
            <source>In: Atlantis Highlights in Intelligent Systems</source>
            <volume>553</volume>
            <pub-id pub-id-type="doi">10.2991/978-94-6463-222-4_60</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B6">
        <label>6.</label>
        <citation-alternatives>
          <mixed-citation publication-type="web">Meena, J.K. and Banyal, R.K. (2024) Incorporating an Attention Layer in Deep Learning Models to Enhance Short-Term Stock Price Predictions. Research Square. https://www.researchsquare.com/article/rs-5241185/v1</mixed-citation>
          <element-citation publication-type="web">
            <person-group person-group-type="author">
              <string-name>Meena, J.K.</string-name>
              <string-name>Banyal, R.K.</string-name>
            </person-group>
            <year>2024</year>
            <article-title>Incorporating an Attention Layer in Deep Learning Models to Enhance Short-Term Stock Price Predictions</article-title>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B7">
        <label>7.</label>
        <citation-alternatives>
          <mixed-citation publication-type="other">Thach, T.T. (2025) Forecasting Stock Market Indices Using Integration of Encoder, Decoder, and Attention Mechanism. <italic>Entropy</italic>, 27, Article 82. https://doi.org/10.3390/e27010082 <pub-id pub-id-type="doi">10.3390/e27010082</pub-id><pub-id pub-id-type="pmid">39851703</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/e27010082">https://doi.org/10.3390/e27010082</ext-link></mixed-citation>
          <element-citation publication-type="other">
            <person-group person-group-type="author">
              <string-name>Thach, T.T.</string-name>
              <string-name>Encoder, D</string-name>
            </person-group>
            <year>2025</year>
            <article-title>Forecasting Stock Market Indices Using Integration of Encoder, Decoder, and Attention Mechanism</article-title>
            <source>Entropy</source>
            <volume>27</volume>
            <elocation-id>82</elocation-id>
            <pub-id pub-id-type="doi">10.3390/e27010082</pub-id>
            <pub-id pub-id-type="pmid">39851703</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B8">
        <label>8.</label>
        <citation-alternatives>
          <mixed-citation publication-type="other">Chen, C., Xue, L. and Xing, W. (2023) Research on Improved Gru-Based Stock Price Prediction Method. <italic>Applied Sciences</italic>, 13, Article 8813. https://doi.org/10.3390/app13158813 <pub-id pub-id-type="doi">10.3390/app13158813</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/app13158813">https://doi.org/10.3390/app13158813</ext-link></mixed-citation>
          <element-citation publication-type="other">
            <person-group person-group-type="author">
              <string-name>Chen, C.</string-name>
              <string-name>Xue, L.</string-name>
              <string-name>Xing, W.</string-name>
            </person-group>
            <year>2023</year>
            <article-title>Research on Improved Gru-Based Stock Price Prediction Method</article-title>
            <source>Applied Sciences</source>
            <volume>13</volume>
            <elocation-id>8813</elocation-id>
            <pub-id pub-id-type="doi">10.3390/app13158813</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B9">
        <label>9.</label>
        <citation-alternatives>
          <mixed-citation publication-type="other">Zhang, J., Ye, L. and Lai, Y. (2023) Stock Price Prediction Using CNN-Bilstm-Attention Model. <italic>Mathematics</italic>, 11, Article 1985. https://doi.org/10.3390/math11091985 <pub-id pub-id-type="doi">10.3390/math11091985</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/math11091985">https://doi.org/10.3390/math11091985</ext-link></mixed-citation>
          <element-citation publication-type="other">
            <person-group person-group-type="author">
              <string-name>Zhang, J.</string-name>
              <string-name>Ye, L.</string-name>
              <string-name>Lai, Y.</string-name>
            </person-group>
            <year>2023</year>
            <article-title>Stock Price Prediction Using CNN-Bilstm-Attention Model</article-title>
            <source>Mathematics</source>
            <volume>11</volume>
            <elocation-id>1985</elocation-id>
            <pub-id pub-id-type="doi">10.3390/math11091985</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B10">
        <label>10.</label>
        <citation-alternatives>
          <mixed-citation publication-type="other">Lee, M. (2022) Research on the Feasibility of Applying GRU and Attention Mechanism Combined with Technical Indicators in Stock Trading Strategies. <italic>Applied Sciences</italic>, 12, Article 1007. https://doi.org/10.3390/app12031007 <pub-id pub-id-type="doi">10.3390/app12031007</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/app12031007">https://doi.org/10.3390/app12031007</ext-link></mixed-citation>
          <element-citation publication-type="other">
            <person-group person-group-type="author">
              <string-name>Lee, M.</string-name>
            </person-group>
            <year>2022</year>
            <article-title>Research on the Feasibility of Applying GRU and Attention Mechanism Combined with Technical Indicators in Stock Trading Strategies</article-title>
            <source>Applied Sciences</source>
            <volume>12</volume>
            <elocation-id>1007</elocation-id>
            <pub-id pub-id-type="doi">10.3390/app12031007</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B11">
        <label>11.</label>
        <citation-alternatives>
          <mixed-citation publication-type="other">Gao, Z. and Kuruoğlu, E.E. (2023) Attention Based Hybrid Parametric and Neural Network Models for Non-Stationary Time Series Prediction. <italic>Expert Systems</italic>, 41, e13419. https://doi.org/10.1111/exsy.13419 <pub-id pub-id-type="doi">10.1111/exsy.13419</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1111/exsy.13419">https://doi.org/10.1111/exsy.13419</ext-link></mixed-citation>
          <element-citation publication-type="other">
            <person-group person-group-type="author">
              <string-name>Gao, Z.</string-name>
            </person-group>
            <year>2023</year>
            <article-title>Attention Based Hybrid Parametric and Neural Network Models for Non-Stationary Time Series Prediction</article-title>
            <source>Expert Systems</source>
            <volume>41</volume>
            <pub-id pub-id-type="doi">10.1111/exsy.13419</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B12">
        <label>12.</label>
        <citation-alternatives>
          <mixed-citation publication-type="other">Ahmad, Z., Bao, S. and Chen, M. (2024) Deeponet-Inspired Architecture for Efficient Financial Time Series Prediction. <italic>Mathematics</italic>, 12, Article 3950. https://doi.org/10.3390/math12243950 <pub-id pub-id-type="doi">10.3390/math12243950</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/math12243950">https://doi.org/10.3390/math12243950</ext-link></mixed-citation>
          <element-citation publication-type="other">
            <person-group person-group-type="author">
              <string-name>Ahmad, Z.</string-name>
              <string-name>Bao, S.</string-name>
              <string-name>Chen, M.</string-name>
            </person-group>
            <year>2024</year>
            <article-title>Deeponet-Inspired Architecture for Efficient Financial Time Series Prediction</article-title>
            <source>Mathematics</source>
            <volume>12</volume>
            <elocation-id>3950</elocation-id>
            <pub-id pub-id-type="doi">10.3390/math12243950</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B13">
        <label>13.</label>
        <citation-alternatives>
          <mixed-citation publication-type="other">Barua, M., Kumar, T., Raj, K. and Roy, A.M. (2024) Comparative Analysis of Deep Learning Models for Stock Price Prediction in the Indian Market. <italic>FinTech</italic>, 3, 551-568. https://doi.org/10.3390/fintech3040029 <pub-id pub-id-type="doi">10.3390/fintech3040029</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/fintech3040029">https://doi.org/10.3390/fintech3040029</ext-link></mixed-citation>
          <element-citation publication-type="other">
            <person-group person-group-type="author">
              <string-name>Barua, M.</string-name>
              <string-name>Kumar, T.</string-name>
              <string-name>Raj, K.</string-name>
              <string-name>Roy, A.M.</string-name>
            </person-group>
            <year>2024</year>
            <article-title>Comparative Analysis of Deep Learning Models for Stock Price Prediction in the Indian Market</article-title>
            <source>FinTech</source>
            <volume>3</volume>
            <pub-id pub-id-type="doi">10.3390/fintech3040029</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B14">
        <label>14.</label>
        <citation-alternatives>
          <mixed-citation publication-type="journal">Lin, Y., Huang, Q., Zhong, Q., Li, M., Li, Y. and Ma, F. (2022) A New Attention-Based LSTM Model for Closing Stock Price Prediction. <italic>International</italic><italic>Journal</italic><italic>of</italic><italic>Financial</italic><italic>Engineering</italic>, 9, Article 2250014. https://doi.org/10.1142/s2424786322500141 <pub-id pub-id-type="doi">10.1142/s2424786322500141</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1142/s2424786322500141">https://doi.org/10.1142/s2424786322500141</ext-link></mixed-citation>
          <element-citation publication-type="journal">
            <person-group person-group-type="author">
              <string-name>Lin, Y.</string-name>
              <string-name>Huang, Q.</string-name>
              <string-name>Zhong, Q.</string-name>
              <string-name>Li, M.</string-name>
              <string-name>Li, Y.</string-name>
              <string-name>Ma, F.</string-name>
            </person-group>
            <year>2022</year>
            <article-title>A New Attention-Based LSTM Model for Closing Stock Price Prediction</article-title>
            <source>International Journal of Financial Engineering</source>
            <volume>9</volume>
            <elocation-id>2250014</elocation-id>
            <pub-id pub-id-type="doi">10.1142/s2424786322500141</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B15">
        <label>15.</label>
        <citation-alternatives>
          <mixed-citation publication-type="web">Hollis, T., Viscardi, A. and Yi, S.E. (2018) A Comparison of LSTMs and Attention Mechanisms for Forecasting Financial Time Series. https://arxiv.org/abs/1812.07699</mixed-citation>
          <element-citation publication-type="web">
            <person-group person-group-type="author">
              <string-name>Hollis, T.</string-name>
              <string-name>Viscardi, A.</string-name>
              <string-name>Yi, S.E.</string-name>
            </person-group>
            <year>2018</year>
            <article-title>A Comparison of LSTMs and Attention Mechanisms for Forecasting Financial Time Series</article-title>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B16">
        <label>16.</label>
        <citation-alternatives>
          <mixed-citation publication-type="web">He, S. and Gu, S. (2021) Multi-Modal Attention Network for Stock Movements Prediction. https://arxiv.org/abs/2112.13593</mixed-citation>
          <element-citation publication-type="web">
            <person-group person-group-type="author">
              <string-name>He, S.</string-name>
              <string-name>Gu, S.</string-name>
            </person-group>
            <year>2021</year>
            <article-title>Multi-Modal Attention Network for Stock Movements Prediction</article-title>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B17">
        <label>17.</label>
        <citation-alternatives>
          <mixed-citation publication-type="web">Shi, Z., Hu, Y., Mo, G. and Wu, J. (2022) Attention-Based CNN-LSTM and XGBoost Hybrid Model for Stock Prediction. https://arxiv.org/abs/2204.02623</mixed-citation>
          <element-citation publication-type="web">
            <person-group person-group-type="author">
              <string-name>Shi, Z.</string-name>
              <string-name>Hu, Y.</string-name>
              <string-name>Mo, G.</string-name>
              <string-name>Wu, J.</string-name>
            </person-group>
            <year>2022</year>
            <article-title>Attention-Based CNN-LSTM and XGBoost Hybrid Model for Stock Prediction</article-title>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B18">
        <label>18.</label>
        <citation-alternatives>
          <mixed-citation publication-type="confproc">Zhang, X., Liang, X., Zhiyuli, A., Zhang, S., Xu, R. and Wu, B. (2019) AT-LSTM: An Attention-Based LSTM Model for Financial Time Series Prediction. <italic>IOP</italic><italic>Conference</italic><italic>Series</italic>: <italic>Materials</italic><italic>Science</italic><italic>and</italic><italic>Engineering</italic>, 569, Article 052037. https://doi.org/10.1088/1757-899x/569/5/052037 <pub-id pub-id-type="doi">10.1088/1757-899x/569/5/052037</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1088/1757-899x/569/5/052037">https://doi.org/10.1088/1757-899x/569/5/052037</ext-link></mixed-citation>
          <element-citation publication-type="confproc">
            <person-group person-group-type="author">
              <string-name>Zhang, X.</string-name>
              <string-name>Liang, X.</string-name>
              <string-name>Zhiyuli, A.</string-name>
              <string-name>Zhang, S.</string-name>
              <string-name>Xu, R.</string-name>
              <string-name>Wu, B.</string-name>
            </person-group>
            <year>2019</year>
            <article-title>AT-LSTM: An Attention-Based LSTM Model for Financial Time Series Prediction</article-title>
            <source>IOP Conference Series: Materials Science and Engineering</source>
            <volume>569</volume>
            <elocation-id>052037</elocation-id>
            <pub-id pub-id-type="doi">10.1088/1757-899x/569/5/052037</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B19">
        <label>19.</label>
        <citation-alternatives>
          <mixed-citation publication-type="confproc">Gohari, H.E., Dang, X., Shah, S.Y. and Zerfos, P. (2024) Modality-Aware Transformer for Financial Time Series Forecasting. <italic>Proceedings of the</italic>5 <italic>th ACM International Conference on AI in Finance</italic>, Brooklyn, 14-17 November 2024, 677-685. https://doi.org/10.1145/3677052.3698654 <pub-id pub-id-type="doi">10.1145/3677052.3698654</pub-id><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1145/3677052.3698654">https://doi.org/10.1145/3677052.3698654</ext-link></mixed-citation>
          <element-citation publication-type="confproc">
            <person-group person-group-type="author">
              <string-name>Gohari, H.E.</string-name>
              <string-name>Dang, X.</string-name>
              <string-name>Shah, S.Y.</string-name>
              <string-name>Zerfos, P.</string-name>
              <string-name>Finance, B</string-name>
            </person-group>
            <year>2024</year>
            <article-title>Modality-Aware Transformer for Financial Time Series Forecasting</article-title>
            <source>Proceedings of the 5th ACM International Conference on AI in Finance</source>
            <volume>14</volume>
            <pub-id pub-id-type="doi">10.1145/3677052.3698654</pub-id>
          </element-citation>
        </citation-alternatives>
      </ref>
      <ref id="B20">
        <label>20.</label>
        <citation-alternatives>
          <mixed-citation publication-type="web">Xiao, J., Deng, T. and Bi, S. (2024) Comparative Analysis of LSTM, GRU, and Transformer Models for Stock Price Prediction. https://arxiv.org/abs/2411.05790</mixed-citation>
          <element-citation publication-type="web">
            <person-group person-group-type="author">
              <string-name>Xiao, J.</string-name>
              <string-name>Deng, T.</string-name>
              <string-name>Bi, S.</string-name>
              <string-name>LSTM, G</string-name>
            </person-group>
            <year>2024</year>
            <article-title>Comparative Analysis of LSTM, GRU, and Transformer Models for Stock Price Prediction</article-title>
          </element-citation>
        </citation-alternatives>
      </ref>
    </ref-list>
  </back>
</article>