{"type":"script","doc_desc":{"producers":[{"name":"Reproducibility WBG","abbr":"DECDI","affiliation":"World Bank - Development Impact Department","role":"Verification and preparation of metadata"}],"prod_date":"2025-11-20","version":"1"},"project_desc":{"authoring_entity":[{"name":"Dohan Kim","affiliation":"World Bank","email":"dkim23@worldbank.org"},{"name":"Gian Maria Milesi-Ferretti","affiliation":"The Brookings Institution, Hutchins Center on Fiscal and Monetary Policy","email":"GMilesiFerretti@brookings.edu"}],"title_statement":{"title":"Reproducibility package for External Finance In Emerging Markets And Developing Economies: A Tale Of Differences In Vulnerabilities","idno":"RR_WLD_2025_491"},"data_statement":"Some data is restricted and has not been included in the reproducibility package. For more details, please refer to the README file.","software":[{"name":"Stata","version":"18.5 MP"},{"name":"Python","version":"3.9.21"},{"name":"Excel"}],"scripts":[{"title":"Reproducibility package for External Finance In Emerging Markets And Developing Economies: A Tale Of Differences In Vulnerabilities","date":"2025-11","notes":"Computational reproducibility verified by Development Impact (DECDI) Analytics team, World Bank.","instructions":"See README in reproducibility package.","file_name":"RR_WLD_2025_491","zip_package":"RR_WLD_2025_491.zip","dependencies":"Stata dependencies are listed in the ado folder."}],"repository_uri":[{"name":"Reproducible Research Repository (World Bank)","uri":"https:\/\/reproducibility.worldbank.org"}],"production_date":"2025-11-20","abstract":"Over the past two decades, many emerging markets and developing economies (EMDEs) have been viewed as increasingly resilient to external financial shocks. This paper assesses whether such resilience is broadly shared across EMDEs by classifying them into three tiers based on economic size, income level, institutional strength, and financial integration. We document that while first-tier EMDEs have improved their external balance sheets and reduced dependence on official support, second- and third-tier EMDEs have experienced growing external vulnerabilities since the Global Financial Crisis, marked by rising external debt liabilities and declining FX reserves. Using a range of indicators, including sovereign defaults, arrears, partial defaults, and IMF lending, we identify episodes of external financial distress and show that distress remains widespread among second- and third-tier EMDEs. Empirical analysis confirms that key components of the net international investment position\u2014especially external debt and FX reserves\u2014predicts the onset of external financial distress, with institutional quality shaping the impact: weak institutions amplify risks, while strong institutions mitigate them. These findings highlight the importance of recognizing heterogeneity across EMDEs, strengthening institutional quality alongside external balance-sheet management, and rebuilding buffers to safeguard against renewed global financial stress.","geographic_units":[{"name":"World","code":"WLD"}],"output":[{"type":"Working Paper","description":"Policy Research Working Papers (PRWP)","title":"External Finance In Emerging Markets And Developing Economies: A Tale Of Differences In Vulnerabilities"}],"language":[{"name":"English","code":"EN"}],"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.","license":[{"name":"Modified BSD3","uri":"https:\/\/opensource.org\/license\/bsd-3-clause\/"}],"contacts":[{"name":"Dohan Kim","affiliation":"World Bank","email":"dkim23@worldbank.org"},{"name":"Reproducibility WBG","affiliation":"World Bank","email":"reproducibility@worldbank.org"}],"datasets":[{"uri":"https:\/\/data.imf.org\/en\/datasets\/IMF.MCM:FDI","name":"Financial Development Index","note":"Files located in: rawdata\/financial_development_imf.dta.","access_type":"Data is publicly available and included in the reproducibility package","license":"IMF Data Terms of Use","license_uri":"https:\/\/www.imf.org\/en\/about\/copyright-and-terms#data","citation":"International Monetary Fund. (2025). Financial Development Index [dataset]. https:\/\/data.imf.org\/en\/datasets\/IMF.MCM:FDI"},{"uri":"https:\/\/www.worldbank.org\/en\/programs\/debt-statistics\/publications#databasearchives","name":"World Bank International Debt Statistics (IDS) ","note":"Files located in: rawdata\/WB_IDS\/. Includes: Feb2024update.xlsx, IDS2009May.txt, IDS2012Dec.xlsx, IDS2014Dec.xlsx, IDS2017Dec.xlsx, IDS2021Oct.xlsx, IDS2024-December2024.xlsx.","access_type":"Data is publicly available and included in the reproducibility package","license":"Creative Commons Attribution 4.0 International License (CC BY 4.0)","license_uri":"https:\/\/www.worldbank.org\/en\/about\/legal\/terms-of-use-for-datasets","citation":"World Bank. (n.d). International Debt Statistics (IDS) [dataset]. https:\/\/www.worldbank.org\/en\/programs\/debt-statistics\/publications#databasearchives"},{"uri":"https:\/\/data.imf.org\/en\/datasets\/IMF.STA:FA","name":"International Financial Statistics (IFS)","note":"Files located in: rawdata\/IMF loans as a share of quota 1970-2024_stacked.xlsx.","access_type":"Data is publicly available and included in the reproducibility package","license":"IMF Data Terms of Use","license_uri":"https:\/\/www.imf.org\/en\/about\/copyright-and-terms#data","citation":"International Monetary Fund. (2025). International Financial Statistics, Fund Accounts [dataset]. https:\/\/data.imf.org\/en\/datasets\/IMF.STA:FA"},{"uri":"https:\/\/www.imf.org\/external\/datamapper\/fiscalrules\/map\/map.htm","name":"IMF Fiscal Rules Dataset","note":"Files located in: rawdata\/IMF_FiscalMonitor_20250916.xlsx.","access_type":"Data is publicly available and included in the reproducibility package","license":"IMF Data Terms of Use","license_uri":"https:\/\/www.imf.org\/en\/about\/copyright-and-terms#data","citation":"Alonso, Virginia, Clara Arroyo, Ozlem Aydin, Vybhavi Balasundharam, Hamid R. Davoodi, Gabriel Hegab, W. Raphael Lam, Anh Nguyen, Natalia Salazar Ferro, Galen Sher, Alexandra Solovyeva, and Nino Tchelishvili. 2025. \"Fiscal Rules Dataset: 1985-2024\" International Monetary Fund, Washington, DC."},{"name":"Country Groups Classification","note":"Files located in: rawdata\/country_group.dta. Compiled by the authors. ","access_type":"Data is included in the reproducibility package","citation":"World Bank (2025). Country Groups Classification [dataset]. Compiled by the authors."},{"uri":"https:\/\/www.jpmorgan.com\/markets\/index-research","name":"JP Morgan Emerging Markets Bond Index (EMBI)","note":"Files located in: rawdata\/EMBI_daily_2000_2024.xlsx.\nThis dataset contains JP Morgan EMBI daily sovereign bond spreads for a wide set of countries.\nList of variables included: Date, Algeria, Angola, Argentina, Armenia, Azerbaijan, Bahrain, Barbados, Belarus, Belize, Bolivia, Brazil, Bulgaria, Cameroon, Chile, China, Colombia, CostaRica, CotedIvoire, Croatia, DominicanRepublic, Ecuador, Egypt, ElSalvador, Ethiopia, Gabon, Georgia, Ghana, Greece, Guatemala, Hungary, Honduras, Indonesia, India, Iraq, Jamaica, Jordan, Kazakhstan, Kenya, Kuwait, Latvia, Lebanon, Lithuania, Malaysia, Maldives, Mexico, Mongolia, Morocco, Mozambique, Namibia, Nigeria, Oman, Pakistan, PapuaNewGuinea, Panama, Paraguay, Peru, Philippines, Poland, Qatar, Romania, Russia, Rwanda, SaudiArabia, Senegal, Serbia, SlovakRepublic, SouthAfrica, Korea, SriLanka, Suriname, Tajikistan, Tanzania, Thailand, TrinidadandTobago, Tunisia, Turkey, UAE, Ukraine, Uruguay, Uzbekistan, Venezuela, Vietnam, and Zambia.\n","access_type":"Data is restricted and not included in the reproducibility package","license":"Proprietary JP Morgan data","license_uri":"https:\/\/www.jpmorgan.com","citation":"J.P. Morgan. (2025). Emerging Markets Bond Index (EMBI) [dataset]. https:\/\/www.jpmorgan.com\/markets\/index-research"},{"uri":"https:\/\/www.haver.com","name":"Haver Analytics Macroeconomic Database","note":"Files located in: rawdata\/haver_rgdp_cap.dta. Variables: Year (1970-2023), IFS_Code, real GDP per capita (rgdp_pc).","access_type":"Data is restricted and not included in the reproducibility package","citation":"Haver Analytics. (2024). Real GDP per capita series [dataset]. https:\/\/www.haver.com"},{"uri":"https:\/\/www.prsgroup.com\/explore-our-products\/icrg\/","name":"PRS Group International Country Risk Guide","note":"Files located in: rawdata\/ICRG_Risk_1984_2024_december.xlsx.\nVariables include: Country, IFS_Code, Variable, Y1984, Y1985, \u2026, Y2024.\nICRG risk variables covered in the dataset include: **Bureaucracy Quality (L), Civil Disorder, Civil War, Composite Risk Rating, Consumer Confidence, Contract Viability, Corruption (F), Cross-border Conflict, Democratic Accountability (K), Economic Risk Rating, Ethnic Tensions (J), External Conflict (E), Financial Risk Rating, Foreign Pressures, Government Cohesion, Government Stability (A), Internal Conflict (D), Investment Profile (C), Law & Order (I), Legislative Strength, Military in Politics (G), Payment Delays, Political Risk Rating, Popular Support, Poverty, Religious Tensions (H), Repatriation, Risk for Budget Balance, Risk for Current Account as % of GDP, Risk for Current Account as % of XGS, Risk for Debt Service, Risk for Exchange Rate Stability, Risk for Foreign Debt, Risk for GDP Growth, Risk for Inflation, Risk for International Liquidity, Risk for Per Capita GDP, Socioeconomic Conditions (B), Terrorism, Unemployment, and War.","access_type":"Data is restricted and not included in the reproducibility package","citation":"PRS Group. (2025). International Country Risk Guide (ICRG) [dataset]. https:\/\/www.prsgroup.com\/explore-our-products\/icrg\/"},{"uri":"https:\/\/web.pdx.edu\/~ito\/Chinn-Ito_website.htm","name":"Chinn\u2013Ito Financial Openness Index","note":"Files located in: rawdata\/kaopen_2022.xls.","access_type":"Data is publicly available and included in the reproducibility package","license_uri":"https:\/\/web.pdx.edu\/~ito\/Chinn-Ito_website.htm","citation":"Chinn, Menzie D. and Hiro Ito (2006). \"What Matters for Financial Development? Capital Controls, Institutions, and Interactions,\" Journal of Development Economics, Volume 81, Issue 1, Pages 163-192 (October)."},{"name":"Sovereign Haircuts Dataset","note":"Files located in: rawdata\/Master_Haircuts_Publication April 2025.xlsx.","access_type":"Data is publicly available and included in the reproducibility package","citation":"Graf von Luckner, C.M., Meyer, J., Reinhart, C.M. et al. Sovereign Haircuts: 200 Years of Creditor Losses. IMF Econ Rev 73, 150\u2013195 (2025). https:\/\/doi.org\/10.1057\/s41308-024-00268-5","uri":"https:\/\/sites.google.com\/view\/cgrafvonluckner\/research-and-data?authuser=0","license":"Direct download; licensing information not available"},{"name":"Financial Crises Database","note":"Files located in: rawdata\/NCW_crises_data.xlsx.","access_type":"Data is publicly available and included in the reproducibility package","citation":"Nguyen, T. C., Castro, V., & Wood, J. (2022). A new comprehensive database of financial crises: Identification, frequency, and duration. Economic Modelling, 108, 105770. https:\/\/doi.org\/10.1016\/j.econmod.2022.105770","license":"Direct download; licensing information not available"},{"uri":"https:\/\/www.worldbank.org\/en\/programs\/debt-statistics\/qeds","name":"Quarterly External Debt Statistics (QEDS)","note":"Files located in: rawdata\/P_Data_Extract_From_Quarterly_External_Debt_Statistics_GDDS_20250916.xlsx; rawdata\/P_Data_Extract_From_Quarterly_External_Debt_Statistics_SDDS_20250916.xlsx.","access_type":"Data is publicly available and included in the reproducibility package","license":"Creative Commons Attribution 4.0 International License","license_uri":"https:\/\/www.worldbank.org\/en\/about\/legal\/terms-of-use-for-datasets","citation":"World Bank. (2025). Quarterly External Debt Statistics [dataset]. https:\/\/www.worldbank.org\/en\/programs\/debt-statistics\/qeds"},{"uri":"https:\/\/www.brookings.edu\/articles\/the-external-wealth-of-nations-database\/","name":"External Wealth of Nations complete update","note":"Files located in: rawdata\/STATA NFA_1970_2023_Feb25.dta.","access_type":"Data is publicly available and included in the reproducibility package","citation":"Lane & Milesi-Ferretti. (2025). External Wealth of Nations [dataset]. Brookings. https:\/\/www.brookings.edu\/articles\/the-external-wealth-of-nations-database\/","license_uri":"https:\/\/www.brookings.edu\/terms-of-use\/"},{"name":"World Bank Country and Lending Groups","note":"Files located in: rawdata\/WB_classification.dta. The file was constructed by the authors using public information from: https:\/\/datahelpdesk.worldbank.org\/knowledgebase\/articles\/906519-world-bank-country-and-lending-groups","access_type":"Data is publicly available and included in the reproducibility package","license":"Creative Commons Attribution 4.0 International License","citation":"World Bank. (2025). World Bank Country and Lending Groups [dataset]. https:\/\/datahelpdesk.worldbank.org\/knowledgebase\/articles\/906519-world-bank-country-and-lending-groups."},{"uri":"https:\/\/databank.worldbank.org\/source\/world-development-indicators","name":"World Development Indicators (WDI)","note":"Files located in: rawdata\/WDI_export_import_20250916.xlsx. Variables: Exports, imports, and primary income. Period: 1960-2024. ","access_type":"Data is publicly available and included in the reproducibility package","license":"Creative Commons Attribution 4.0 International License","license_uri":"https:\/\/www.worldbank.org\/en\/about\/legal\/terms-of-use-for-datasets","citation":"World Bank. (2025). World Development Indicators [dataset]. https:\/\/databank.worldbank.org\/source\/world-development-indicators"},{"uri":"https:\/\/www.worldbank.org\/en\/publication\/worldwide-governance-indicators","name":"Worldwide Governance Indicators (WGI)","note":"Files located in: rawdata\/wgidataset_2024NovUpdate.dta.","access_type":"Data is publicly available and included in the reproducibility package","license":"Creative Commons Attribution 4.0 International License","license_uri":"https:\/\/www.worldbank.org\/en\/about\/legal\/terms-of-use-for-datasets","citation":"Worldwide Governance Indicators. (2024). 2024 Update. World Bank (www.govindicators.org)."}],"reproduction_instructions":"To reproduce the results in the paper, a new user should follow these steps:\n\n1. **Secure Access to Data**  Obtain access to all datasets **not included** in the reproducibility package. See the subsection *Datasets* and the project **README** for details on data sources and access requirements.\n2. **Run the Main Code**  Open `0_main.do`, update the global path to match your local directory, and run the full script.\n3. **Reproduce Figure B1 (Requires Stata and Python)**  \n   - First, run `fig_B1.do` in Stata.  \n   - Then, run the Python script `fig_B1.py`.  \n     To execute `fig_B1.py`, update the path after `project =` on line 12 with your local directory.\n\nSince some data is not included, the package includes the results produced by replicators. These files can be used to review the results presented in the paper.","technology_requirements":"Runtime: 20 minutes. ","technology_environment":"Paper exhibits were reproduced on a computer with the following specifications:\n\u2022 OS: Windows 11 Enterprise\n\u2022 Processor: Intel(R) Core(TM) i5-1145G7 CPU @ 2.60GHz\n\u2022 Memory available: 15.7 GB\n\u2022 Software version: Stata 18.5 MP, Python 3.9.21\n"},"tags":[{"tag":"DOI"},{"tag":"Open Code"},{"tag":"Restricted Data"}],"schematype":"script"}