CFP last date
20 January 2025
Reseach Article

Stock Market Prediction using RNN-based Models with Random and Tuned Hyperparameters

by Priyank Gupta, Sanjay Kumar Gupta, Rakesh Singh Jadon
International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
Volume 185 - Number 21
Year of Publication: 2023
Authors: Priyank Gupta, Sanjay Kumar Gupta, Rakesh Singh Jadon
10.5120/ijca2023922935

Priyank Gupta, Sanjay Kumar Gupta, Rakesh Singh Jadon . Stock Market Prediction using RNN-based Models with Random and Tuned Hyperparameters. International Journal of Computer Applications. 185, 21 ( Jul 2023), 12-17. DOI=10.5120/ijca2023922935

@article{ 10.5120/ijca2023922935,
author = { Priyank Gupta, Sanjay Kumar Gupta, Rakesh Singh Jadon },
title = { Stock Market Prediction using RNN-based Models with Random and Tuned Hyperparameters },
journal = { International Journal of Computer Applications },
issue_date = { Jul 2023 },
volume = { 185 },
number = { 21 },
month = { Jul },
year = { 2023 },
issn = { 0975-8887 },
pages = { 12-17 },
numpages = {9},
url = { https://ijcaonline.org/archives/volume185/number21/32815-2023922935/ },
doi = { 10.5120/ijca2023922935 },
publisher = {Foundation of Computer Science (FCS), NY, USA},
address = {New York, USA}
}
%0 Journal Article
%1 2024-02-07T01:26:39.831580+05:30
%A Priyank Gupta
%A Sanjay Kumar Gupta
%A Rakesh Singh Jadon
%T Stock Market Prediction using RNN-based Models with Random and Tuned Hyperparameters
%J International Journal of Computer Applications
%@ 0975-8887
%V 185
%N 21
%P 12-17
%D 2023
%I Foundation of Computer Science (FCS), NY, USA
Abstract

The stock market in India has become more passionate in recent years. Because of the maneuverability of the stock market, it is also difficult to predict future trends and patterns in the stock market. Various Deep Learning (DL) methods, such as Recurrent Neural Networks (RNN), produce excellent results in stock market forecasting. In this paper, we integrate RNN-based models such as Long-Short-Term Memory (LSTM), Stacked LSTM, Gated Recurrent Unit (GRU), Stacked GRU, Bidirectional LSTM, Bidirectional GRU, and a Hybrid model to predict the Moving Average Convergence Divergence (MACD) of National Stock Exchange (NSE) of India, i.e., NIFTY50 market index. Some hyperparameters are also considered when training these models, as these hyperparameters control the behavior and performance of such models. Two experiments are carried out to train these RNN-based models: manually selecting and tuning hyperparameters. Metrics such as Mean Squared Error (MSE), Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and Mean Squared Percent Error (MAPE) are used to assess performance. Both experimental results show that the Bidirectional GRU model is the most effective at predicting MACD values in India's NIFTY50 stock market index.

References
  1. Chung, Hyejung, and Kyung-shik Shin. "Genetic algorithm-optimized long short-term memory network for stock market prediction." Sustainability 10, no. 10 (2018): 3765.
  2. Girsang, Abba Suganda, Fernando Lioexander, and Daniel Tanjung. "Stock price prediction using LSTM and search economics optimization." IAENG International Journal of Computer Science 47, no. 4 (2020): 758-764.
  3. Rokhsatyazdi, Ehsan, Shahryar Rahnamayan, Hossein Amirinia, and Sakib Ahmed. "Optimizing LSTM Based Network For Forecasting Stock Market." In 2020 IEEE Congress on Evolutionary Computation (CEC), pp. 1-7. IEEE, 2020.
  4. Gorgolis, Nikolaos, Ioannis Hatzilygeroudis, Zoltan Istenes, and Lazlo–Grad Gyenne."Hyperparameter optimization of LSTM network models through genetic algorithm." In 2019 10th International Conference on Information, Intelligence, Systems and Applications (IISA), pp. 1-4. IEEE, 2019.
  5. Sen, Jaydip, Sidra Mehtab, and Gourab Nath. "Stock price prediction using deep learning models." Lattice: The Machine Learning Journal 1, no. 3 (2020): 34-40.
  6. Sunny, Md Arif Istiake, Mirza Mohd Shahriar Maswood, and Abdullah G. Alharbi. "Deep learning-based stock price prediction using LSTM and bi-directional LSTM model." In 2020 2nd Novel Intelligent and Leading Emerging Sciences Conference (NILES), pp. 87-92. IEEE, 2020.
  7. Yadav, Anita, C. K. Jha, and Aditi Sharan. "Optimizing LSTM for time series prediction in Indian stock market." Procedia Computer Science 167 (2020): 2091-2100.
  8. Chen, Weiling, Yan Zhang, Chai Kiat Yeo, Chiew Tong Lau, and Bu Sung Lee. "Stock market prediction using neural network through the news on online social networks." In 2017 international smart cities conference (ISC2), pp. 1–6. IEEE, 2017.
  9. Althelaya, Khaled A., El-Sayed M. El-Alfy, and Salahadin Mohammed. "Stock market forecast using multivariate analysis with bidirectional and stacked (LSTM, GRU)." In 2018 21st Saudi Computer Society National Computer Conference (NCC), pp. 1–7. IEEE, 2018.
  10. Faraz, Mehrnaz, Hamid Khaloozadeh, and Milad Abbasi. "Stock market prediction-by-prediction based on autoencoder long short-term memory networks." In 2020 28th Iranian Conference on Electrical Engineering (ICEE), pp. 1-5. IEEE, 2020.
  11. URL: https://finance.yahoo.com
  12. URL: https://pypi.org/project/pandas-ta/
  13. URL: https://pypi.org/project/pandas/
  14. URL: https://scikit-learn.org/stable/
  15. URL: https://www.tensorflow.org/
  16. C. Olah, “Understanding Lstm,” accessed: 2020-03-12. [Online]. Available: https://colah.github.io/posts/2015-08-Understanding-LSTMs/
  17. Muhammad, L. J., Ahmed Abba Haruna, Usman Sani Sharif, and Mohammed Bappah Mohammed. "CNN-LSTM deep learning based forecasting model for COVID-19 infection cases in Nigeria, South Africa, and Botswana." Health and Technology (2022): 1–18.
  18. “Deep dive into Bidirectional LSTM” 2019 [Online].
  19. Available:https://www:i2tutorials:com/deep-dive-into-bidirectional-lstm/
  20. Ju, Yun, Min Zhang, and Huixian Zhu. "Study on a New Deep Bidirectional GRU Network for Electrocardiogram Signals Classification." In 3rd International Conference on Computer Engineering, Information Science & Application Technology (ICCIA 2019), pp. 355-359. Atlantis Press, 2019.
  21. URL: https://github.com/harvitronix/neural-network-genetic-algorithm
  22. Osipenko, Alexander. "Genetic algorithms and hyperparameters—Weekend of a Data Scientist."(2019) [Online]. Available:https://medium.com/cindicator/genetic-algorithms-and-hyperparameters-weekend- of-a-data-scientist-8f069669015e
Index Terms

Computer Science
Information Sciences

Keywords

RNN LSTM Stacked LSTM Bidirectional LSTM GRU Stacked GRU Bidirectional GRU Stock Market MACD NIFTY50.