Reproducible Research Repository
Reproducible Research Repository
  • Home
  • Repository
  • Collections
  • About
    Home / Repository / PRWP / RR_AFR_2026_640
PRWP

Reproducibility package for Beneath the Surface: Deep Trade Agreements and the Potential of a Deeper AfCFTA

2026
Reference ID
RR_AFR_2026_640
Author(s)
Jean-Christophe Maur, Lionel Fontagne, Anthonin Levelu, Nadia Rocha, Gianluca Santoni
Collections
World Bank Policy Research Working Papers
Metadata
JSON
Created on
Jul 07, 2026
Last modified
Jul 07, 2026
Page views
13
Downloads
2
  • Project Description
  • Downloads
  • Overview
  • Reproducibility Package
  • Description
  • Scope and coverage
  • Disclaimer
  • Access and rights
  • Contacts
  • Information on metadata
  • Overview

    Abstract

    This paper examines what makes some trade agreements more effective at promoting trade than others, and applies this question to the case of the African continent. To address it, we use a clustering algorithm to classify worldwide trade agreements into three categories and estimate their trade effects within a structural gravity framework. This allows us to rank PTA clusters according to their estimated trade effects as Shallow, Medium, and Deep.
    We then use feature-attribution methods and counterfactual policy combinations to identify the provisions and policy configurations most strongly associated with Deep classification, and apply this approach to the African Continental Free Trade Agreement (AfCFTA). Although the AfCFTA, which entered into force in 2019, is intended to harmonize existing regional agreements into a single continent-wide framework, it is classified as Medium in our baseline. Our general-equilibrium counterfactual analysis shows that, if implemented as a Deep agreement, the AfCFTA would generate substantial additional trade gains, along with an average GDP gain of 0.7% for the African economies in our sample. The classification analysis further indicates that tighter disciplines on trade-defense instruments, stronger legal enforceability, and visa-related provisions are among the policy dimensions most closely associated with Deep agreements.

    Reproducibility Package

    Scripts
    Readme
    Link: https://reproducibility.worldbank.org/catalog/603/download/1801/README.pdf
    Reproducibility package for Beneath the Surface: Deep Trade Agreements and the Potential of a Deeper AfCFTA
    File name
    RR_AFR_2026_640
    Zip package
    RR_AFR_2026_640.zip
    Title
    Reproducibility package for Beneath the Surface: Deep Trade Agreements and the Potential of a Deeper AfCFTA
    Date
    2026-07
    Dependencies
    R dependencies are listed in the file renv.lock. Stata dependencies are listed in the ado folder.
    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
    R
    Name
    R
    Version
    4.6.0
    Stata
    Name
    Stata
    Version
    19 MP
    Python
    Name
    Python
    Version
    3.14.6

    Reproducibility

    Technology environment

    Paper exhibits were reproduced on two computers with the following specifications:
    • OS: macOS
    • Processor: Apple M4 Pro.
    • Memory available: 24 GB
    • Software version: Stata 19 MP, R 4.6.0, Python 3.14.6

    Technology requirements

    Run-time: 9 hours.

    Reproduction instructions

    To reproduce the findings of this study, a new user should:

    1. Get access to the data not included in this reproducibility package. See data section.
    2. Adjust the root directory path in FLMRS_replication.py.
    3. Set the stata_path and r_path variables in FLMRS_replication.py.
    4. Run FLMRS_replication.py.

    Data

    Datasets
    Classifications on Economic Statistics
    Name
    Classifications on Economic Statistics
    Note
    Source: United Nations Statistics Division (UNSD). HS classification concordance between millesimes. File location: "data/class". File names: HS 2012 to HS 2002 Correlation and conversion tables.xls; HS2012-17-BEC5_08_Nov_2018.xlsx.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Direct Access
    Data URL
    https://unstats.un.org/unsd/classifications/Econ
    Citation
    UNSD. (2023). Classifications on Economic Statistics [dataset]. United Nations Statistics Division. https://unstats.un.org/unsd/classifications/Econ.
    UN Comtrade: United Nations Commodity Trade Statistics Database
    Name
    UN Comtrade: United Nations Commodity Trade Statistics Database
    Note
    Source: United Nations Statistics Division. File location: "data/COMTRADE". File names: country_cnum_iso3_TP2024.dta; sitc_export_2digit_isic_group.zip; sitc_export_2digit_isic_iso.zip; sitc_import_2digit_isic_group.zip; sitc_import_2digit_isic_iso.zip. As data are not included in the package, a variable list is provided in the reproducibility package for users who want to replicate the analysis. In addition, the metadata used to download the file is included in the folder COMTRADE.
    Access policy
    Data is publicly available, but does not allow redistribution and is not included in the reproducibility package.
    License
    UN COMTRADE LICENSE AGREEMENT
    License URL
    https://comtradeplus.un.org/LicenseAgreement
    Data URL
    https://comtrade.un.org/
    Citation
    United Nations Statistics Division. (n.d.). UN Comtrade: United Nations Commodity Trade Statistics Database [dataset]. https://comtrade.un.org/. Accessed on [add month/year].
    Country Identifiers Data
    Name
    Country Identifiers Data
    Note
    Source: Compiled by the authors from World Bank and FAO country identifier data. File location: "data/CTY". File names: TP_FAO_cty.dta; TP_FAO_cty_year.dta; WBdata_gdp.dta; WBregio.dta; WBregio_toolkit.dta; codes_iso_cnum.dta; continent.dta; country_codes_comtrade.csv; income_class_2018.dta; temp_cty_name.dta.
    Access policy
    Data is included in the reproducibility package.
    License
    Custom license
    Citation
    Authors' compilation. 2026. Country Identifiers Data [dataset]. Based on the World Bank and FAO.
    World Bank Deep Trade Agreements Database
    Name
    World Bank Deep Trade Agreements Database
    Note
    Source: World Bank. Includes vertical and horizontal versions of the Deep Trade Agreement (DTA) database. File location: "data/DTA". File names: 01. DTA Information.do; DTA 1.0 - Horizontal Content (v2).xlsx; DTA 2.0 - Vertical Content (v2).xlsx; PTA_Policy_Areas.dta; classification of provisions (v2).xlsx; uk_agree_to_be_fixed.dta; year_series.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/en/about/legal/terms-of-use-for-datasets
    Data URL
    https://datatopics.worldbank.org/dta/table.html
    Citation
    Mattoo, A., N. Rocha, and M. Ruta. (2020). World Bank Deep Trade Agreements Database [dataset]. World Bank. https://datatopics.worldbank.org/dta/table.html
    FAO Food and Agricultural Trade Dataset
    Name
    FAO Food and Agricultural Trade Dataset
    Note
    Source: Food and Agriculture Organization of the United Nations (FAO). Agriculture trade data. File location: "data/FAO". File names: Concordance_H3_to_I3.zip; JobID-48_Concordance_H3_to_I3.CSV; [Content_Types].xml; prod/2024/FAOSTAT_data_3-26-2024_country.csv; prod/2024/FAOSTAT_data_3-26-2024_item.csv; prod/2024/FAOSTAT_data_3-26-2024_item_group.csv; prod/2024/Value_of_Production_E_All_Data.zip; trade/2024/FAOSTAT_data_3-26-2024_element.csv; trade/2024/FAOSTAT_data_3-26-2024_item.csv; trade/2024/FAOSTAT_data_3-26-2024_partner.csv; trade/2024/FAOSTAT_data_3-26-2024_reporter.csv; trade/2024/Trade_DetailedTradeMatrix_E_All_Data.zip. Direct download: https://bulks-faostat.fao.org/production/Trade_DetailedTradeMatrix_E_All_Data.zip
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    FAO Statistical Database Terms of Use
    License URL
    https://www.fao.org/contact-us/terms/db-terms-of-use/en/
    Data URL
    https://www.fao.org/faostat/en/#data/TCL
    Citation
    Food and Agriculture Organization of the United Nations. (2025). Food and Agricultural Trade Dataset [dataset]. FAO. https://www.fao.org/faostat/en/#data/TCL.
    The CEPII Gravity Database
    Name
    The CEPII Gravity Database
    Note
    Includes the gravity variables (GRAVITY folder) and the shared-language variable (LANG folder) used in the analysis. File location: "data/GRAVITY": Gravity_V202211.zip; gravity.zip; gravity_toolkit.dta. File location: "data/LANG": dicl_database.csv; language_FT.dta.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Etalab Open License 2.0
    License URL
    https://www.etalab.gouv.fr/licence-ouverte-open-licence/
    Data URL
    https://www.cepii.fr/cepii/en/bdd_modele/bdd_modele_item.asp?id=8
    Citation
    Conte, M., P. Cotterlaz, and T. Mayer. (2022). The CEPII Gravity Database [dataset]. CEPII Working Papers 2022-05. https://www.cepii.fr/cepii/en/bdd_modele/bdd_modele_item.asp?id=8.
    World Development Indicators
    Name
    World Development Indicators
    Note
    File location: "data/OTHERS". File names: Cluster_list_2024.xlsx; country_classification.xlsx; id_agree_bilat_all.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/en/about/legal/terms-of-use-for-datasets
    Data URL
    https://datatopics.worldbank.org/world-development-indicators/the-world-by-income-and-region.html
    Citation
    World Bank. 2026. World Development Indicators [dataset]. https://datatopics.worldbank.org/world-development-indicators/the-world-by-income-and-region.html.
    SPMAP: Stata World Maps
    Name
    SPMAP: Stata World Maps
    Note
    Source: Stata files (spmap package) used to create world maps. Access date: [add access month/year]. File location: "data/STATAMAP". File names: coord_mercator_world.dta; idfile.dta.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Direct Access
    Data URL
    https://www.stathelp.se/en/spmap_world_en.html
    Citation
    Pisati, M. (2007). SPMAP: Stata World Maps [dataset]. https://www.stathelp.se/en/spmap_world_en.html.
    CEPII Trade and Production Database
    Name
    CEPII Trade and Production Database
    Note
    File location: "data/TARIFFS": tariffs_from_tradeprod.dta. File location: "data/TradeProd_CEPII": TPe_V202201.dta; TPe_V202401.dta. These files are not included in the package due to size restrictions. Go to the link below, download the TPe_V202401.zip in the Stata folder, unzip it, and place it in the appropriate folder. In the archives, go to TPe_V202201.zip, download, and unzip it in the correct location. File location: "data" (package root): TradeProd_Data_Toolkit_2024.dta.
    Access policy
    Data is publicly available, but due to size restrictions, some files are not included in the reproducibility package.
    License
    Etalab Open License 2.0
    License URL
    https://www.etalab.gouv.fr/wp-content/uploads/2018/11/open-licence.pdf
    Data URL
    https://www.cepii.fr/cepii/en/bdd_modele/bdd_modele_item.asp?id=5
    Citation
    Mayer, T., G. Santoni, and V. Vicard. (2023). The CEPII Trade and Production Database [dataset]. CEPII. https://www.cepii.fr/cepii/en/bdd_modele/bdd_modele_item.asp?id=5.
    UNIDO Annual Manufacturing Trade Database
    Name
    UNIDO Annual Manufacturing Trade Database
    Note
    Source: United Nations Industrial Development Organization (UNIDO). Manufacturing trade data. File location: "data/UNIDO/2024". File names: 0057D63F58238AC9765821DB5D46C067976B.zip; indstat2024.dta.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    Creative Commons Attribution 4.0 International License
    License URL
    https://stat.unido.org/terms-and-conditions
    Data URL
    https://stat.unido.org/data/table?dataset=mtd#data-browser
    Citation
    UNIDO. (2025). Annual Manufacturing Trade Database [dataset]. https://stat.unido.org/data/table?dataset=mtd#data-browser.
    OECD International Transport and Insurance Costs of Merchandise Trade (ITIC)
    Name
    OECD International Transport and Insurance Costs of Merchandise Trade (ITIC)
    Note
    Source: Organisation for Economic Co-operation and Development (OECD). Transport cost data. File location: "data/trade_costs". File names: OECD_transport_costs.zip.
    Access policy
    Data is publicly available and included in the reproducibility package.
    License
    OECD Terms & Conditions
    License URL
    https://www.oecd.org/en/about/terms-conditions.html
    Data URL
    https://www.oecd.org/en/data/datasets/international-transport-and-insurance-costs-of-merchandise-trade-itic.html
    Citation
    Organisation for Economic Co-operation and Development. (2024). International Transport and Insurance Costs of Merchandise Trade (ITIC) [dataset]. OECD Data. https://www.oecd.org/en/data/datasets/international-transport-and-insurance-costs-of-merchandise-trade-itic.html.
    Product Concordance
    Name
    Product Concordance
    Note
    File location: 1.data/FAO/Concordance_H3_to_I3.zip; JobID-48_Concordance_H3_to_I3.csv.
    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
    Data URL
    https://wits.worldbank.org/product_concordance.html
    Citation
    World Integrated Trade Solution. 2024. "Product Concordance" [dataset]. https://wits.worldbank.org/product_concordance.html. Access date: December 2024.
    Cluster List and Bilateral Identifiers of Trade Agreements
    Name
    Cluster List and Bilateral Identifiers of Trade Agreements
    Note
    File location: 1.data/OTHERS/Cluster_list_2024, id_agree_bilat_all.
    Access policy
    Data is included in the reproducibility package
    Citation
    Authors' compilation. 2024. Cluster List and Bilateral Identifiers of Trade Agreements [dataset]. Based on the predicted clustering of trade agreements and on the World Bank's Deep Trade Agreements Database.
    Data statement

    All data sources are publicly available, but not all are included in the reproducibility package.

    Description

    Output
    Beneath the Surface: Deep Trade Agreements and the Potential of a Deeper AfCFTA
    Type
    Working Paper
    Title
    Beneath the Surface: Deep Trade Agreements and the Potential of a Deeper AfCFTA
    Description
    Policy Research Working Papers (PRWP)
    Authors
    Author Affiliation Email
    Jean-Christophe Maur World Bank jmaur@worldbank.org
    Lionel Fontagne Paris School of Economics lionel.fontagne@psemail.eu
    Anthonin Levelu Joint Research Center (European Commission) anthonin.levelu@ec.europa.eu
    Nadia Rocha Inter American Development Bank nadiaro@iadb.org
    Gianluca Santoni Paris School of Economics gianluca.santoni@psemail.eu
    Date of production

    2026-07-01

    Scope and coverage

    Geographic locations
    Location Code
    Africa AFR
    Keywords
    African Integration Deep Ptas
    Topics
    ID Topic Parent topic ID Vocabulary Vocabulary URI
    F14 Empirical Studies of Trade F1 Journal of Economic Literature (JEL)
    F15 Economic Integration F1 Journal of Economic Literature (JEL)

    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
    Jean-Christophe Maur World Bank jmaur@worldbank.org
    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-07-01

    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.