Cuadernos de Economía

Determinants of Egypt’s Stock Market Performance: Evidence from Machine Learning Algorithms

  • Mohamed Ahmed Mohamed Matar , Economic Department, Faculty of Commerce, Mansoura University, Egypt.
  • Mohamed Maher , Economic Department, Faculty of Commerce, Mansoura University, Egypt.
  • Eman Ahmed Ahmed Awad , Economic Dept, Nile Higher Institute for Commercial Science and Computer Technology, Mansoura, Egypt.
  • Neveen Mohsen Ahamed Zaki , Applied Statistics Department and Insurance, Faculty of Commerce, Mansoura University, Egypt.
  • Nabil Medhet Arafat Mahmoud , Applied Statistics Department and Insurance, Faculty of Commerce, Mansoura University, Egypt.
  • Mohammed Galal Abdallah Mostafa , Economic Department, Faculty of Commerce, Mansoura University, Egypt.

Keywords:

Stock Market Performance, Machine Learning, Egypt Stock Exchange, Predictive Modeling, Financial Indicators..

Abstract

Stock markets play a vital role in the direction of the flow of capital and economic growth of developing economies; however, the role of various factors on the stock market is debatable and differs from country to country. This study aims to explore the macroeconomic factors that affect the performance of the Egyptian stock market from 2000 to 2023 through the comparative evaluation of six supervised machine learning algorithms: Random Forest, Support Vector Machine (SVM), Logistic Regression, Naive Bayes, K-Nearest Neighbours (KNN), and Gradient Boosting, with the inclusion of the Multilayer Perceptron (MLP) neural network as a supplementary tool. Out of the six machine learning algorithms, the neural network was found to be the most effective model to predict the Egyptian stock market performance, with a precision of 87.2% and an Area Under the Curve (AUC) of 0.872, which suggests that the Egyptian stock market behaves non-linearly and asymmetrically. According to the feature importance of the model, the lagged stock price was found to be the most important feature, contributing 18% to the overall model performance, which reflects the effect of the Keynesian concept of animal spirits and self-fulfilling prophesies rather than equity valuation based on fundamental analysis. Gross domestic product (GDP), gold price, and crude oil price were found to be the second, third, and fourth most important factors, respectively. Moreover, the parameter estimation of the neural network model revealed that the monetary factors of money supply, gold price, and the exchange rate have the highest absolute weights in the hidden layer of the network.