Barhoumi, K., L. Ferrara, and O. Darne. 2012. “Nowcasting the German GDP: A comparison of bridge and factor models.” Journal of Policy Modeling 34(6): 864–78.
Bok, B., D. Caratelli, D. Giannone, A. Sbordone, and A. Tambalotti. 2017. “Macroeconomic Nowcasting and Forecasting with Big Data.” Staff Report No. 830, Federal Reserve Bank of New York.
Buell, B., R. Cherif, C. Chen, H. Seo, J. Tang, and N. Wendt. 2021. “Impactof COVID-19: Nowcasting and Big Data to Track Economic Activity in Sub-Saharan Africa.” IMF Working Papers 21/124, International Monetary Fund, Washington, DC.
Giannone, D., L. Reichlin, and D. Small. 2008. “Nowcasting: The Real-Time Informational Content of Macroeconomic Data.” Journal of Monetary Economics 55: 665–76.
Efron, B., T. and Hastie. 2016. Computer Age Statistical Inference: Algorithms, Evidence, and Data Science. London: Cambridge University Press.
International Monetary Fund. 2020. Regional Economic Outlook: Sub-Saharan Africa—COVID-19: An Unprecedented Threat to Development. Washington, DC, April.
International Monetary Fund. 2020. Regional Economic Outlook: Sub-Saharan Africa—A Difficult Road to Recovery. Washington, DC, October.
International Monetary Fund. 2021. Regional Economic Outlook: Sub-Saharan Africa—Navigating a Long Pandemic. Washington, DC, April.
Iyer, T, and A. Gupta. 2019. “Nowcasting Economic Growth in India: The Role of Rainfall.” Economics Working Paper Series No. 593, Asian Development Bank, Manila.
James, G., D. Witten, T. Hastie, and R. Tibshirani. 2021. An Introduction to Statistical Learning, Second Edition. New York: Springer.
Marini, M. 2016. “Nowcasting Annual National Accounts with Quarterly Indicators: An Assessment of Widely Used Benchmarking Methods.” IMF Working Paper 16/71, International Monetary Fund, Washington, DC.
Narita, F., and R. Yin. 2018. “In Search of Information: Use of Google Trends’ Data to Narrow Information Gaps for Low-income Developing Countries. IMF Working Papers 18/286, International Monetary Fund, Washington, DC.
Richardson, A., T. Mulder, and T. Vehbi. 2021. “Nowcasting GDP using machine-learning algorithms: A real-time assessment.” International Journal of Forecasting 37: 941–48.
Solmaz, S., and M. Taheri Sanjani. 2015. “How External Factors Affect Domestic Economy: Nowcasting an Emerging Market.” IMF Working Paper 15/269, International Monetary Fund, Washington, DC.
Tiffin, A. 2016. “Seeing in the Dark: A Machine-Learning Approach to Nowcasting in Lebanon.” IMF Working Paper 16/56, International Monetary Fund, Washington, DC.
VII. Appendix: Concepts and Tools in Machine Learning
There is no widely accepted consensus on the definition of machine learning. Broadly, the field has its origins in computational statistics and is chiefly concerned with the use of algorithms to identify patterns within a dataset (Kuhn and Johnson 2016). The actual algorithms can range from the OLS regression to the most complex “deep learning” network; but machine learning is distinguished by its often single-minded focus on predictive performance—indeed, the core of machine learning is the design of experiments to assess how well a model trained on one dataset will predict new data.
As such, machine learning is almost ideally suited to the nowcasting problem, where the goal is to use all currently available information to predict what future GDP releases will say about the current environment. For this purpose, it does not matter whether an indicator is a causal factor that shapes GDP or whether it is instead a symptom of GDP growth. What matters is simply that the indicator contains information about the current state of the economy (Tiffin 2016).
In this regard, the growing popularity of machine-learning techniques stems from their ability to discover complicated patterns that have not been specified in advance. In economics in particular, the world is complex, and everything is connected. Hence, a useful predictive model should ideally be able to sift efficiently through a broad range of potential variables, identifying the relationships, thresholds, and interactions that are most reliably and robustly informative.
We thank Papa N’Diaye, Catriona Purfield, Abebe Aemro Selassie, Aqib Aslam, Karen Ongley, Abdoul Aziz Wane, Andrew Berg, Tristan Walker, Kirpal Chauhan, David Robinson, Monique Newiak, Massimiliano Marcelino, Laurence Allain, Nkunde Mwase, participants at IMF events, and fellow members of the IMF African Department’s Nowcasting Team for their useful comments. The editing and production were overseen by Cheryl Toksoz. This project was selected as a co-winner of the 2020 IMF-wide “COVID-19: Call for Ideas” innovation event. All errors are our own.
Buell and others (2021) discuss potential projection tools without applying them to the COVID-19 period.
Useful predictors may not always have high correlation with GDP growth since the relationship may not be linear. Machine learning has the advantage of capturing both linear and non-linear relationships.
For example, one such indicator is the Google mobility indicator, which may be related to economic activity and the impact of lockdown measures. However, the time series for this is relatively short, starting from early 2020, leading to missing data issues. Incorporating such indicators is a useful topic for future research, including developing more efficient algorithms to deal with missing data and using non-macroeconomic indicators for nowcasting.
The RMSE, which measures the distance between the actual time series and the predicted values, is commonly used to evaluate how close the predictions are to the data. An alternate metric is the mean absolute error (MAE), which puts relatively less penalty weight on predictions with large errors and, therefore, makes the model less sensitive to them. There are discontinuities in its derivative, which hinder its widespread use. Thus, RMSE remains analytically convenient and the most popular in the literature. RMSE is used both in the training sample to tune hyperparameters and in the hold-out set to choose the algorithm in the horserace.
The techniques considered include OLS, step model, elastic net, principal component regression, partial least squares regression, multivariate adaptive regression spline, random forest, stochastic gradient boosting trees, support vector machine (linear, polynomial, and radial basis function), relevance vector machine (linear, polynomial, and radial basis function), and gaussian process (linear, polynomial, and radial basis function) and their “variable selection” variants.
Alternatively, local interpretable model-agnostic explanations (LIME) are a local surrogate method that takes a particular prediction, perturbs the data underlying that prediction, employs a simple linear algorithm to fit the perturbed data, and essentially builds a simpler, more interpretable model for the space around the prediction. This also allows for an exploration of each variable’s contribution to the chosen prediction.
This country was chosen because its GDP publication is relatively timely. This enables to compare the framework’s projections with realized values during the COVID-19 crisis. In addition, the PMI data are available, which are a useful predictor.
While there is no clear rule on how long the “training and tuning” period should be (for example, 90 percent), it should include at least one period during the COVID-19 crisis so that the COVID-19 dummy, if included as a predictor, varies overtime.
South Africa’s stock market potentially reflects regional financial conditions, which also affect Nigeria’s economic activity.
Ethiopia is excluded due to the unavailability of quarterly GDP data.
Growth in the first quarter of 2021 is assumed to be the same as in the last quarter available for the countries whose data are missing.
As of this writing, Angola, Nigeria, South Africa, and some other countries have released their second quarter 2021 GDP data. However, several countries have not released their data yet.