A Comparative Analysis of Machine Learning Models for Long and Short-Term Forecasting of the Egyptian Stock Market: A Focus on EGX30
This study addresses the limited research on stock market forecasting in emerging economies by focusing on short- and long-term predictions of Egypt’s EGX30 index. A systematic evaluation of KNN, Random Forest, XGBoost, LSTM, and GRU models—augmented with ensemble learning—is conducted using RMSE, MAPE, and R² metrics. Results indicate that XGBoost achieves the best performance for one-day-ahead forecasts, while GRU excels in predictions spanning one week to two months. Notably, the ensemble approach improves two-month forecast accuracy by nearly fivefold, and KNN demonstrates unexpected strength in long-term prediction. These findings offer data-driven support for investment decision-making in Middle Eastern emerging markets and highlight substantial variations in model performance across different forecasting horizons.