Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

Heteroscedasticity effects as component to future stock market predictions using RNN-based models

Abstract

Heteroscedasticity effects are useful for forecasting future stock return volatility. Stock volatility forecasting provides business insight into the stock market, making it valuable information for investors and traders. Predicting stock volatility is a crucial task and challenging. This study proposes a hybrid model that predicts future stock volatility values by considering the heteroscedasticity element of the stock price. The proposed model is a combination of Generalized Autoregressive Conditional Heteroskedasticity (GARCH) and a well-known Recurrent Neural Network (RNN) algorithm Long Short-Term Memory (LSTM). This proposed model is referred to as GARCH-LSTM model. The proposed model is expected to improve prediction accuracy by considering heteroscedasticity elements. First, the GARCH model is employed to estimate the model parameters. After that, the ARCH effect test is used to test the residuals obtained from the model. Any untrained heteroscedasticity element must be found using this step. The hypothesis of the ARCH test yielded a p-value less than 0.05 indicating there is valuable information remaining in the residual, known as heteroscedasticity element. Next, the dataset with heteroscedasticity is then modelled using an LSTM-based RNN algorithm. Experimental results revealed that hybrid GARCH-LSTM had the lowest MAE (7.961), RMSE (10.466), MAPE (0.516) and HMAE (0.005) values compared with a single LSTM. The accuracy of forecasting was also significantly improved by 15% and 13% with hybrid GARCH-LSTM in comparison to single LSTMs. Furthermore, the results reveal that hybrid GARCH-LSTM fully exploits the heteroscedasticity element, which is not captured by the GARCH model estimation, outperforming GARCH models on their own. This finding from this study confirmed that hybrid GARCH-LSTM models are effective forecasting tools for predicting stock price movements. In addition, the proposed model can assist investors in making informed decisions regarding stock prices since it is capable of closely predicting and imitating the observed pattern and trend of KLSE stock prices.

Ⅰ. Introduction

The stock market is a global network where anyone may purchase stocks, often known as shares of publicly traded companies. Stock, often known as a share or equity, is a form of investment property that reflects ownership in a corporation. In contrast, stock price refers to a stock’s current market value. It reflects the supply and demand for the stock and is influenced by numerous factors, such as the financial performance of the company, macroeconomic factors, international events, political events, social behavior, investor sentiment and etc. [13]. Clearly, inflationary pressures and interest rates [4] have a complex political-economic relationship [5].

Stock prices fluctuate constantly and can rise, or fall based on a variety of factors, making them a significant indicator of a company’s financial health. Current stock prices are essential information for investors, especially in terms of the future value of shares [5]. Every investor, from novices to seasoned professionals, seeks the ideal time and decision to trade stocks where an intelligent choice can result in substantial gains and losses for investors [6]. Stock price prediction is an attempt to determine the future value of a company’s stock or stock index. This is an important aspect of investing because it allows investors to make informed decisions regarding the optimal time to buy or sell a specific stock. Predicting stock prices is crucial in the financial and economic world [7].

Predicting changes or movements in stock price has increased investors’ and traders’ interest and demand [8, 9]. Numerous parties, including individual investors, stockbrokers, fund managers, and financial institutions, can benefit from accurate stock price forecasts. An accurate prediction of stock price trends is essential for traders and investors to trade profitably [10]. The profitability of stock market investments has been shown to be substantially correlated with the predictability of stock price changes [11]. Predicting stock price is a difficult task due to various influence factors that affect the stock price [12, 13]. The highly nonlinear structure of stock price time series makes it very difficult to make accurate predictions. As time series are noisy, non-stationary, nonlinearity, and heteroskedastic, predicting volatility for various forms of financial assets [14] is one of the mathematically challenging tasks in time series forecasting.

There are several predictive approaches that have been applied in predicting stock prices and volatility. These approaches consist of either a single method or a hybrid method, such as a combination of mathematical and machine learning techniques. One of the most frequently used method in stock price and volatility forecasting is Box-Jenkins family of models, including Autoregressive Moving Averages (ARMA) and ARIMA models [15, 16]. Given the uncertainty and multitude of factors influencing the stock market, predicting the volatility of stock returns can be more valuable than predicting stock prices directly [14, 17]. Stock return volatility provides vital information about the state and behavior of the stock market, which is of particular interest to investors. Information like this is crucial as it will help investors make the best decisions when trading stocks to maintain profitability in the long term.

Heteroskedasticity, which refers to the uncertainty of variance, is one of the characteristics of stock market volatility. Heteroscedasticity in the volatility series explains the measured volatility transmission of the stock indices [18]. Stock return volatility provides vital information about the state and behavior of the stock market, which is of particular interest to investors [19]. Information like this is crucial as it will help investors make the best decisions when trading stocks in order to maintain profitability in the long term. The Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model, which is part of the Box-Jenkins family, has been widely employed to develop an accurate forecasting model in financial field, particularly in volatility forecasting [2023]. The variance of the current error term is a function of the variances of prior error terms, as predicted by the GARCH model.

The GARCH model is applied to a case that often exhibits fluctuating conditions, followed by a brief period of relative quiet and could respond to fluctuation sequences better. The model can accurately reflect the regular fluctuations in financial data volatility [24]. Previous study by [25] showed the heteroskedasticity component of stock market returns can be employed to forecast future market value. Factors such as political events [26] and general economic conditions [27] could affect the stock price movements and these factors only can be measures through news and bulletin. Instead of taking risk full step by extracting the qualitative variables, GARCH model can capture the information and news reported within the historical trading days. Despite the ability to capture the volatility in stock price return, GARCH has shown to have limitations in its ability to catch abrupt changes in volatility and an inability to capture non-linear relationships.

With the advancement of soft computing, Deep Learning (DL) algorithm has received massive rise in popularity for forecasting [28]. DL is a learning algorithm derived from neural network. The algorithm comprises of several layers that transform input data to outputs while learning progressively higher-level features. The DL algorithm also comprises a hidden layer. Hidden layers are located in between input and output layer, containing multiple hidden layers. An algorithm with multiple hidden layers is referred to as deep neural network or deep learning. There are two commonly used approaches in DL which are Convolutional Neural Network (CNN) and Recurrent Neural Network (RNN). CNN is a DL algorithm that deals with spatial data such as images, while RNN is suitable for sequential and temporal data [29, 30]. RNN were applied in various area such as in industry of automotive & transportation, healthcare & medicine, retail and more [31].

Given that the stock market is a field that deals with financial time series, DL algorithm based on RNN is more suitable compared to CNN. RNN able to process sequential and temporal data before the advent of attention models. RNN has demonstrated it capability in predicting two different leading stock markets in the world which is National Stock Exchange (NSE) and New York Stock Exchange (NYSE) [15]. When predicting stock return volatility, RNNs have been shown to have some benefits over conventional statistical models such as GARCH.

Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) are the commonly known extensions in RNN. Both LSTM and GRU are highly capable of learning long-term dependencies compared to traditional RNN. LSTM has been demonstrated as an effective and applicable in a range of fields, such as the prediction of stock market value [15], demand forecasting [27], the spread of the COVID-19 virus [32], fake news detection [33], anomalous noise detection [34], entity detection [35], and others. The LSTM has demonstrably proved its supremacy in prediction area. According to a study by [36], the LSTM model outperformed conventional univariate time series prediction approaches. On the other hand, an LSTM prediction model employing up/down reversal point features was developed, and the average prediction accuracy for the Chinese and American stock markets was found to be 68.6% and 55.5%, respectively [37].

Known as modified RNN, GRU has outperformed in many fields and has proven in better performance compared to traditional RNN [38]. GRU demonstrated its superiority in forecasting such as wind power forecasting [39], aquaculture [40], air quality [41] and etc. GRU were also applied in predicting financial time series data. A study conducted on applicability of DL approach on predicting BANKEX data proved that GRU is capable in providing a day-ahead and four-steps ahead of all stock for S&P BSE-BANKEX trends with least error accuracy [10]. Other than that, GRU is also applied in sentiment classification cases since it is able to preserve semantics over time. Previous study by [42] showed that GRU able to able to capture sentimental relationship. However, these RNN algorithms also have limitations such as overfitting, intricacy, and inability to handle long-term dependencies.

In recent years, rather than depending solely on mathematical and traditional statistical methods, researchers have proposed a hybrid model that combines statistical methods and Machine Learning (ML) or DL methods for predicting stock prices. Hybrid models have been found to be effective for dealing with linear and non-linear characteristics in many cases [43] and boost prediction accuracy [44]. Hybrid models are preferable not only in terms of prediction results, but also in terms of robustness and extrapolation capabilities [45]. Hybrid models such as Deep Learning (DL) provide better and clearer results to aid investors’ expectation toward the stock trading. Due to the positive results of previous work, a hybrid of RNN and GARCH may give a better understanding of stock market predictions.

A hybridization model, for example, was demonstrated in [43] to increase forecasting accuracy. As demonstrated by the experimental results of the study, the hybrid ARIMA-ANN model outperformed all three other models used to forecast consumer price indexes (CPI) and the number of cancer patients expected in Yemen’s province. An article by [46] proposed the use of a hybrid LSTM for the Shanghai Stock Exchange (SSE). Among the findings of the study, it was found that the proposed hybrid LSTM model was able to achieve better performance in classifying investor sentiments than the baseline classifiers, and to predict stock prices better than the single model and models without sentiment analysis.

In the past, researchers have suggested that GARCH is ineffective when used as a single forecasting model [47]. Compared to a single model, a hybrid model, preferably with DL algorithm, is expected to overcome the weaknesses of GARCH and to improve forecasting performance [48, 49]. According to recent research on forecasting stock volatility, GARCH combined with LSTM was found to provide the best forecasting model among the other proposed models to predict copper price [47]. The combination of GARCH and LSTM once again demonstrates its credibility in predicting performance with high accuracy while also capturing normal volatility in the stock market [24]. Furthermore, it has been discovered that GRU coupled with GARCH can accurately predict the residual component of long-term satellite degradation under heteroscedasticity [50].

In this study, a hybrid model which combine RNN and GARCH model is proposed to capture the fluctuations and volatility of the Bursa Malaysia stock return and provide a precise forecasting value for trading purposes. This research has two aims: (1) to design a new hybrid model known as GARCH-LSTM, and (2) to evaluate the performance of the proposed model in predicting future stock prices relative to a single LSTM model. It is anticipated that the proposed GARCH-LSTM model will outperform the single LSTM model since the proposed model has an additional heteroskedasticity component. It is expected that the findings of this study will aid investors and economists in making stock trading decisions.

This study offers several contributions: Firstly, it provides step-by-step guidance for selecting the number of input nodes, hidden layers, and output nodes for RNN modeling. Secondly, this study presents a comprehensive overview of combining GARCH with an RNN model by taking the untrained heteroscedastic element from the GARCH model and incorporating it into the RNN model as additional inputs. It is important to note that this is the study’s major contribution. Considering the performance measurements scores obtained in this study in hybrid GARCH-LSTM, it is evident that prediction accuracy has improved.

Ⅱ. Methodology

A. Generalized Autoregressive Conditional Heteroscedasticity (GARCH)

The Autoregressive Conditional Heteroscedastic (ARCH) model developed by Engle in 1983 for univariate regression [51, 52]. In 1986, the Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model that uses squared daily log returns to solve conditional volatility problems was introduced. In contrast to the ARCH model, GARCH model considers past conditional variance, also known as volatility. Therefore, volatility remains the same regardless of whether the return is negative or positive [53]. The stock return volatility also known as realized volatility (RVt) on t day are computed by using following equation: (1)

Where, T is number of trading days after day, Rj is return on day j, is an average return on day j, and RVt is actual return volatility. By using closed values from Bursa stock price data, set of daily realized volatility are created and used in training and testing the forecasting models proposed in this study. Due to the nature of financial asset returns and their highly persistent volatility, simple GARCH models turn out to be very effective for modelling and predicting the scale terms [54]. A simple GARCH (p, q) is explained as follow: (2)

Where, εt is lagged squared residuals, ηt is sequence of independent and identically distributed random variables with zero mean and unit variance, αq is non-negativity constraints, and βp is measure the extent to which volatility. As this study is working on heteroscedasticity effect, the ARCH effect test derived by Engle is used to identify ARCH elements in residuals generated by GARCH model estimation. The H0 for the test indicating there is no ARCH effect found, while HA indicate there are significant ARCH effects in the dataset.

B. Long Short-Term Memory (LSTM)

Fig 1 shows the graphical representation of LSTM algorithm. By using notation from [55] the vector formulas for LSTM layer as follow: (3) (4) (5) (6) (7) (8)

Where, Xt is input vector at time t, W is rectangular input weight matrices, R is square recurrent weight matrices, P is peephole weight vectors, b is bias vectors and y is output at time t.

Eq (3) denotes for block input, Eq (4) denotes for input gates, Eq (5) denotes for forget gate, Eq (6) as cell gate, Eq (7) as output gate and Eq (8) denotes as block output. Those gates of sigmoid, tanh, pointwise multiplication, pointwise addition, and vector concatenation can learn and chose which data in a sequence is important to keep or throw away. By doing so, only relevant input will be passed along the chain is sequences to make prediction.

C. Proposed hybrid model

Stock return volatility is considered key information and helpful for analyzing the movements of the stock market. Predictability of stock market volatility has been noted as a challenging task [56]. Since economists have difficulty in predicting stock market volatility, investors may also find it difficult to analyze their stock markets. This hybrid model is proposed with the aim of helping economists analyze and forecast the future stock volatility values by considering the heteroscedasticity effects contained by stock market that their working with. Previous researchers believed residuals from the GARCH model contained untrained heteroscedasticity effects [56]. To assist investors in analyzing and predicting stock market volatility values more effectively, this study focuses on the development of a hybrid model that incorporates heteroscedasticity effects. Heteroscedasticity element is known as useful information in studying volatility movements.

Fig 2 shows the flowchart of the proposed model. First, the dataset collected from the Yahoo Finance website with time interval in between January 2012 until June 2022 was analyzed. Next, daily return volatility (RVt) was calculated from the dataset. As for the first part, RVt were trained and tested in GARCH model. Forecasted values produced by GARCH model is then tested using ARCH effect test to determine the heteroscedasticity element left in the residuals produced by the model. Once ARCH effect was detected, residuals from the GARCH model is considered to containing heteroscedasticity element which also meant to be useful information that untrained by the GARCH model. Second part is residuals that was estimated from GARCH model once again used as additional variable to be used in training the daily RVt in LSTM model. From now on, LSTM are trained and tested using two variables which are RVt and residuals from the GARCH model.

The hybrid model namely GARCH-LSTM which explain the hybrid of both models and specify three hidden layers of LSTM. Based on the pilot study, the number of hidden layers most optimum in terms of time and performance accuracy is three layers. This hybrid model validated with comparison of single LSTM model that only used dataset of stock price without heteroscedasticity component.

D. Accuracy measurements

Forecasting accuracy can be measured in a variety of ways. To determine the ability and performance of proposed models in providing accurate predictions, it is imperative that the appropriate accuracy measurements be selected. To evaluate the performance of each model, it is necessary to have at least a measure of absolute error, such as MAE or RMSE [57]. The study employs several performance evaluations, including Root Mean Square Errors (RMSE), Mean Absolute Errors (MAE), Mean Absolute Percentage Errors (MAPE), and Heteroscedasticity Mean Absolute Errors (HMAE).

(9)(10)(11)(12)

Where RVt is the actual value at time t, is forecast value at time t and n is number of sample observation. The accuracy of the models are measured by these metrics, which are indicative of the model’s performance. In general, lower values indicate that the model has fewer errors and is more accurate in predicting future values. A MAE measures the difference between predicted values and actual values, whereas an RMSE measures square root errors and considers their magnitude. In terms of percentages, MAPE is a metric used to measure the difference between predicted and actual values. As an alternative, HMAE is used to describe the difference between the model’s predictions and the actual targets that correspond to those predictions. HMAE is more accurate if it is closer to 0 than it is otherwise [5860].

E. Datasets

In this study, the dataset utilized for analyzing KLSE (Kuala Lumpur Stock Exchange) stock prices spans from January 2012 to December 2022. The dataset was sourced from https://www.investing.com, a reputable financial data platform, and encompasses comprehensive historical stock price records. The chosen time frame enables a thorough examination of stock price trends, volatility, and other relevant financial metrics within the specified period. This aids in a comprehensive understanding of KLSE stock market dynamics over the years. In accordance with open data principles, the dataset used in this study is publicly available and can be freely downloaded. The use of the dataset in this research adheres to the platform’s usage policies, which do not impose any restrictions on data sharing, redistribution, or analysis.

Based on the timeline event in Fig 3, the first COVID19 pandemic outbreak was reported in March 2020. The figure shown KLSE stock index showing a steady growth from 2012 to 2014, then turned downward until mid-2016, and continues to grow every two years. There is a significant downward trend from end-2019 to mid-2020. This is due to the Covid-19 pandemic outbreak and the stock market was impacted in a negative way. As for the seasonal effects, there seem to be cyclical movements across the month of each year, yet it is hard to describe the dataset as random variation. Table 1 showed the excerpt of the dataset used in this study. The dataset is characterized as non-normal and non-stationary by visual inspections. Since financial time series dataset are expected to be this way, it is normal due to its seasonality effects. The dataset must undergo preprocessing step where the average daily return volatility RVt were calculate. The RVt were calculated using daily close price of the dataset. The RVt is then trained and tested in GARCH model for the first part of the analysis.

Fig 4 showed the realized volatility of KLSE Stock Return. Visual inspection revealed that the dataset has high pick volatility especially on early year of 2020 that the dataset has reached the abnormal pick of its usual volatility range.

Ⅲ Results and discussions

The dataset has to undergo statistical testing to prove the normality and the stationarity of the dataset. The results of preliminary study of Anderson Darling (AD) and Augmented Dickey-Fuller (ADF) tests indicated that the dataset is not normal and not stationary. This characteristic is common for financial time series as these data exhibit substantial fluctuations. AD test resulted in 9.54911 test statistics at 95% confidence interval, indicating the test statistic obtained was larger than critical value of 0.786. Therefore, H0 is failed to be rejected indicating the dataset is not normal. Meanwhile, the ADF test results showed a p-value of -2.5830 and 0.09654 greater than 0.05, which indicates that the H0 of this test was not rejected. There is no stationary pattern in the sample dataset, indicating that it is non-stationary. Therefore, it does not vary consistently over time and has a time-dependent structure.

A. GARCH model

To get the heteroscedasticity component from the daily stock return, daily stock return is calculated and used in GARCH model as shown in Fig 5. Heteroscedasticity component obtained from residuals of GARCH model. The AIC and BIC scores obtained show this model has good estimation with both scores being -11582.4 and -11559, since the lower the information criteria scores, the better the fit of the model.

The ARCH effect test of ARCH-LM test was conducted on the residuals produced by GARCH model estimation. Based on the p-value that was produced by the ARCH-LM tests, if the p-value is less than 0.05 at 95% confidence interval, H0 is rejected. The ARCH effect test was tested on dataset with lag is equal to 10. The full results of ARCH effect test as documented in Table 2.

It can be seen from the above table that ARCH effect has been detected ever since the first lag of the observation was made. As the p-values obtained by the tests are below than 0.05, therefore the test failed to accept the H0 of the hypothesis statement. Therefore, the GARCH model did not fully eliminate the ARCH elements in the dataset. There is still useful information left in the residuals of the GARCH model, which is the uncaptured heteroscedasticity element contained inside the residuals. This condition allows the study to proceed for the hybrid GARCH-LSTM model development.

B. LSTM model

Since LSTM model has many components to be considered such as number of hidden layers, number of hidden neurons, and number of inputs, this study proposed a simple framework to start developing LSTM architecture that suits the dataset. The architectures of LSTM model with different number of input lag or also called as input node which n = 1, 5, 10, 20 and number of hidden layers of 2, 3, 4, 5. Based on pilot study, hidden layer more than five layers required longer time for model execution, yet the performance is equivalent to five hidden layers. It is also proved the model architecture of (20, 3, 1) has reached the highest error forecasting performance. This study used one output node as it is focused on one-day ahead forecasting.

Based on Table 3, the LSTM model with architecture of (10, 2, 1) indicating 10 input nodes, 2 hidden layers and one output node is most sensitive in forecasting KLSE stock index with 12.4815 value of RMSE. To simplify, LSTM (10, 2, 1) taken as the best architecture of LSTM to be used in this study. The same LSTM model chosen also used to be hybridized with GARCH model.

C. Hybrid GARCH-LSTM model

The hybrid model GARCH-LSTM proposed in this study was designed by incorporating the uncaptured heteroscedasticity element known as residuals from the GARCH model into the LSTM architecture. Even though LSTM with architecture (10, 2, 1) is chosen as the best model, the same list of architectures is used in the hybridization process to find the best hybrid GARCH-LSTM architecture to be used in this study.

Table 4 shows the experimental results for hybrid GARCH-LSTM architecture. The performance results revealed that hybrid GARCH-LSTM architecture of 10-2-1 has the best results with the lowest MAE of 7.961, RMSE of 10.466, MAPE of 0.516 and HMAE of 0.005. As the MAE and RMSE produce lower results, this showed the hybrid GARCH-LSTM models prediction are closer to the actual values, implying higher accuracy. Meanwhile, lower HMAE value indicating the prediction model has less variability. This indicates that the hybrid GARCH-LSTM architecture of 10-2-1, produces the most accurate and reliable prediction compared to other architectures. By combining GARCH for volatility modeling and LSTM for capturing underlying patterns in the data, this hybrid model exhibit higher predictive accuracy compared to standalone models.

D. Comparisons

This study focuses on analyzing Malaysia stock index using both LSTM and GARCH-LSTM. Table 5 illustrated the model’s performance and validated using four statistical performance measurements which are MAE, RMSE, MAPE and HMAE.

Based on Table 5, both models are used in forecasting stock price index of KLSE and found that model with heteroscedasticity component able to improve the forecasting accuracy. Model performance measurements score obtained by GARCH-LSTM indicated that the model has better forecasting accuracy with 7.961 value of MAE and 10.466 value of RMSE, GARCH-LSTM has improved by 15% and 13% model respectively compared to LSTM model. Furthermore, the ARCH effect test was employed on residual of the hybrid model as shown in Table 6.

The results from the above table revealed that, statistically evidence all untrained heteroscedasticity element has been used and eliminated during the hybridization process. The test was set to test at five days lags. The test unable to capture the heteroscedasticity element even from the first day lag, resulting in no heteroscedasticity effect left in the residuals. The proposed GARCH-LSTM has fully utilized the heteroscedasticity element, uncaptured by GARCH model estimation, showing it superiority against GARCH model alone.

Fig 6 above shows the plot of standardized residuals of prediction, produced by GARCH-LSTM model in modeling for KLSE Stock index. The plot visually displays a random pattern with most values lying between the zero line as shown in Fig 6. The high points in the plot that were thought to be an outlier, are sparsely and evenly dispersed throughout the zero line. The plot somewhat resembles a random, dispersed white noise pattern that lacks any patterns or clusters.

Fig 7 illustrated the performance of GARCH-LSTM (10, 2, 1) model and visually analysed that the model is sensitive enough in capturing the stock’s movements even though the dataset has crucial volatility history. The proposed hybrid model has been numerically proven to improve prediction accuracy when compared to the stand-alone LSTM model. As shown in the figure above, GARCH-LSTM capable of imitating the actual value of daily stock price and capturing the index’s ups and downs.

thumbnail
Fig 7. Prediction of Bursa index test set by hybrid model.

https://doi.org/10.1371/journal.pone.0297641.g007

Ⅳ Conclusion

Since stock market prediction is such an important and difficult task to carry out. There is plenty of ongoing research work for new methods to study these fields, in order to improve the existing approaches and forecasting accuracy. There has been a substantial amount of research on Recurrent Neural Network that has demonstrated how RNN is effective in handling various case studies. This study offers useful insight into the applicability of LSTM, and hybrid GARCH-LSTM in stock price prediction. By adding a heteroscedastic element of the stock market price to LSTM model, instead of simply analyzing single variate information, the forecast accuracy of the model has improved significantly and proven as a reliable model in predicting future value of stock price. According to the findings of this study, hybrid GARCH-LSTM fully utilized the heteroscedasticity element which is often present in financial data and has a difficult time being captured by GARCH models. This suggests that hybrid GARCH-LSTM models are capable predicting future stock price values more accurately than single LSTM models. Results indicated that all objectives set forth earlier were achieved.

Although all objectives were answered and fulfilled, certain limitations were encountered during the study. Finding the GARCH model estimation required a lot of trial and error. The main challenge of this study is to determine the appropriate parameters for the LSTM model. Due to the complexity of RNN and LSTM, finding the appropriate parameters for the LSTM model is difficult since extensive tuning and experimentation are required. The process can be time-consuming and costly. It is also important to note that the right parameters can differ depending on the specific task, making it necessary to tailor them according to each task.

According to this study, several recommendations are made: it is recommended to use a powerful processor in order to conduct the experimental simulations using the RNN-based model. Since this study was conducted using cloud GPU, there are limitations in terms of internet speed and subscription regulation after several usages of the cloud GPU. Furthermore, it is recommended that future research increase the number of inputs, which is the observation of the stock price on a daily basis. Enhanced input datasets enable the model to learn more effectively, ultimately leading to improved forecasting results. A third recommendation is that future research be conducted based on real life demands, such as the number of steps investors require to forecast ahead. Future investigations should prioritize the integration of real-life demand factors to align research with practical applications and market demands. Furthermore, we recommend that future researchers incorporate optimization algorithms when selecting parameters for RNN algorithms and GARCH model estimation. These recommendations emphasize the importance of robust computational resources, enriched input data for the model, and alignment with real-life demand factors to enhance the efficacy and applicability of RNN-based modelling simulations for stock price forecasting. Enhancements are being made to enhance the accuracy and usefulness of predictive models in the financial sector.

References

  1. 1. Ravichandra T. and Thingom C., “Stock Price Forecasting Using ANN Method,” Adv. Intell. Syst. Comput., vol. 435, pp. 599–605, 2016,
  2. 2. Kristjanpoller W. and Minutolo M. C., “A hybrid volatility forecasting framework integrating GARCH, artificial neural network, technical analysis and principal components analysis,” Expert Syst. Appl., vol. 109, pp. 1–11, Nov. 2018,
  3. 3. Qiu M. and Song Y., “Predicting the direction of stock market index movement using an optimized artificial neural network model,” PLoS One, vol. 11, no. 5, May 2016, pmid:27196055
  4. 4. Rao U. and Charles V., “An empirical examination of the efficiency of commodity markets in India,” Int. J. Banking, Account. Financ., vol. 12, no. 1, pp. 1–15, 2021,
  5. 5. Arashi M. and Rounaghi M. M., “Analysis of market efficiency and fractal feature of NASDAQ stock exchange: Time series modeling and forecasting of stock index using ARMA ‑ GARCH model,” Futur. Bus. J., vol. 9, 2022,
  6. 6. Dahal K. R. et al., “A comparative study on effect of news sentiment on stock price prediction with deep learning architecture,” PLoS One, vol. 18, no. 4, p. e0284695, 2023, pmid:37098089
  7. 7. A. A. Adebiyi, A. O. Adewumi, and C. K. Ayo, “Stock price prediction using the ARIMA model,” in Proceedings—UKSim-AMSS 16th International Conference on Computer Modelling and Simulation, UKSim 2014, 2014, pp. 106–112, https://doi.org/10.1109/UKSim.2014.67
  8. 8. Zahedi J. and Rounaghi M. M., “Application of artificial neural network models and principal component analysis method in predicting stock prices on Tehran Stock Exchange,” Phys. A Stat. Mech. its Appl., vol. 438, pp. 178–187, Jul. 2015,
  9. 9. Huang S. F., Chiang H. H., and Lin Y. J., “A network autoregressive model with GARCH effects and its applications,” PLoS One, vol. 16, no. 7 July, pp. 1–18, 2021, pmid:34324604
  10. 10. Jayanth Balaji A., Harish Ram D. S., and Nair B. B., “Applicability of deep learning models for stock price forecasting an empirical study on bankex data,” in Procedia Computer Science, Jan. 2018, vol. 143, pp. 947–953,
  11. 11. Mallikarjuna M. and Rao R. P., “Evaluation of forecasting methods from selected stock market returns,” Financ. Innov., vol. 5, no. 1, 2019,
  12. 12. Zhong X. and Enke D., “Forecasting daily stock market return using dimensionality reduction,” Expert Syst. Appl., vol. 67, pp. 126–139, Jan. 2017,
  13. 13. Oztekin A., Kizilaslan R., Freund S., and Iseri A., “A data analytic approach to forecasting daily stock returns in an emerging market,” Eur. J. Oper. Res., vol. 253, no. 3, pp. 697–710, Sep. 2016,
  14. 14. Vidal A. and Kristjanpoller W., “Gold volatility prediction using a CNN-LSTM approach,” Expert Syst. Appl., vol. 157, p. 113481, Nov. 2020,
  15. 15. Hiransha M., Gopalakrishnan E. A., Menon V. K., and Soman K. P., “NSE Stock Market Prediction Using Deep-Learning Models,” in Procedia Computer Science, Jan. 2018, vol. 132, pp. 1351–1362,
  16. 16. Shahvaroughi Farahani M. and Razavi Hajiagha S. H., Forecasting stock price using integrated artificial neural network and metaheuristic algorithms compared to time series models, vol. 25, no. 13. Springer Berlin Heidelberg, 2021.
  17. 17. Bhowmik R. and Wang S., “Stock Market Volatility and Return Analysis:,” Entropy, vol. 22, no. 552, pp. 1–18, 2020.
  18. 18. Wang H. K., Guo M., Lee S., and Chua C. H., “Forecasting and change point test for nonlinear heteroscedastic time series based on support vector regression,” PLoS One, vol. 17, no. 12 December, pp. 1–16, 2022, pmid:36584161
  19. 19. Naimy V., Haddad O., Fernández-Avilés G., and El Khoury R., “The predictive capacity of GARCH-type models in measuring the volatility of crypto and world currencies,” PLoS One, vol. 16, no. 1 January, pp. 1–17, 2021, pmid:33513150
  20. 20. Bildirici M. and Ersin Ö., “Forecasting volatility in oil prices with a class of nonlinear volatility models: smooth transition RBF and MLP neural networks augmented GARCH approach,” Pet. Sci., vol. 12, no. 3, pp. 534–552, 2015,
  21. 21. Babu C. N. and Reddy B. E., “A moving-average filter based hybrid ARIMA-ANN model for forecasting time series data,” Appl. Soft Comput. J., vol. 23, pp. 27–38, 2014,
  22. 22. Murty S. and Victor V., “Is Bitcoin a Safe Haven for Indian Investors? A GARCH Volatility Analysis,” no. Kothari, 2022.
  23. 23. Badescu A., Cui Z., and Ortega J. P., “Closed-form variance swap prices under general affine GARCH models and their continuous-time limits,” Ann. Oper. Res., vol. 282, no. 1–2, pp. 27–57, 2019,
  24. 24. Mahajan V., Thakan S., and Malik A., “Modeling and Forecasting the Volatility of NIFTY 50 Using GARCH and RNN Models,” Economies, vol. 10, no. 5, pp. 1–20, 2022,
  25. 25. Ng S. L., Chin W. C., and Chong L. L., “Realized volatility transmission within Islamic stock markets: A multivariate HAR-GARCH-type with nearest neighbor truncation estimator,” Borsa Istanbul Rev., vol. 20, pp. S26–S39, Dec. 2020,
  26. 26. Ghouse G., Bhatti M. I., and Shahid M. H., “Impact of COVID-19, Political, and Financial Events on the Performance of Commercial Banking Sector,” J. Risk Financ. Manag., vol. 15, no. 4, p. 186, 2022,
  27. 27. Zhang Y., Choo W. C., Aziz Y. A., Yee C. L., Wan C. K., and Ho J. S., “Effects of Multiple Financial News Shocks on Tourism Demand Volatility Modelling and Forecasting,” J. Risk Financ. Manag., vol. 15, no. 279, p. 47, 2022.
  28. 28. Al-Abri E. S. and E. S., “Modelling atmospheric ozone concentration using machine learning algorithms,” PLoS One, vol. 13, no. 3, p. e0194889, 2016, [Online]. Available: https://dx.plos.org/10.1371/journal.pone.0194889%0Ahttps://dspace.lboro.ac.uk/dspace-jspui/handle/2134/25091.
  29. 29. Bin Shah S. R., Chadha G. S, Schwung A., and Ding S. X., “A Sequence-to-Sequence Approach for Remaining Useful Lifetime Estimation Using Attention-augmented Bidirectional LSTM,” Intell. Syst. with Appl., vol. 10–11, p. 200049, Jul. 2021,
  30. 30. Dautel A. J., Härdle W. K., Lessmann S., and Seow H.-V., “Forex exchange rate forecasting using deep recurrent neural networks,” Digit. Financ., vol. 2, no. 1–2, pp. 69–96, 2020,
  31. 31. Manaswi N. K., Deep Learning with Applications Using Python: Chatbots and Face, Object, and Speech Recognition With TensorFlow and Keras. 2018.
  32. 32. Kuvvetli Y., Deveci M., Paksoy T., and Garg H., “A predictive analytics model for COVID-19 pandemic using artificial neural networks,” Decis. Anal. J., vol. 1, p. 100007, Nov. 2021,
  33. 33. Senhadji S. and Ahmed R. A. S., “Fake news detection using naïve Bayes and long short term memory algorithms,” IAES Int. J. Artif. Intell., vol. 11, no. 2, pp. 746–752, 2022,
  34. 34. Afendi A. S. M. and Yusoff M., “Review of anomalous sound event detection approaches,” IAES Int. J. Artif. Intell., vol. 8, no. 3, pp. 264–269, 2019,
  35. 35. Siddalingappa R. and Sekar K., “Bi-directional long short term memory using recurrent neural network for biological entity recognition,” IAES Int. J. Artif. Intell., vol. 11, no. 1, pp. 89–101, 2022,
  36. 36. Bandara K., Bergmeir C., and Smyl S., “Forecasting across time series databases using recurrent neural networks on groups of similar series: A clustering approach,” Expert Syst. Appl., vol. 140, Feb. 2020,
  37. 37. J. H. U, P. Y. Lu, Kim C. S, Ryu U. S, and Pak K. S, “A new LSTM based reversal point prediction method using upward/downward reversal point feature sets,” Chaos, Solitons and Fractals, vol. 132, p. 109559, Mar. 2020,
  38. 38. Chung J., Gulcehre C., Cho K., and Bengio Y., “Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling,” NIPS 2014 Work. Deep Learn., Dec. 2014, [Online]. Available: http://arxiv.org/abs/1412.3555.
  39. 39. Kumar V. B., Nookesh V. M., Saketh B. S., Syama S., and Ramprabhakar J., “Wind Speed Prediction Using Deep Learning-LSTM and GRU,” pp. 602–607, 2021.
  40. 40. Li W., Wu H., Zhu N., Jiang Y., Tan J., and Guo Y., “Prediction of dissolved oxygen in a fishery pond based on gated recurrent unit (GRU),” Inf. Process. Agric., vol. 8, no. 1, pp. 185–193, 2021,
  41. 41. Zhou X., Xu J., Zeng P., and Meng X., “Air Pollutant Concentration Prediction Based on GRU Method,” J. Phys. Conf. Ser., vol. 1168, no. 3, 2019,
  42. 42. Singh A. and Shakya S., “ScienceDirect ScienceDirect Analysis of look back period for stock price prediction with Analysis of look back period price prediction with RNN variants: A case study for on stock banking sector of NEPSE RNN variants: A case study on banking sector of N,” Procedia Comput. Sci., vol. 167, no. 2019, pp. 788–798, 2020,
  43. 43. Hadwan M., Al-Maqaleh B. M., Al-Badani F. N., Khan R. U., and Al-Hagery M. A., “A hybrid neural network and box-jenkins models for time series forecasting,” Comput. Mater. Contin., vol. 70, no. 3, pp. 4829–4845, 2022,
  44. 44. Zolfaghari M. & Gholami S., "A hybrid approach of adaptive wavelet transform, long short-term memory and ARIMA-GARCH family models for the stock index prediction," Expert Systems with Applications, 182(November 2020), 115149, 2021.
  45. 45. Narayanan H., Sokolov M., Morbidelli M., and Butté A., “A new generation of predictive models: The added value of hybrid models for manufacturing processes of therapeutic proteins,” Biotechnol. Bioeng., vol. 116, no. 10, pp. 2540–2549, Oct. 2019, pmid:31237678
  46. 46. Jing N., Wu Z., and Wang H., “A hybrid model integrating deep learning with investor sentiment analysis for stock price prediction,” Expert Syst. Appl., vol. 178, p. 115019, Sep. 2021,
  47. 47. Hu Y., Ni J., and Wen L., “A hybrid deep learning approach by integrating LSTM-ANN networks with GARCH model for copper price volatility prediction,” Phys. A Stat. Mech. its Appl., vol. 557, p. 124907, Nov. 2020,
  48. 48. Usmani S. and Shamsi J. A., “LSTM based stock prediction using weighted and categorized financial news,” PLoS One, vol. 18, no. 3 March, pp. 1–27, 2023, pmid:36881605
  49. 49. Kakade K., Jain I., and Mishra A. K., “Value-at-Risk forecasting: A hybrid ensemble learning GARCH-LSTM based approach,” Resour. Policy, vol. 78, p. 102903, Sep. 2022,
  50. 50. Tao L., Zhang T., Peng D., Hao J., Jia Y., Lu C., et al, "Long-term degradation prediction and assessment with heteroscedasticity telemetry data based on GRU-GARCH and MD hybrid method: An application for satellite," Aerospace Science and Technology, 115, 106826, 2021. https://doi.org/10.1016/j.ast.2021.106826
  51. 51. Bollerslev T., “Generalized autoregressive conditional heteroskedasticity,” J. Econom., vol. 31, no. 3, pp. 307–327, Apr. 1986,
  52. 52. Boubacar Maïnassara Y., Kadmiri O., and Saussereau B., “Estimation of multivariate asymmetric power GARCH models,” J. Multivar. Anal., vol. 192, p. 105073, 2022,
  53. 53. Fu J.-Y., Lin J.-G., and Hao H.-X., “Volatility analysis for the GARCH–Itô–Jumps model based on high-frequency and low-frequency financial data,” Int. J. Forecast., no. xxxx, 2022,
  54. 54. Paolella M. S., Linear Models and Time-Series Analysis: Regression, ANOVA, ARMA and GARCH. 2019.
  55. 55. Patterson J. and Gibson A., Deep Learning: A Practitioner’s Approach. 2017.
  56. 56. Lu X., Que D., and Cao G., “Volatility Forecast Based on the Hybrid Artificial Neural Network and GARCH-type Models,” Procedia Comput. Sci., vol. 91, pp. 1044–1049, Jan. 2016,
  57. 57. Fufa D. D., & Zeleke B. L. (2018). Forecasting the Volatility of Ethiopian Birr/Euro Exchange Rate Using Garch-Type Models. Annals of Data Science, 5(4), 529–547. https://doi.org/10.1007/s40745-018-0151-6.
  58. 58. Kim H. Y., & Won C. H. (2018). Forecasting the volatility of stock price index: A hybrid model integrating LSTM with multiple GARCH-type models. Expert Systems with Applications, 103, 25–37. https://doi.org/10.1016/j.eswa.2018.03.002.
  59. 59. Karunasingha D. S. K., “Root mean square error or mean absolute error? Use their ratio as well”, Information Sciences, vol 585, pp. 609–629, 2022. https://doi.org/10.1016/j.ins.2021.11.036.
  60. 60. Althoff D., Rodrigues L. N., “Goodness-of-fit for hydrological models: Model calibration and performance assessment”, Journal of Hydrology, vol 600, pp,126674, 2021. https://doi.org/10.1016/j.jhydrol.2021.126674.