Abstract
Stock market investments have become an essential part of our lives as they offer a means of growing wealth and securing financial stability for individuals and businesses alike. However, predicting and investing in a stock is a complex method and demands significant levels of knowledge, proficiency, and skill. Stock market prediction is the act of analyzing historical information and trends in the market in order to make informed forecasts about the potential future worth of a given stock or instrument that is traded on a financial instrument exchange. When making stock predictions, most stockbrokers use both fundamental and technical analysis and time series analysis. The study focuses on the implementation of Multi-Linear Regression, LSTM, CNN, and LSTM + GRU based Machine learning techniques using technical analysis to predict stock’s closing values from the NYSE, and NASDAQ markets for multiple days. The dataset has been taken from Yahoo, of 10-year span. The factors taken into consideration for predicting stock prices are open, close, low, and high. The model’s effectiveness is measured using common strategic metrics like RMSE, MSE, MAE, and R2. A lower value for these variables suggests that the models are good at forecasting stock closing prices. After conducting a comprehensive evaluation, we found that LSTM + GRU model performs the best among the tested models for predicting multiple days, followed by CNN and LSTM. The tested models demonstrate a remarkable level of accuracy in predicting stock market prices. This research work provides a valuable contribution to the fields of financial and technical analysis in the stock market research community.
Similar content being viewed by others
Data availability
We used publicly available datasets from Yahoo Finance (https://finance.yahoo.com) (for the time period April 2013 to 31 March 2023).
References
Fathali Z, Kodia Z, Ben Said L (2022) Stock market prediction of Nifty 50 index applying machine learning techniques. Appl Artif Intell 36(1):2111134
Gupta A, Joshi K, Patel M, Pratap MV (2023) Stock prices prediction using machine learning. In: 2023 2nd International Conference for Innovation in Technology (INOCON), . IEEE, pp 1–7. https://doi.org/10.1109/INOCON57975.2023.10101226
Aldhyani TH, Alzahrani A (2022) Framework for predicting and modeling stock market prices based on deep learning algorithms. Electronics 11(19):3149
What Is Stock Price Prediction? Wikipedia contributors, “Stock market prediction,” Wikipedia, The Free Encyclopedia, 03-Apr-2023. [Online]. Available: https://en.wikipedia.org/w/index.php?title=Stock_market_prediction&oldid=1147956250. Accessed 15 Apr 2023
De Prado ML (2018) Advances in financial machine learning. John Wiley & Sons
Hilpisch Y (2014) Python for finance: analyze big financial data. " O'Reilly Media, Inc."
Omar AB, Huang S, Salameh AA, Khurram H, Fareed M (2022) Stock market forecasting using the random forest and deep neural network models before and during the COVID-19 period. Front Environ Sci 10:917047. https://doi.org/10.3389/fenvs.2022.917047
Xiao D, Su J (2022) Research on stock price time series prediction based on deep learning and autoregressive integrated moving average. Sci Program. https://doi.org/10.1155/2022/4758698
Shen J, Shafiq MO (2020) Short-term stock market price trend prediction using a comprehensive deep learning system. J Big Data 7(1):1–33
Chandola D, Mehta A, Singh S, Tikkiwal VA, Agrawal H (2023) Forecasting directional movement of stock prices using deep learning. Ann Data Sci 10(5):1361–1378
Ji X, Wang J, Yan Z (2021) A stock price prediction method based on deep learning technology. Int J Crowd Sci 5(1):55–72
Wei J, Xu Q, He C (2022) Deep learning of predicting closing price through historical adjustment closing price. Proc Comput Sci 202:379–384
Sen J, Mehtab S (2021) Design and analysis of robust deep learning models for stock price prediction. Mach Learn–Algoritms Model Appl 15–46. https://doi.org/10.5772/intechopen.99982
Bhandari HN, Rimal B, Pokhrel NR, Rimal R, Dahal KR, Khatri RK (2022) Predicting stock market index using LSTM. Mach Learn Appl 9:100320
de la Fuente AR, Sanchez-Ramirez E, Calderón-Alvarado MP, Segovia-Hernandez JG, Hernández-Vargas EA (2022) Development of Deep Learning Architectures for Forecasting Distillation Columns Dynamic Behavior of Biobutanol Purification. In Computer Aided Chemical Engineering (vol 51, pp 49–54). Elsevier
Yujun Y, Yimei Y, Jianhua X (2020) A hybrid prediction method for stock price using LSTM and ensemble EMD. Complexity 2020:1–16
Saxena S (2021) Introduction to gated recurrent unit (GRU). Analytics Vidhya. [Online]. Available: https://www.analyticsvidhya.com/blog/2021/03/introduction-to-gated-recurrent-unit-gru/. [Accessed: 30-Apr-2023]
Zhou GB, Wu J, Zhang CL, Zhou ZH (2016) Minimal gated unit for recurrent neural networks. Int J Autom Comput 13(3):226–234. https://doi.org/10.1007/s11633-016-1006-2
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Gupta, A., ., A., Joshi, K. et al. Visualization and forecasting of stock’s closing price using machine learning. Multimed Tools Appl (2024). https://doi.org/10.1007/s11042-024-18376-9
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11042-024-18376-9