Introduction Macroeconomic forecasting is vital for policy-making, yet traditional models struggle with non-linear economic data. This study explores deep learning models - LSTM, Bi-LSTM, and GRU- for forecasting GDP, GNI, and PPP in selected African countries. These models effectively handle long-term dependencies and adapt to data inconsistencies and economic volatility common in developing economies. By evaluating their forecasting performance, the study aims to identify the most suitable model and compare macroeconomic trends across countries. This approach enhances forecasting accuracy, supporting more informed policymaking and promoting sustainable economic growth in Africa. Materials and Methods This study uses secondary panel data from 1990 to 2019 for six African countries -Nigeria, Rwanda, Tunisia, Ghana, South Africa, and Beninsourced from UNESCO. It focuses on three macroeconomic indicators: GDP, PPP, and GNI, to model economic growth. Deep learning models - LSTM, Bi-LSTM, and GRUare employed for forecasting due to their ability to capture long-term dependencies and nonlinear relationships. Results and Discussion Table 1: Model Performance Figure 1: Validation and Prediction Plot of LSTM Bi-LSTM and GRU The model performance metrics show that LSTM delivers the highest accuracy with RMSE (0.94) and MAE (0.93), making it the most reliable for forecasting economic trends. While Bi-LSTM has added complexity, its RMSE (0.87) and MAE (0.95) indicate slightly lower accuracy. GRU is more efficient but less accurate than LSTM. Figure 1 confirms LSTM’s strength in capturing long-term dependencies, with predictions closely aligning with actual data. These results highlight LSTM’s superiority in modeling complex macroeconomic patterns, underscoring the potential of deep learning to enhance forecasting accuracy and support better economic planning in African economies. Conclusion The study concludes that the LSTM model is the most suitable for forecasting economic growth in African countries, achieving the lowest MAE, RMSE, and MSE after parameter tuning. Compared to Bi-LSTM and GRU, LSTM demonstrates superior performance in modeling dynamic panel data. Among the countries analyzed, South Africa leads in GDP and GNI, reflecting its economic dominance, while Rwanda records the highest PPP. These findings highlight the diverse economic potential across African nations and reinforce the effectiveness of deep learning models in macroeconomic forecasting, offering valuable tools for more accurate economic planning and policy-making. Keywords: Macroeconomic, LTSM, GRU, Dynamic Panel Data, Economic Growth
Emmanuel O. K Shobanke, Ndubuisi O. Okoro