Front Matter
Author:
Chris Redl
Search for other papers by Chris Redl in
Current site
Google Scholar
PubMed
Close
and
Sandile Hlatshwayo 0000000404811396 https://isni.org/isni/0000000404811396 International Monetary Fund

Search for other papers by Sandile Hlatshwayo in
Current site
Google Scholar
PubMed
Close

Copyright Page

i© 2021 International Monetary Fund

WP/21/263

IMF Working Paper

Strategy, Policy and Review Department

Forecasting Social Unrest: A Machine Learning Approach

Prepared by Chris Redl and Sandile Hlatshwayo †

Authorized for distribution by Daria Zakharova

November 2021

IMF Working Papers describe research in progress by the author(s) and are published to elicit comments and to encourage debate. The views expressed in IMF Working Papers are those of the author(s) and do not necessarily represent the views of the PMF, its Executive Board, or IMF management.

Abstract

We produce a social unrest risk index for 125 countries covering a period of 1996 to 2020. The risk of social unrest is based on the probability of unrest in the following year derived from a machine learning model drawing on over 340 indicators covering a wide range of macro-financial, socioeconomic, development and political variables. The prediction model correctly forecasts unrest in the following year approximately two-thirds of the time. Shapley values indicate that the key drivers of the predictions include high current and prior levels of unrest, food price inflation and mobile phone penetration, which accord with previous findings in the literature.

JEL Classification Numbers: C45, C53,P16 Keywords: Social unrest, machine learning. Author’s E-Mail Address: CRedl@imf.org;SHlatshwavo@imf.org

Contents

  • 1 Introduction

  • 2 Data

    • 2.1 Unrest events of Barrett et al. (2020)

    • 2.2 Predictors

  • 3 Model

    • 3.1 Machine Learning Models Considered

    • 3.2 Model Evaluation and Performance

  • 4 Feature Importance

  • 5 A Social Unrest Risk Index

  • 6 Conclusion

  • 7 Appendix I: Machine learning models

    • 7.1 Linear models: regularized logistic regression

    • 7.2 Neural Network

    • 7.3 Support vector machine

    • 7.4 Tree based models

      • 7.4.1 AdaBoost

      • 7.4.2 Gradient Boosted Trees

  • 8 Appendix II: Input Data and Aggregation scheme

  • Collapse
  • Expand
Forecasting Social Unrest: A Machine Learning Approach
Author:
Chris Redl
and
Sandile Hlatshwayo