Predicting the Trends of the Egyptian Stock Market Using Machine Learning and Deep Learning Methods

Document Type : Original Article

Authors

1 Department of Applied Statistics, Faculty of Commerce, Mansoura University, Mansoura City 35516, Egypt

2 Department of Statistics and Mathematics, the Higher Institute of Administrative Sciences, El-Menzala, Dakahleya, Egypt

3 Department of Applied Statistics and Insurance-Faculty of Commerce - Mansoura University, Dakahleya, Egypt

Abstract

The prediction of stock price movements has remained a significant area of interest for researchers and investors, driven by the dynamic nature of financial markets and persistent economic fluctuations. The ability to forecast price trends enables investors to optimize their portfolios by identifying stocks likely to appreciate in value while avoiding those predicted to decline, thus maximizing returns and minimizing losses. This study focuses on forecasting the stock price movements of selected companies in the real estate sector listed on the Egyptian Stock Exchange over the period 2013--2022. It employs a range of machine learning algorithms, including Random Forest (RF), Adaptive Boosting (AdaBoost), Support Vector Machine (SVM), and K-Nearest Neighbours (KNN), as well as deep learning architectures such as Artificial Neural Networks (ANNs), Recurrent Neural Networks (RNNs), and Long Short-Term Memory (LSTM) networks. The study aims to evaluate and compare the performance of these methods in terms of predictive accuracy, with the ultimate goal of reducing the uncertainty associated with stock market forecasting. By applying these computational techniques, the research seeks to uncover patterns and insights within large datasets, providing actionable intelligence for investors and traders. The comparative analysis reveals that Adaptive Boosting achieves the highest accuracy among the machine learning algorithms, with a precision rate of 99.5%. Among deep learning models, LSTM exhibits superior predictive capability, yielding the lowest error rate, followed by RNN with an error rate of 0.3. These findings demonstrate the efficacy of advanced machine learning and deep learning models in stock price prediction, offering robust tools for enhancing decision-making processes in financial markets. The results highlight the potential of integrating data-driven methodologies to mitigate risks and improve investment outcomes. 

Keywords

Main Subjects