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. 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.
    4. 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.
    5. 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.
    6. Lutz Kilian, 2008. "The Economic Effects of Energy Price Shocks," Journal of Economic Literature, American Economic Association, vol. 46(4), pages 871-909, December.
    7. 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.
    8. 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. Ehsan Hoseinzade & Saman Haratizadeh & Arash Khoeini, 2019. "U-CNNpred: A Universal CNN-based Predictor for Stock Markets," Papers 1911.12540, arXiv.org.
    2. Ehsan Hoseinzade & Saman Haratizadeh, 2018. "CNNPred: CNN-based stock market prediction using several data sources," Papers 1810.08923, arXiv.org.
    3. Hakan Gunduz, 2021. "An efficient stock market prediction model using hybrid feature reduction method based on variational autoencoders and recursive feature elimination," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 7(1), pages 1-24, December.
    4. Jie Zou & Jiashu Lou & Baohua Wang & Sixue Liu, 2022. "A Novel Deep Reinforcement Learning Based Automated Stock Trading System Using Cascaded LSTM Networks," Papers 2212.02721, arXiv.org, revised Jul 2023.
    5. Giacomo di Tollo & Joseph Andria & Gianni Filograsso, 2023. "The Predictive Power of Social Media Sentiment: Evidence from Cryptocurrencies and Stock Markets Using NLP and Stochastic ANNs," Mathematics, MDPI, vol. 11(16), pages 1-18, August.
    6. James Wallbridge, 2020. "Transformers for Limit Order Books," Papers 2003.00130, arXiv.org.
    7. 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.
    8. 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.
    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. Flori, Andrea & Regoli, Daniele, 2021. "Revealing Pairs-trading opportunities with long short-term memory networks," European Journal of Operational Research, Elsevier, vol. 295(2), pages 772-791.
    11. Pegah Eslamieh & Mehdi Shajari & Ahmad Nickabadi, 2023. "User2Vec: A Novel Representation for the Information of the Social Networks for Stock Market Prediction Using Convolutional and Recurrent Neural Networks," Mathematics, MDPI, vol. 11(13), pages 1-26, July.
    12. Sadefo Kamdem, Jules & Bandolo Essomba, Rose & Njong Berinyuy, James, 2020. "Deep learning models for forecasting and analyzing the implications of COVID-19 spread on some commodities markets volatilities," Chaos, Solitons & Fractals, Elsevier, vol. 140(C).
    13. Kamal, Javed Bin & Wohar, Mark & Kamal, Khaled Bin, 2022. "Do gold, oil, equities, and currencies hedge economic policy uncertainty and geopolitical risks during covid crisis?," Resources Policy, Elsevier, vol. 78(C).
    14. Zhaofeng Zhang & Banghao Chen & Shengxin Zhu & Nicolas Langren'e, 2024. "Quantformer: from attention to profit with a quantitative transformer trading strategy," Papers 2404.00424, arXiv.org, revised Oct 2024.
    15. Stefenon, Stefano Frizzo & Seman, Laio Oriel & Aquino, Luiza Scapinello & Coelho, Leandro dos Santos, 2023. "Wavelet-Seq2Seq-LSTM with attention for time series forecasting of level of dams in hydroelectric power plants," Energy, Elsevier, vol. 274(C).
    16. Nosratabadi, Saeed & Mosavi, Amir & Duan, Puhong & Ghamisi, Pedram & Filip, Ferdinand & Band, Shahab S. & Reuter, Uwe & Gama, Joao & Gandomi, Amir H., 2020. "Data science in economics: comprehensive review of advanced machine learning and deep learning methods," LawArXiv kczj5, Center for Open Science.
    17. Sergio Consoli & Luca Tiozzo Pezzoli & Elisa Tosetti, 2022. "Neural forecasting of the Italian sovereign bond market with economic news," Journal of the Royal Statistical Society Series A, Royal Statistical Society, vol. 185(S2), pages 197-224, December.
    18. Firuz Kamalov & Linda Smail & Ikhlaas Gurrib, 2021. "Stock price forecast with deep learning," Papers 2103.14081, arXiv.org.
    19. Firuz Kamalov, 2019. "Forecasting significant stock price changes using neural networks," Papers 1912.08791, arXiv.org.
    20. Zihao Zhang & Stefan Zohren & Stephen Roberts, 2019. "Deep Reinforcement Learning for Trading," Papers 1911.10107, arXiv.org.

    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.