Skip to main content

Stock Market Prediction: A Time Series Analysis 

  • Conference paper
  • First Online:
Smart Systems: Innovations in Computing

Part of the book series: Smart Innovation, Systems and Technologies ((SIST,volume 235))

Abstract

Stock market prediction is one of the most critical tasks in the area of computation due to its high erratic nature. There are many factors involved in the stock market that are responsible for the rapid vicissitudes of the stock price. Continual unsettlement in the stock market is the primary reason for the investors to sell out their stock at a deceitful time that leads to failure to gain profits. Due to the continual unsettlement of stock price, it is not possible to predict stock market movement with full accuracy but by predicting the stock market movement more precisely based on the historical data analysis, we can reduce the loss of investors largely. To predict the stock market movement, several machine learning techniques are available. Here, we have employed several machine learning approaches on historical stock price data to understand future trends and patterns. To do this, we have applied five regression models namely linear regression, random forest, support vector regression (SVR), vector autoregression (VAR), and long short-term memory (LSTM). To determine the actual performance of the models, several metrics namely explained variance score (EVS), root mean squared error (RMSE), mean square error (MSE), mean absolute error (MAE), R squared score (R2 Score), and adjusted R squared score (adjusted R2 score) have been used here to evaluate the models’ performance. Among all these models, the LSTM model outperformed the other models in terms of the abovementioned metrics. The obtained EVS, RMSE, MSE, MAE, R2 score, and adjusted R2 score of LSTM are 0.9726, 0.6220, 0.3869, 0.4306, 0.9716, and 0.9697, respectively. The obtained result is very significant for stock market prediction.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 299.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 379.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 379.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Stock Market. https://en.wikipedia.org/wiki/Stock_market (2020). Last accessed 1 Nov 2020

  2. Dhaka Stock Exchange. https://en.wikipedia.org/wiki/Dhaka_Stock_Exchange (2020). Last accessed 1 Nov 2020

  3. Lanbouri, Z., Achchab, S.: Stock market prediction on high frequency data using long-short term memory. Procedia Comput. Sci. 175, 603–608 (2020). https://doi.org/10.1016/j.procs.2020.07.087

    Article  Google Scholar 

  4. Seethalakshmi, R.: Analysis of stock market predictor variables using linear regression. Int. J. Pure Appl. Math. 119(15), 369–378 (2018)

    Google Scholar 

  5. Mathew, O.O., Sola, A.F., Oladiran, B.H., Amos, A.A.: Prediction of stock price using autoregressive integrated moving average filter ((ARIMA (p, d, q))). Global J. Sci. Front. Res. 13(8), 79–88 (2013)

    Google Scholar 

  6. Dong, Y., Li, S., Gong, X.: Time series analysis: an application of arima model in stock price forecasting. In: 2017 International Conference on Innovations in Economic Management and Social Science (IEMSS 2017), Atlantis Press (2017)

    Google Scholar 

  7. Zou, Z., QU. Z.: Using LSTM in stock prediction and quantitative trading, Stanford University

    Google Scholar 

  8. Ashik, M., Senthamarai Kannan. K.: Forecasting national stock price using ARIMA Model. Global Stoch. Anal. 4(1), 77–81 (2017)

    Google Scholar 

  9. Moghar, A., Hamiche, M.: Stock market prediction using LSTM recurrent neural network. Procedia Comput. Sci. 170, 1168–1173 (2020). https://doi.org/10.1016/j.procs.2020.03.049

    Article  Google Scholar 

  10. Meesad, P., Rasel, R.I.: Predicting stock market price using support vector regression. In 2013 International Conference on Informatics, Electronics and Vision (ICIEV), pp. 1–6. IEEE (2013)

    Google Scholar 

  11. Biswas, A.A., Basak, S.: Forecasting the trends and patterns of crime in Bangladesh using machine learning model. In: 2nd International Conference on Intelligent Communication and Computational Techniques (ICCT), pp. 115–119. IEEE (2019). https://doi.org/10.1109/ICCT46177.2019.8969031

  12. Adebiyi, A.A., Adewumi, A.O., Ayo, C.K.: Stock price prediction using the ARIMA model. In: UKSim-AMSS 16th International Conference on Computer Modelling and Simulation, pp. 105–111 (2014)

    Google Scholar 

  13. Biswas, A.A., Mia, J.M., Majumder, A.: Forecasting the number of road accidents and casualties using random forest regression in the context of Bangladesh. In: 10th International Conference on Computing, Communication and Networking Technologies (ICCCNT), pp. 115–119. IEEE (2019). https://doi.org/10.1109/ICCCNT45670.2019.8944500

  14. Dhaka Stock Exchange Ltd. https://www.dsebd.org/day_end_archive.php?startDate=2018-09-23&endDate=2020-08-31&inst=BEXIMCO&archive=data (2020). Last accessed 1 Sept 2020

  15. Feature Scaling. https://en.wikipedia.org/wiki/Feature_scaling (2020). Last accessed 5 Oct 2020

  16. Multiple Linear Regression (MLR): https://www.investopedia.com/terms/m/mlr.asp (2020). Last accessed 5 Nov 2020

  17. Random Forest Regression: When Does It Fail and Why: https://neptune.ai/blog/random-forest-regression-when-does-it-fail-and-why (2020). Last accessed 5 Nov 2020

  18. Awad M., Khanna R.: Support vector regression. In: Efficient Learning Machines. Apress, Berkeley, CA (2015). https://doi.org/10.1007/978-1-4302-5990-9_4

  19. Zivot, E., Wang, J.: Vector autoregressive models for multivariate time series. Modeling financial time series with S-PLUS®, pp. 385–429 (2006)

    Google Scholar 

  20. Understanding LSTM Networks: https://colah.github.io/posts/2015-08-Understanding-LSTMs/ (2020). Last accessed 6 Nov 2020

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Al Amin Biswas .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Majumder, A., Rahman, M.M., Biswas, A.A., Zulfiker, M.S., Basak, S. (2022). Stock Market Prediction: A Time Series Analysis . In: Somani, A.K., Mundra, A., Doss, R., Bhattacharya, S. (eds) Smart Systems: Innovations in Computing. Smart Innovation, Systems and Technologies, vol 235. Springer, Singapore. https://doi.org/10.1007/978-981-16-2877-1_35

Download citation

Publish with us

Policies and ethics