Reproducible Research Repository
Reproducible Research Repository
  • Home
  • Repository
  • Collections
  • About
    Home / Repository / JA / PP_WLD_2026_712
ja

Reproducibility package for Predicting Debt Distress In Low-Income Countries

2026
Reference ID
PP_WLD_2026_712
Author(s)
Clemens Graf von Luckner, Aart Kraay, Rita Ramalho, Sebastian Horn
Collections
Journal articles
Metadata
JSON
Created on
Aug 12, 2026
Last modified
Aug 12, 2026
Page views
24
Downloads
8
  • Project Description
  • Downloads
  • Overview
  • Reproducibility Package
  • Description
  • Scope and coverage
  • Disclaimer
  • Access and rights
  • Contacts
  • Information on metadata
  • Overview

    Abstract

    We develop an empirical model to predict episodes of debt servicing difficulties (“debt distress”) in low-income countries, with three main contributions to the existing literature. First, we develop more refined measures of external debt distress episodes that allow us to time the onset of distress episodes with increased precision. Second, we develop a systematic algorithm to comprehensively assess the out-of-sample predictive performance of more than 550,000 candidate binary prediction models using J-K-fold cross-validation. Third, we test whether more sophisticated machine learning algorithms can outperform simple probit models. We find that simple single-equation probit models have better predictive power for debt distress than more sophisticated algorithms and are comparable in terms of predictive performance to important policy benchmarks such as the current IMF and World Bank debt sustainability framework for low-income countries.

    Reproducibility Package

    Scripts
    Readme Get Reproducibility Package
    Link: https://reproducibility.worldbank.org/catalog/626/download/1863/README.pdf
    Reproducibility package for Predicting Debt Distress In Low-Income Countries
    File name
    PP_WLD_2026_712
    Zip package
    PP_WLD_2026_712.zip
    Title
    Reproducibility package for Predicting Debt Distress In Low-Income Countries
    Date
    2026-08
    Dependencies
    Stata dependencies are listed in the ado folder. Python dependencies are listed in the requirements.txt file.
    Instructions
    See README in reproducibility package.
    Notes
    Computational reproducibility verified by Development Impact (DECDI) Analytics team, World Bank.
    Source code repository
    Repository name URI
    Reproducible Research Repository (World Bank) https://reproducibility.worldbank.org
    Software
    Stata
    Name
    Stata
    Version
    19.5
    Python
    Name
    Python
    Version
    3.12

    Reproducibility

    Technology environment

    Paper exhibits were reproduced on a computer with the following specifications:
    • OS: macOS 26.5.2 (Darwin)
    • Processor: Apple M4 Pro
    • Memory available: 24.0 GB

    Technology requirements

    Runtime: 10 minutes.

    Reproduction instructions

    To reproduce the findings in this paper, a new user needs to do the following:

    1. Obtain the restricted data required for the analysis. See the data section for more details.
    2. Set the top-level path global in master do file.
    3. Create the Python environment from requirements.txt or environment.yml.
    4. Set the BASE_PATH global at the top of both analysis notebooks — this is the single path each notebook requires:
      • model_analyses_Mar2026.ipynb
      • appendix_exercises_Mar2026.ipynb
    5. Run model_analyses with depvar = 't12345' and apply_filter = 1 to reproduce Table 3 (the sensitivity-filtered five-year models). Note: the default apply_filter = 0 produces the unconstrained set instead.
      Note: Most of the analysis relies on confidential data. The package contains the outputs generated by the replicators for interested users to compare against the published paper.

    Data

    Datasets
    World Development Indicators
    Name
    World Development Indicators
    Note
    Filenames: wdi_raw.dta, wdi_allvariables.dta. Indicators used: NY.GDP.MKTP.CD, NY.GDP.MKTP.KD, NY.GDP.PCAP.CD, NE.EXP.GNFS.CD, NE.IMP.GNFS.CD, BX.TRF.PWKR.CD.DT, FI.RES.TOTL.CD, BX.KLT.DINV.WD.GD.ZS, BN.CAB.XOKA.GD.ZS.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Creative Commons Attribution 4.0 International License (CC BY 4.0)
    License URL
    https://creativecommons.org/licenses/by/4.0/
    Data URL
    https://databank.worldbank.org/source/world-development-indicators
    Citation
    World Bank. 2024. "World Development Indicators" [dataset]. https://databank.worldbank.org/source/world-development-indicators. Accessed March 2024.
    Country Policy and Institutional Assessment (CPIA)
    Name
    Country Policy and Institutional Assessment (CPIA)
    Note
    Filename: cpia_WDI.dta. Used as the institutional-quality predictor. The authors confirm that the CPIA time series and its components are treated as confidential by the World Bank; the vintage used in the analysis is not included in the reproducibility package. Public CPIA scores for IDA countries are available at the URI below. For more details, contact the authors at cgvl@stanford.edu.
    Access policy
    Data access was granted directly to the study authors by the data owners/managers. It was obtained with a custom data license that does not allow for redistribution, and it is not included in the reproducibility package.
    Data URL
    https://databank.worldbank.org/source/country-policy-and-institutional-assessment
    Citation
    World Bank. 2024. "Country Policy and Institutional Assessment" [dataset]. https://databank.worldbank.org/source/country-policy-and-institutional-assessment. Accessed March 2024.
    World Economic Outlook database
    Name
    World Economic Outlook database
    Note
    Filenames (raw): WEOApr2022all.xlsx, WEOApr2023all.csv, WEOOct2022all.xlsx, WEOOct2022_World.xlsx, WEO_selectedvars.xlsx, WEO_RevGrants.xlsx. Derived: weo_*.dta (weo_allvariables, weo_publicdata, weo_revenue, weo_worldgrowth, weo_BCA_GDP_BP6, weo_BFD_GDP_BP6, weo_BMGS_BP6, weo_BXG_BP6, weo_BXS_BP6, weo_ENDA, weo_IAR_BP6, WEO_rev_grants) and dsi.dta (WEO-derived debt-service-to-interest series). Multiple vintages. Series used include: NGDPD, NGDP_RPCH, BXS_BP6, BXGS_BP6, BMGS_BP6, GGR, GGRG, GGXWDG_NGDP, ENDA, BFD_GDP.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    IMF Copyright and Usage terms
    License URL
    https://www.imf.org/external/terms.htm
    Data URL
    https://www.imf.org/en/Publications/WEO/weo-database
    Citation
    International Monetary Fund. 2024. "World Economic Outlook Database" [dataset]. https://www.imf.org/en/Publications/WEO/weo-database. Accessed March 2024.
    International Financial Statistics
    Name
    International Financial Statistics
    Note
    Filenames: IFS_full_annual.csv, IFS_fulldatabase.csv, IFS_fundaccounts.dta. Series used include HPG_XDR (net increase in Fund credit, general resource account) and HPQ_XDR (quota), used to construct the large-IMF-assistance distress signal.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    The Use of IMF Data
    License URL
    https://www.imf.org/external/terms.htm
    Data URL
    https://data.imf.org/en/Datasets#t=coveo117bcfc4&sort=%40idata_publication_date%20descending&f:Topics=[International%20Financial%20Statistics%20(IFS)]
    Citation
    International Monetary Fund. 2024. "International Financial Statistics" [dataset]. https://data.imf.org. Accessed March 2024.
    Penn World Table 10.01
    Name
    Penn World Table 10.01
    Note
    Filename: pwt1001.dta; pwt_realgdp.dta.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Creative Commons Attribution 4.0 International License (CC BY 4.0)
    License URL
    https://creativecommons.org/licenses/by/4.0/
    Data URL
    https://www.rug.nl/ggdc/productivity/pwt/
    Citation
    Feenstra, Robert C., Robert Inklaar, and Marcel P. Timmer. 2015. "Penn World Table 10.01" [dataset]. https://www.rug.nl/ggdc/productivity/pwt/. Accessed March 2024.
    Global Database of Inflation
    Name
    Global Database of Inflation
    Note
    Filename: Inflation_annual_Ohnsorge et al.dta. Series used: hcpi_a (annual headline CPI inflation). The data have since been updated. The original version used at the time of this analysis is retained in the package for transparency.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Creative Commons Attribution 4.0 International License (CC BY 4.0)
    License URL
    https://creativecommons.org/licenses/by/4.0/
    Data URL
    https://www.worldbank.org/en/research/brief/inflation-database
    Citation
    Ha, Jongrim, M. Ayhan Kose, and Franziska Ohnsorge. 2021. "Global Database of Inflation" [dataset]. https://www.worldbank.org/en/research/brief/inflation-database. Accessed March 2024.
    Commodity Terms of Trade database
    Name
    Commodity Terms of Trade database
    Note
    Filename: PCTOT_01-31-2023 17-39-02-21_timeSeries.csv. Country-specific commodity terms-of-trade indices over 45 commodities. The data have since been updated. The original version used at the time of this analysis is retained in the package for transparency.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    IMF Copyright and Usage terms
    License URL
    https://www.imf.org/external/terms.htm
    Data URL
    https://data360.worldbank.org/en/int/dataset/IMF_PCTOT
    Citation
    Gruss, Bertrand, and Suhaib Kebhaj. 2019. "Commodity Terms of Trade: A New Database" [dataset]. IMF Working Paper 2019/021. Accessed March 2024.
    Sovereign Default Database
    Name
    Sovereign Default Database
    Note
    Filename: FGR_SovereignDefaults.xlsx. Tracks defaults on private external creditors across 200 countries and 200 years; core source for the outright-default distress indicator. A list of variables for all of these datasets is included in the reproducibility package, for potential users to reach out to the authors.
    Access policy
    Data access was granted directly to the study authors by the data owners/managers. It was obtained with a custom data license that does not allow for redistribution, and it is not included in the reproducibility package.
    Citation
    Farah-Yacoub, Juan, Clemens Graf von Luckner, Rita Ramalho, and Carmen Reinhart. 2023. "Sovereign Default Database" [dataset]. Unpublished data. Accessed March 2024.
    BoC–BoE Sovereign Default Database
    Name
    BoC–BoE Sovereign Default Database
    Note
    Filenames: boc_boe_default_data.xlsx (raw), boc_boe_default.dta (derived).
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Bank of Canada terms of use
    License URL
    https://www.bankofcanada.ca/terms/#1-Copyright-Permission-to-Reproduce
    Data URL
    https://www.bankofcanada.ca/2024/07/staff-analytical-note-2024-19/
    Citation
    Beers, David, Obiageri Ndukwe, and Alex Charron. 2024. "BoC–BoE Sovereign Default Database" [dataset]. https://www.bankofcanada.ca/2024/07/staff-analytical-note-2024-19/. Accessed March 2024.
    Historical Public Debt Database
    Name
    Historical Public Debt Database
    Note
    Filenames: abbas _ historical public debt.xlsx, abbas _ public debt.dta. Used to extend total public debt pre-1990s. Direct download here: http://www.imf.org/external/pubs/ft/wp/2010/data/wp10245.zip. The data have since been updated. The original version used at the time of this analysis is retained in the package for transparency.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    IMF Copyright and Usage terms
    License URL
    https://www.imf.org/external/terms.htm
    Data URL
    https://www.imf.org/external/datamapper/datasets/DEBT
    Citation
    Abbas, S. Ali, Nazim Belhocine, Asmaa ElGanainy, and Mark Horton. 2010. "A Historical Public Debt Database" [dataset]. IMF Working Paper 10/245. Accessed March 2024.
    Public Finances in Modern History 2023 update
    Name
    Public Finances in Modern History 2023 update
    Note
    Filenames: Public Finances in Modern History Dec 2023.dta, mauro _ public finances in modern history.dta. Source of public debt interest payments; gaps filled from IMF WEO (dsi). The data have since been updated. The original version used at the time of this analysis is retained in the package for transparency.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    IMF Copyright and Usage terms
    License URL
    https://www.imf.org/external/terms.htm
    Data URL
    https://www.imf.org/external/datamapper/datasets/FPP
    Citation
    Mauro, Paolo, Rafael Romeu, Ariel Binder, and Asad Zaman. 2015. "Public Finances in Modern History" [dataset]. December 2023 update. https://www.imf.org/external/datamapper/datasets/FPP. Accessed March 2024.
    Debt-to-GDP Ratios Database
    Name
    Debt-to-GDP Ratios Database
    Note
    Filenames: RR_publicdebt_A_E.xlsx, RR_publicdebt_F_M.xlsx, RR_publicdebt_M_S.xlsx, RR_publicdebt_T_Z.xlsx (raw); rr_pubdebt.dta and the country-level rr_pubdebt_*.dta files (derived). Public debt series used to extend total public debt pre-1990s.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Public file
    License URL
    https://carmenreinhart.com/debt-to-gdp-ratios/
    Data URL
    https://carmenreinhart.com/data/
    Citation
    Reinhart, Carmen M., and Kenneth S. Rogoff. 2011. "Debt-to-GDP Ratios" [dataset]. https://carmenreinhart.com/debt-to-gdp-ratios. Accessed March 2024.
    Reinhart–Rogoff exchange rate database
    Name
    Reinhart–Rogoff exchange rate database
    Note
    Filename: FX_Reinhart_and_Rogoff.dta. Source of the nominal exchange-rate variable. Variables were provided by Carmen Reinhart. https://carmenreinhart.com/. A list of variables included in the dataset is included in the reproducibility package for interested users.
    Access policy
    Data access was granted directly to the study authors by the data owners/managers. It was obtained with a custom data license that does not allow for redistribution, and it is not included in the reproducibility package.
    Data URL
    https://carmenreinhart.com/exchange-rates-official-and-parallel/
    Citation
    Reinhart, Carmen M., and Kenneth S. Rogoff. 2024. "Exchange Rates: Official and Parallel" [dataset]. Unpublished data. Accessed March 2024.
    Hidden Defaults database
    Name
    Hidden Defaults database
    Note
    Filename: HRT_HiddenDefaults_ReplicationFile.xlsx.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Creative Commons Attribution 4.0 International License (CC BY 4.0)
    License URL
    https://creativecommons.org/licenses/by/4.0/
    Data URL
    https://www.openicpsr.org/openicpsr/project/162501/version/V1/view
    Citation
    Horn, Sebastian, Reinhart, Carmen M., and Trebesch, Christoph. Data and Code for: Hidden Defaults by Horn, Reinhart and Trebesch. Nashville, TN: American Economic Association [publisher], 2022. Ann Arbor, MI: Inter-university Consortium for Political and Social Research [distributor], 2022-04-07. https://doi.org/10.3886/E162501V1
    Database of Political Institutions 2020
    Name
    Database of Political Institutions 2020
    Note
    Filename: dpi2020.dta, dpi2020_thin.dta. Variables used: yrsoffc (years chief executive in office), yrscurnt (years left in current term), 1975–2020, extended/extrapolated as described in the README.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Creative Commons Attribution–NonCommercial–NoDerivs 3.0 IGO
    License URL
    https://creativecommons.org/licenses/by-nc-nd/3.0/igo/
    Data URL
    https://publications.iadb.org/en/database-political-institutions-2020-dpi2020
    Citation
    Cruz, Cesi, Philip Keefer, and Carlos Scartascini. 2021. "Database of Political Institutions 2020" [dataset]. Inter-American Development Bank. https://publications.iadb.org/en/database-political-institutions-2020-dpi2020. Accessed March 2024.
    World Bank International Debt Statistics
    Name
    World Bank International Debt Statistics
    Note
    Filenames: IDS_ArrearsData_Dec22.xlsx, IDS_prepared.dta, ids _ debt data raw.dta, r _ interest on new commitments _ ids.xlsx. Series used include: DT.DOD.DPPG.CD, DT.DOD.DPPG.DT, DT.AXA.DLXF.CD, DT.IXA.DLXF.CD.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Creative Commons Attribution 4.0 International License (CC BY 4.0)
    License URL
    https://creativecommons.org/licenses/by/4.0/
    Data URL
    https://databank.worldbank.org/source/international-debt-statistics
    Citation
    World Bank. 2024. "International Debt Statistics" [dataset]. https://databank.worldbank.org/source/international-debt-statistics. Accessed March 2024.
    World Bank International Debt Statistics — internal projected debt service
    Name
    World Bank International Debt Statistics — internal projected debt service
    Note
    Filenames: Projected debt service _ from IDS.xlsx, NPV data series 2015-2021 - by Countries (produced as of March 8 2023).xlsx. Internal World Bank IDS products (projected debt service; net present value series at a 5% discount rate) that are not distributed through the public IDS databank and are not included in the reproducibility package. A list of variables for all of these datasets is included in the reproducibility package, for potential users to reach out to the authors.
    Access policy
    Data access was granted directly to the study authors by the data owners/managers. It was obtained with a custom data license that does not allow for redistribution, and it is not included in the reproducibility package.
    Citation
    World Bank. 2023. "International Debt Statistics — internal projected debt service and net present value series" [dataset]. Unpublished data. Accessed March 2024.
    10-Year Treasury Constant Maturity Rate
    Name
    10-Year Treasury Constant Maturity Rate
    Note
    Filename: FRED _ US 10 year yield.xlsx, us_10y_yield.dta. Series used: DGS10.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    FRED Terms of Use
    License URL
    https://fred.stlouisfed.org/legal/
    Data URL
    https://fred.stlouisfed.org/series/DGS10
    Citation
    Board of Governors of the Federal Reserve System (US), retrieved from FRED, Federal Reserve Bank of St. Louis. 2024. "Market Yield on U.S. Treasury Securities at 10-Year Constant Maturity (DGS10)" [dataset]. https://fred.stlouisfed.org/series/DGS10. Accessed March 2024.
    IMF Fund Arrangements
    Name
    IMF Fund Arrangements
    Note
    Filename: Fund Arrangements 1952-present.xlsx. Internal IMF extract shared with the authors. A list of variables for all of these datasets is included in the reproducibility package, for potential users to reach out to the authors.
    Access policy
    Data access was granted directly to the study authors by the data owners/managers. It was obtained with a custom data license that does not allow for redistribution, and it is not included in the reproducibility package.
    Citation
    International Monetary Fund. 2024. "IMF Fund Arrangements" [dataset]. Internal extract shared with the authors. Unpublished data. Accessed March 2024.
    The International Monetary Fund: 70 Years of Reinvention
    Name
    The International Monetary Fund: 70 Years of Reinvention
    Note
    Program timing for non-concessional IMF programs, matched to monthly IFS Fund-credit data to construct the large-IMF-assistance signal. Variables were provided by Carmen Reinhart. https://carmenreinhart.com/. A list of variables included in the dataset is included in the reproducibility package for interested users.
    Access policy
    Data is publicly available but does not allow redistribution and it is not included in the reproducibility package.
    Data URL
    https://carmenreinhart.com/data/
    Citation
    Reinhart, Carmen M., and Christoph Trebesch. 2016. "The International Monetary Fund: 70 Years of Reinvention" [dataset]. https://carmenreinhart.com/data/. Accessed March 2024.
    Domestic Debt Restructuring Database
    Name
    Domestic Debt Restructuring Database
    Note
    Filenames: imf _ domestic debt database.dta, DDR CR dataset_updated.xlsx. A list of variables for all of these datasets is included in the reproducibility package, for potential users to reach out to the authors.
    Access policy
    Data access was granted directly to the study authors by the data owners/managers. It was obtained with a custom data license that does not allow for redistribution, and it is not included in the reproducibility package.
    Citation
    International Monetary Fund. 2021. "Domestic Debt Restructuring Database" [dataset]. Unpublished data. Accessed March 2024.
    Worldwide Governance Indicators
    Name
    Worldwide Governance Indicators
    Note
    Filename: wgidataset.dta, wgi_gee.dta.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Creative Commons Attribution 4.0 International License (CC BY 4.0)
    License URL
    https://www.worldbank.org/ext/en/legal/terms-conditions/datasets
    Data URL
    https://www.govindicators.org
    Citation
    Kaufmann, Daniel, and Aart Kraay. 2024. "Worldwide Governance Indicators" [dataset]. World Bank. https://www.govindicators.org. Accessed March 2024.
    2017 Debt Sustainability Framework Database
    Name
    2017 Debt Sustainability Framework Database
    Note
    Filename: data input/DSF_2016_external_8May2017.dta (vintage 8 May 2017). Internal World Bank–IMF product used to fill coverage gaps in otherwise-public series (see script "merge all variables"). Source of confidentiality affects all the merged databases (licdsf_final_database, licdsf_alldata.dta, 2017dsfpredsampledata.dta). Data is confidential and not included in the reproducibility package; the authors do not have approval to redistribute this source. A list of variables for all of these datasets is included in the reproducibility package, for potential users to reach out to the authors.
    Access policy
    Data access was granted directly to the study authors by the data owners/managers. It was obtained with a custom data license that does not allow for redistribution, and it is not included in the reproducibility package.
    Citation
    International Monetary Fund and World Bank. 2017. "2017 Debt Sustainability Framework Database" [dataset]. Unpublished data. Internal confidential database, vintage 8 May 2017. Accessed March 2024.
    Debt-distress Indicators Non-confidential Data Extract
    Name
    Debt-distress Indicators Non-confidential Data Extract
    Note
    Filename: non_confidential_data_extract.dta. Debt-distress dependent variables extracted from the merged database via script "From confidential to public data version". This is the dataset shipped in the public deposit, together with the estimated-model result files (output/RHS_Selector_result_filtered_t1.csv and _t12345.csv).
    Access policy
    Data is included in the reproducibility package.
    Citation
    Authors' compilation. 2026. "Debt-distress Indicators Non-confidential Data Extract" [dataset].
    Data statement

    Some data is restricted and has not been included in the reproducibility package. For more details, please refer to the README file.

    Description

    Output
    Predicting Debt Distress In Low-Income Countries
    Title
    Predicting Debt Distress In Low-Income Countries
    Authors
    Author Affiliation Email
    Clemens Graf von Luckner Stanford University cgvl@stanford.edu
    Aart Kraay World Bank akraay@worldbank.org
    Rita Ramalho World Bank rramalho@ifc.org
    Sebastian Horn Kiel Institute for the World Economy (IfW Kiel) sebastian.horn@ifw-kiel.de
    Date of production

    2026-08-11

    Scope and coverage

    Geographic locations
    Location Code
    World WLD
    Keywords
    sovereign debt default financial crisis prediction low-income countries
    Topics
    ID Topic Parent topic ID Vocabulary
    F34 International Lending and Debt Problems F3 JEL Classifications
    F21 International Investment; Long-term Capital Movements F2 JEL Classifications
    H63 National Debt; Debt Management; Sovereign Debt H6 JEL Classifications
    C50 Econometric Modeling: General C5 JEL Classifications
    C01 Econometrics C JEL Classifications
    O10 Economic Development: General O JEL Classifications

    Disclaimer

    Disclaimer

    The materials in the reproducibility packages are distributed as they were prepared by the staff of the International Bank for Reconstruction and Development/The World Bank. The findings, interpretations, and conclusions expressed in this event do not necessarily reflect the views of the World Bank, the Executive Directors of the World Bank, or the governments they represent. The World Bank does not guarantee the accuracy of the materials included in the reproducibility package.

    Access and rights

    License
    Name URI
    MIT License https://opensource.org/license/mit
    World Bank IGO Rider https://github.com/worldbank/metadata-editor/blob/main/WB-IGO-RIDER.md

    Contacts

    Contacts
    Name Affiliation Email
    Clemens Graf von Luckner Stanford University cgvl@stanford.edu
    Reproducibility WBG World Bank reproducibility@worldbank.org

    Information on metadata

    Producers
    Name Abbreviation Affiliation Role
    Reproducibility WBG DECDI World Bank - Development Impact Department Verification and preparation of metadata
    Date of Production

    2026-08-11

    Document version

    1

    Back to Catalog
    The World Bank Working for a World Free of Poverty
    • IBRD IDA IFC MIGA ICSID

    © The World Bank Group, All Rights Reserved.