Stock Market Price Forecasting Using Recurrent Neural Network

Authors

  • Pragya Bhardwaj Programmer Analyst Trainee
  • Jayant Kwatra

DOI:

https://doi.org/10.34818/INDOJC.2022.7.1.612

Keywords:

LSTM, MACHINE LEARNING, RECURRENT NEURAL NETWORK, STOCK MARKET

Abstract

A stock refers to the ownership of the organisation and its investors. A market where these stocks are sold or purchased is known as stock market. The prices of the stock is listed over National Stock Exchange or Bombay Stock Exchange for all Indian Companies. In this work, a machine learning approach is used to predict and forecast the prices of a company listed in NSE and BSE for 30 days using recurrent neural network known as stacked long-short term memory model. The results show that the model worked highly effective in performing the task. The model in the evaluation phase gave a root mean square error of 3.00 on the training data, 0.03 on testing data. R2 score for training data was 0.99 and 0.97 for the testing data. The prices when compared by the client organisation showed that they matched the predicted values to upto 90%. Thus, stacked LSTM models are one of the best models to make predictions of stock related data.

Downloads

Download data is not yet available.

References

[1]. Budiharto, W. (2021). Data science approach to stock prices forecasting in Indonesia during Covid-19 using Long Short-Term Memory (LSTM). Journal of big data, 8(1), 1-9. DOI - https://doi.org/10.1186/s40537-021-00430-0.
[2]. Moghar, A., & Hamiche, M. (2020). Stock market prediction using LSTM recurrent neural network. Procedia Computer Science, 170, 1168-1173.DOI - https://doi.org/10.1016/j.procs.2020.03.049
[3]. Pramod, B. S., & PM, M. S. (2020). Stock Price Prediction Using LSTM. Available at -https://www.researchgate.net/profile/MallikarjunaPm/publication/348390803_Stock_Price_Prediction_Using_LSTM/links/5ffc6a23a6fdccdcb84a20f8/Stock-Price-Prediction-Using-LSTM.pdf
[4]. Mehtab, S., & Sen, J. (2020, November). Stock price prediction using CNN and LSTM-based deep learning models. In 2020 International Conference on Decision Aid Sciences and Application (DASA) (pp. 447-453). IEEE DOI - 10.1109/DASA51403.2020.9317207.
[5]. Elsworth, S., & Güttel, S. (2020). Time series forecasting using LSTM networks:A symbolic approach. a rXiv preprint arXiv:2003.05672. Available at - https://arxiv.org/pdf/2003.05672.pdf.
[6] Hao, Y., & Gao, Q. (2020). Predicting the trend of stock market index using the hybrid neural network based on multiple time scale feature learning. Applied Sciences, 10( 11), 396.
DOI- https://doi.org/10.3390/app10113961.
[7] Indian Stock-Market Prediction using Stacked LSTM AND Multi-Layered Perceptron Siddharth Banyal, Pushkar Goel, Deepank Grover – 2020. DOI - 10.35940/ijitee.C8026.019320
[8]. Jiang, W. (2020). Applications of deep learning in stock market prediction: recent progress. a rXiv preprint arXiv:2003.01859.DOI - https://doi.org/10.1016/j.eswa.2021.115537
[9]. Nti, I. K., Adekoya, A. F., & Weyori, B. A. (2020). A comprehensive evaluation of ensemble learning for stock-market prediction. J ournal of Big Data, 7 ( 1), 1-40. DOI- https://doi.org/10.1186/s40537-020-00299-5
[10]. Essien, A., & Giannetti, C. (2019, July). A deep learning framework for univariate time series prediction using convolutional LSTM stacked autoencoders. In 2019 IEEE International Symposium on INnovations in Intelligent SysTems and Applications (INISTA) (pp. 1-6). IEEE. DOI - 10.1109/INISTA.2019.8778417.
[11]. Van Houdt, G., Mosquera, C., & Napoles, G. (2020). A review on the long short-term memory model. Artificial Intelligence Review, 5 3, 5929-5955. DOI- 10.1007/s10462-020-09838-1

[12]. Ojo, S. O., Owolawi, P. A., Mphahlele, M., & Adisa, J. A. (2019, November). Stock market behaviour prediction using stacked LSTM networks. In 2019 International Multidisciplinary Information Technology and Engineering Conference (IMITEC) (pp. 1-5). IEEE. DOI - 10.1109/IMITEC45504.2019.9015840.
[13] Nandakumar, R., Uttamraj, K. R., Vishal, R., & Lokeswari, Y. V. (2018). Stock price prediction using long short term memory. International Research Journal of Engineering and Technology, 5 ( 03). Available at -https://www.irjet.net/archives/V5/i3/IRJET-V5I3788.pdf
[14]. Gao, S. E., Lin, B. S., & Wang, C. M. (2018, December). Share price trend prediction using CRNN with LSTM structure. In 2018 International Symposium on Computer, Consumer and Control (IS3C) (pp. 10-13). IEEE. DOI - https://doi.org/10.1080/23080477.2019.1605474
[15]. Hiransha, M., Gopalakrishnan, E. A., Menon, V. K., & Soman, K. P. (2018). NSE stock market prediction using deep-learning models. Procedia computer science, 132, 1351-1362
DOI -https://doi.org/10.1016/j.procs.2018.05.050.
[16]. Althelaya, K. A., El-Alfy, E. S. M., & Mohammed, S. (2018, April). Evaluation of bidirectional LSTM for short-and long-term stock market prediction. In 2018 9th international conference on information and communication systems (ICICS) (pp.151-156). IEEE. DOI - 10.1109/IACS.2018.8355458.
[17]. Heaton, J. B., Polson, N. G., & Witte, J. H. (2017). Deep learning for finance: deep portfolios. Applied Stochastic Models in Business and Industry, 3 3( 1), 3-12. DOI - https://doi.org/10.1002/asmb.2209
[18]. Budhani, N., Jha, C. K., & Budhani, S. K. (2014, August). Prediction of stock market using artificial neural network. In 2014 International Conference of Soft Computing Techniques for Engineering and Technology (ICSCTET) (pp. 1-8). IEEE. DOI - 10.1109/ICSCTET.2015.7371196.
[19]. Chatzis, S. P., Siakoulis, V., Petropoulos, A., Stavroulakis, E., & Vlachogiannakis, N. (2018). Forecasting stock market crisis events using deep and statistical machine learning techniques. Expert systems with applications, 112,353-371. DOI - https://doi.org/10.1016/j.eswa.2018.06.032
[20]. Gharehchopogh, F. S., Bonab, T. H., & Khaze, S. R. (2013). A linear regression approach to prediction of stock market trading volume: a case study. International Journal of Managing Value and Supply Chains, 4(3), 25. DOI - 10.5121/ijmvsc.2013.4303
[21] Jordan, M. I., & Mitchell, T. M. (2015). Machine learning: Trends, perspectives, and prospects. Science, 349(6245), 255-260. DOI - https://doi.org/10.1007/978-3-030-82014-5_28
[22]. https://colah.github.io/posts/2015-08-Understanding-LSTMs/

Downloads

Published

2022-04-01

How to Cite

Bhardwaj, P., & Kwatra, J. (2022). Stock Market Price Forecasting Using Recurrent Neural Network . Indonesian Journal on Computing (Indo-JC), 7(1), 51–60. https://doi.org/10.34818/INDOJC.2022.7.1.612

Issue

Section

Computer Science