Skip to main content

Prediction of Moroccan Stock Price Based on Machine Learning Algorithms

  • Conference paper
  • First Online:
Intelligent Systems Design and Applications (ISDA 2021)

Abstract

Stock price prediction one of the most fascinating challenges for both professionals and academicians, especially in high-volatility and high-complexity environments. Traders employ a variety of strategies to forecast stock values. In this study, we used a combination of technical indicators and the Random Forest (RF) algorithm to forecast Moroccan stock market in several time periods (1, 5 and 10 days), and we compared the findings to those of the Support Vector Machine (SVM) model. For all of the datasets tested, the results demonstrate that the RF technique beats SVM in different time frames. The accuracy, F-Score, Recall, and AUC of the ROC curve were used to assess the robustness of our model.

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 259.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 329.99
Price excludes VAT (USA)
  • Compact, lightweight 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. Andrea, P.: Technical analysis and sentiment embeddings for market trend prediction. Expert Syst. Appl. 135, 60–70 (2019)

    Article  Google Scholar 

  2. Fama, E.F.: Random walk in stock market prices. Financ. Anal. J. 21, 55–59 (1965)

    Article  Google Scholar 

  3. Bachelier, L.: Théorie de la spéculation. Annales scientifiques de l’École normale supérieure 17, 21–86 (1900). https://doi.org/10.24033/asens.476

  4. Brasileiro, R.C., Souza, V.L.F., Femandes, B.J.T., Oliveira, A.L.I.: Automatic method for stock trading combining technical analysis and the Artificial Bee Colony Algorithm. In: IEEE Congress on Evolutionary Computation, 20–23 June 2013, Cancun, Mexico (2013)

    Google Scholar 

  5. Chang, P.C., Fan, C.Y., Liu, C.H.: Integrating a piecewise linear representation method and a neural network model for stock trading points prediction. IEEE Trans. Syst. Man Cybern. Part C Appl. Rev. 39(1), 80–92 (2009)

    Article  Google Scholar 

  6. Giles, C.L., Lawrence, S., Tsoi, A.C.: Noisy time series prediction using a recurrent neural network and grammatical inference. Mach. Learn. 44(1–2), 161–183 (2001)

    Article  Google Scholar 

  7. Mallick, D., Lee, V.C., Ong, Y.S.: An empirical study of genetic programming generated trading rules in computerized stock trading service system. In: 5th International Conference Service Systems and Service Management – Exploring Service Dynamics with Science and Innovative Technology, ICSSSM 2008, pp. 1–6 (2008)

    Google Scholar 

  8. Agrawal, M., Khan, A.U., Shukla, P.K.: Stock price prediction using technical indicators: a predictive model using optimal deep learning. Int. J. Recent Technol. Eng. (IJRTE) 8(2) (2019). ISSN: 2277-3878

    Google Scholar 

  9. Sezer, O.B., Ozbayoglu, M.A., Dogdu, E.: A deep neural-network based stock trading system based on evolutionary optimized technical analysis parameters. Procedia Comput. Sci. 114, 473–480 (2017)

    Article  Google Scholar 

  10. Basak, S., Kar, S., Saha, S., Khaidem, L., Dey, S.R.: Predicting the direction of stock market prices using tree-based classifiers. North Am. J. Econ. Finance 47, 552–567 (2019)

    Article  Google Scholar 

  11. Kumar, M., Thenmozhi, M.: Forecasting stock index movement: a comparison of support vector machines and random forest. In: Indian Institute of Capital Markets 9th Capital Markets Conference Paper (2006)

    Google Scholar 

  12. Khaidem, L., Saha, S., Dey, S.R.: Predicting the direction of stock market prices using random forest. Appl. Math. Finance (2016)

    Google Scholar 

  13. Imandoust, S., Bolandraftar, M.: Forecasting the direction of stock market index movement using three data mining techniques: the case of Tehran Stock Exchange. J. Eng. Res. Appl. 4(6), 106–117 (2014). ISSN: 2248-9622 (Version 2)

    Google Scholar 

  14. Shen, S., Jiang, H., Zhang, T.: Stock market forecasting using machine learning algorithms (2012)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Abdelhadi Ifleh .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ifleh, A., El Kabbouri, M. (2022). Prediction of Moroccan Stock Price Based on Machine Learning Algorithms. In: Abraham, A., Gandhi, N., Hanne, T., Hong, TP., Nogueira Rios, T., Ding, W. (eds) Intelligent Systems Design and Applications. ISDA 2021. Lecture Notes in Networks and Systems, vol 418. Springer, Cham. https://doi.org/10.1007/978-3-030-96308-8_68

Download citation

Publish with us

Policies and ethics