Quantitative international trade models are essential tools for policy analysis. This paper provides guidance for quantifying and solving trade models for policy simulations using popular programming languages, Python, Julia, Matlab and R. The solution follows simple linear steps and can easily be modified to add different components, thus be extended to a wide class of models. Using the provided tools, the paper shows that an additional 25 percent ad valorem tariff between high and low income countries has a substantial negative effect on disposable income in all countries, ranging between 0.5% to 7.4%.
| Repository name | URI |
|---|---|
| Reproducible Research Repository (World Bank) | https://reproducibility.worldbank.org |
Paper exhibits were reproduced on a computer with the following specifications:
• OS: Microsoft Windows 11 Enterprise
• Processor: INTEL(R) XEON(R) PLATINUM 8562Y+, 2800 Mhz, 16 Core(s), 16 Logical Processor(s)
• Memory available: 128 GB
Runtime: 10 minutes
Run the following scripts in the exact order given, and the results will appear in the "figure_tables" folder. Please change the working directory as needed.
data_processing, then run data_extract1.jl.data_processing and run data_extract2.py in Python → Expects the input file data_raw/tariff_tiva25_2022.dta from Constantinescu 2025. This file is already included in the replication package.data_processing and run data_extract3.m .data_processing and run data_extract4.m.model_code then run AO_Extended.x in Python, Julia, Matlab, or R (whichever you prefer, where x is the extension for the chosen language. You only need to run one of them; they will give identical results, subject to some minor precision loss. If you decide to use R, remember to change the line with the working directory to the current path. Note: replicators ran the code using the Julia option for step 5. figures_tables, then run Exhibits.py in Python, and outputs will appear in the same folder.Some data is restricted and has not been included in the reproducibility package. For more details, please refer to the README file.
| Author | Affiliation | |
|---|---|---|
| Erhan Artuc | World Bank | eartuc@worldbank.org |
| Johan Ortega | World Bank | jortegahernandez@worldbank.org |
2026-03-20
| Location | Code |
|---|---|
| World | WLD |
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.
| Name | URI |
|---|---|
| Modified BSD3 | https://opensource.org/license/bsd-3-clause/ |
| Name | Affiliation | |
|---|---|---|
| Erhan Artuc | World Bank | eartuc@worldbank.org |
| Reproducibility WBG | World Bank | reproducibility@worldbank.org |
| Name | Abbreviation | Affiliation | Role |
|---|---|---|---|
| Reproducibility WBG | DECDI | World Bank - Development Impact Department | Verification and preparation of metadata |
2026-03-20
1