IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2406.02604.html
   My bibliography  Save this paper

Gated recurrent neural network with TPE Bayesian optimization for enhancing stock index prediction accuracy

Author

Listed:
  • Bivas Dinda

Abstract

The recent advancement of deep learning architectures, neural networks, and the combination of abundant financial data and powerful computers are transforming finance, leading us to develop an advanced method for predicting future stock prices. However, the accessibility of investment and trading at everyone's fingertips made the stock markets increasingly intricate and prone to volatility. The increased complexity and volatility of the stock market have driven demand for more models, which would effectively capture high volatility and non-linear behavior of the different stock prices. This study explored gated recurrent neural network (GRNN) algorithms such as LSTM (long short-term memory), GRU (gated recurrent unit), and hybrid models like GRU-LSTM, LSTM-GRU, with Tree-structured Parzen Estimator (TPE) Bayesian optimization for hyperparameter optimization (TPE-GRNN). The aim is to improve the prediction accuracy of the next day's closing price of the NIFTY 50 index, a prominent Indian stock market index, using TPE-GRNN. A combination of eight influential factors is carefully chosen from fundamental stock data, technical indicators, crude oil price, and macroeconomic data to train the models for capturing the changes in the price of the index with the factors of the broader economy. Single-layer and multi-layer TPE-GRNN models have been developed. The models' performance is evaluated using standard matrices like R2, MAPE, and RMSE. The analysis of models' performance reveals the impact of feature selection and hyperparameter optimization (HPO) in enhancing stock index price prediction accuracy. The results show that the MAPE of our proposed TPE-LSTM method is the lowest (best) with respect to all the previous models for stock index price prediction.

Suggested Citation

  • Bivas Dinda, 2024. "Gated recurrent neural network with TPE Bayesian optimization for enhancing stock index prediction accuracy," Papers 2406.02604, arXiv.org.
  • Handle: RePEc:arx:papers:2406.02604
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2406.02604
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Dirk G. Baur & Brian M. Lucey, 2010. "Is Gold a Hedge or a Safe Haven? An Analysis of Stocks, Bonds and Gold," The Financial Review, Eastern Finance Association, vol. 45(2), pages 217-229, May.
    2. Chiang, Thomas C., 2022. "The effects of economic uncertainty, geopolitical risk and pandemic upheaval on gold prices," Resources Policy, Elsevier, vol. 76(C).
    3. Park, Jungwook & Ratti, Ronald A., 2008. "Oil price shocks and stock markets in the U.S. and 13 European countries," Energy Economics, Elsevier, vol. 30(5), pages 2587-2608, September.
    4. Baur, Dirk G. & McDermott, Thomas K., 2010. "Is gold a safe haven? International evidence," Journal of Banking & Finance, Elsevier, vol. 34(8), pages 1886-1898, August.
    5. Terence Tai-Leung Chong & Wing-Kam Ng & Venus Khim-Sen Liew, 2014. "Revisiting the Performance of MACD and RSI Oscillators," JRFM, MDPI, vol. 7(1), pages 1-12, February.
    6. Mingyue Qiu & Yu Song, 2016. "Predicting the Direction of Stock Market Index Movement Using an Optimized Artificial Neural Network Model," PLOS ONE, Public Library of Science, vol. 11(5), pages 1-11, May.
    7. Wei Bao & Jun Yue & Yulei Rao, 2017. "A deep learning framework for financial time series using stacked autoencoders and long-short term memory," PLOS ONE, Public Library of Science, vol. 12(7), pages 1-24, July.
    8. Lutz Kilian, 2008. "The Economic Effects of Energy Price Shocks," Journal of Economic Literature, American Economic Association, vol. 46(4), pages 871-909, December.
    9. Jiayu Qiu & Bin Wang & Changjun Zhou, 2020. "Forecasting stock prices with long-short term memory neural network based on attention mechanism," PLOS ONE, Public Library of Science, vol. 15(1), pages 1-15, January.
    10. Fischer, Thomas & Krauss, Christopher, 2018. "Deep learning with long short-term memory networks for financial market predictions," European Journal of Operational Research, Elsevier, vol. 270(2), pages 654-669.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Dudda, Tom L. & Klein, Tony & Nguyen, Duc Khuong & Walther, Thomas, 2022. "Common Drivers of Commodity Futures?," QBS Working Paper Series 2022/05, Queen's University Belfast, Queen's Business School.
    2. Ahmed, Abdullahi D. & Huo, Rui, 2021. "Volatility transmissions across international oil market, commodity futures and stock markets: Empirical evidence from China," Energy Economics, Elsevier, vol. 93(C).
    3. Parisa Foroutan & Salim Lahmiri, 2024. "Connectedness of cryptocurrency markets to crude oil and gold: an analysis of the effect of COVID-19 pandemic," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 10(1), pages 1-23, December.
    4. Muhammad Abubakr Naeem & Fiza Qureshi & Saqib Farid & Aviral Kumar Tiwari & Mohamed Elheddad, 2024. "Time-frequency information transmission among financial markets: evidence from implied volatility," Annals of Operations Research, Springer, vol. 334(1), pages 701-729, March.
    5. Ahmed, Walid M.A., 2020. "Corruption and equity market performance: International comparative evidence," Pacific-Basin Finance Journal, Elsevier, vol. 60(C).
    6. Khan, Aftab & Masih, Mansur, 2014. "Correlation between Islamic stock and Commodity markets: An investigation into the impact of financial crisis and financialization of commodity markets," MPRA Paper 56979, University Library of Munich, Germany.
    7. Uddin, Gazi Salah & Rahman, Md Lutfur & Hedström, Axel & Ahmed, Ali, 2019. "Cross-quantilogram-based correlation and dependence between renewable energy stock and other asset classes," Energy Economics, Elsevier, vol. 80(C), pages 743-759.
    8. Mensi, Walid & Al Rababa'a, Abdel Razzaq & Vo, Xuan Vinh & Kang, Sang Hoon, 2021. "Asymmetric spillover and network connectedness between crude oil, gold, and Chinese sector stock markets," Energy Economics, Elsevier, vol. 98(C).
    9. Lang, Korbinian & Auer, Benjamin R., 2020. "The economic and financial properties of crude oil: A review," The North American Journal of Economics and Finance, Elsevier, vol. 52(C).
    10. Ahmad Alrazni Alshammari, Basheer Altarturi, Buerhan Saiti, Latifah Munassar, 2020. "The impact of exchange rate, oil price and gold price on the Kuwaiti stock market: a wavelet analysis," European Journal of Comparative Economics, Cattaneo University (LIUC), vol. 17(1), pages 31-54, June.
    11. Ciner, Cetin & Gurdgiev, Constantin & Lucey, Brian M., 2013. "Hedges and safe havens: An examination of stocks, bonds, gold, oil and exchange rates," International Review of Financial Analysis, Elsevier, vol. 29(C), pages 202-211.
    12. Ehsan Hoseinzade & Saman Haratizadeh & Arash Khoeini, 2019. "U-CNNpred: A Universal CNN-based Predictor for Stock Markets," Papers 1911.12540, arXiv.org.
    13. Maghyereh, Aktham I. & Awartani, Basel & Tziogkidis, Panagiotis, 2017. "Volatility spillovers and cross-hedging between gold, oil and equities: Evidence from the Gulf Cooperation Council countries," Energy Economics, Elsevier, vol. 68(C), pages 440-453.
    14. Ansari, Md Gyasuddin & Sensarma, Rudra, 2019. "US monetary policy, oil and gold prices: Which has a greater impact on BRICS stock markets?," Economic Analysis and Policy, Elsevier, vol. 64(C), pages 130-151.
    15. Ahmed, Walid M.A., 2022. "On the higher-order moment interdependence of stock and commodity markets: A wavelet coherence analysis," The Quarterly Review of Economics and Finance, Elsevier, vol. 83(C), pages 135-151.
    16. Disli, Mustafa & Nagayev, Ruslan & Salim, Kinan & Rizkiah, Siti K. & Aysan, Ahmet F., 2021. "In search of safe haven assets during COVID-19 pandemic: An empirical analysis of different investor types," Research in International Business and Finance, Elsevier, vol. 58(C).
    17. Imhotep Paul Alagidede & Gideon Boako & Bo Sjo, 2021. "African equity markets’ exposure to oil and other commodities - implications for global portfolio diversification," Journal of Economics and Finance, Springer;Academy of Economics and Finance, vol. 45(2), pages 288-315, April.
    18. Ehsan Hoseinzade & Saman Haratizadeh, 2018. "CNNPred: CNN-based stock market prediction using several data sources," Papers 1810.08923, arXiv.org.
    19. Semei Coronado & Rebeca Jim'enez-Rodr'iguez & Omar Rojas, 2015. "An empirical analysis of the relationships between crude oil, gold and stock markets," Papers 1510.07599, arXiv.org, revised May 2016.
    20. Mensi, Walid & Selmi, Refk & Al-Yahyaee, Khamis Hamed, 2020. "Switching dependence and systemic risk between crude oil and U.S. Islamic and conventional equity markets: A new evidence," Resources Policy, Elsevier, vol. 69(C).

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2406.02604. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.