Abstract
An analysis was conducted to evaluate how effectively different machine learning models can forecast stock performance on the Johannesburg Stock Exchange (JSE), focusing on five primary indices. The research examined both classification and regression capabilities across multiple algorithms, such as Random Forests, Decision Trees, Support Vector Machines, K-Nearest Neighbours, and various boosting methods (XGBoost, LightGBM, AdaBoost), along with Ridge regression. The analysis incorporated weekly market data spanning from 2004 to 2023, including relevant economic indicators as predictive variables.
The analysis reveals that Ridge regression consistently outperforms other models in both classification and regression tasks. Ensemble methods like Random Forest and AdaBoost show strong performance in regression but variable results in classification. Decision Trees underperform while XGBoost shows unexpected weakness. Feature importance analysis identifies oil prices as the most influential predictor, followed by exchange rates and gold prices.
The study concludes that machine learning techniques, particularly ridge regression, can effectively forecast JSE equity prices. However, performance varies significantly between regression and classification tasks, emphasizing the need for task-specific model selection. Recommendations include expanding the methodology to other emerging markets, exploring advanced techniques like deep learning and examining hybrid approaches. The research contributes to the growing literature on machine learning applications in emerging markets' financial forecasting, demonstrating its potential and highlighting areas for further investigation.