Abstract
Accurate prediction of real gross domestic product growth is crucial for economic forecasting
and policymaking. This study investigated the use of machine learning techniques to improve
the accuracy of gross domestic product growth predictions for South Africa, addressing the
complex requirements of economic forecasting in a volatile environment. The complex, nonlinear
relationships and external shocks that affect gross domestic products are often not well
captured by traditional econometric models, which mostly rely on historical data and linear
assumptions. As a result, there is an urgent need for adaptable, data-driven approaches that
can adjust to changing economic circumstances. This research aims to enhance the accuracy
of domestic product growth forecasting by employing recurrent neural networks such as long
short-term memory, bi-directional long short-term memory models, and Ensemble Learning
models such as random forest, gradient boosting, staking and XGBoost regression models. The
primary research question examines how machine learning models can be used to enhance South
Africa GDP forecasting and identifies which specific models yield the most accurate predictions.
Secondary data from Statistics SA for the years 1993 to 2023 was used in the study. Python
modules were used to preprocess the dataset for data normalisation and cleaning. Metrics including
coefficient of determination, mean absolute error, and root mean square error were used
to evaluate the performance of the model. The bi-directional long short-term memory model
has the highest coefficient of determination of 93%, and lowest mean absolute error of 0.40,
and root mean square error of 0.46, demonstrating its the ability to detect temporal connections
in economic data. The models’ shortcomings in processing sequential economic data were
highlighted by the lowest coefficient of determination of 78% and 79%, respectively and largest
error rates displayed by XGBoost and Stacking. The results highlight the potential of deep
learning models to provide accurate and reliable economic projections, calling for the incorporation
of machine learning approaches into economic modelling and policy-making frameworks.
i
Abstract
To improve forecasting robustness, more research is required to examine hybrid models and the
addition of additional economic variables.