IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2509.11271.html

Out-of-sample gravity predictions and trade policy counterfactuals

Author

Listed:
  • Nicolas Apfel
  • Holger Breinlich
  • Nick Green
  • Dennis Novy
  • J. M. C. Santos Silva
  • Tom Zylkin

Abstract

Gravity equations are often used to evaluate counterfactual trade policy scenarios, such as the effect of regional trade agreements on trade flows. In this paper, we argue that the suitability of gravity equations for this purpose crucially depends on their out-of-sample predictive power. We propose a methodology that compares different versions of the gravity equation, both among themselves and with machine learning-based forecast methods such as random forests and neural networks. We find that the 3-way gravity model is difficult to beat in terms of out-of-sample average predictive performance, especially if a flexible specification is used. This result further justifies its place as the predominant tool for applied trade policy analysis. However, when the goal is to predict individual bilateral trade flows, the 3-way model can be outperformed by an ensemble machine learning method.

Suggested Citation

  • Nicolas Apfel & Holger Breinlich & Nick Green & Dennis Novy & J. M. C. Santos Silva & Tom Zylkin, 2025. "Out-of-sample gravity predictions and trade policy counterfactuals," Papers 2509.11271, arXiv.org, revised Sep 2025.
  • Handle: RePEc:arx:papers:2509.11271
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2509.11271
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Achim Ahrens & Christian B. Hansen & Mark E. Schaffer, 2023. "pystacked: Stacking generalization and machine learning in Stata," Stata Journal, StataCorp LLC, vol. 23(4), pages 909-931, December.
    2. Gourieroux, Christian & Monfort, Alain & Trognon, Alain, 1984. "Pseudo Maximum Likelihood Methods: Applications to Poisson Models," Econometrica, Econometric Society, vol. 52(3), pages 701-720, May.
    3. James E. Anderson & Eric van Wincoop, 2003. "Gravity with Gravitas: A Solution to the Border Puzzle," American Economic Review, American Economic Association, vol. 93(1), pages 170-192, March.
    4. repec:bla:ecpoli:v:16:y:2001:i:33:p:449-461 is not listed on IDEAS
    5. György Ruzicska & Ramzi Chariag & Olivér Kiss & Miklós Koren, 2024. "Can Machine Learning Beat Gravity in Flow Prediction?," Advanced Studies in Theoretical and Applied Econometrics, in: Laszlo Matyas (ed.), The Econometrics of Multi-dimensional Panels, edition 0, chapter 0, pages 511-545, Springer.
    6. Baier, Scott L. & Yotov, Yoto V. & Zylkin, Thomas, 2019. "On the widely differing effects of free trade agreements: Lessons from twenty years of trade integration," Journal of International Economics, Elsevier, vol. 116(C), pages 206-226.
    7. repec:boc:pcon20:13 is not listed on IDEAS
    8. Andrew K. Rose, 2001. "Currency unions and trade: the effect is large," Economic Policy, CEPR, CESifo, Sciences Po;CES;MSH, vol. 16(33), pages 449-461.
    9. Sergio Correia & Paulo Guimarães & Tom Zylkin, 2020. "Fast Poisson estimation with high-dimensional fixed effects," Stata Journal, StataCorp LLC, vol. 20(1), pages 95-115, March.
    10. Andrew K. Rose, 2004. "Do We Really Know That the WTO Increases Trade?," American Economic Review, American Economic Association, vol. 94(1), pages 98-114, March.
    11. Baier, Scott L. & Bergstrand, Jeffrey H., 2007. "Do free trade agreements actually increase members' international trade?," Journal of International Economics, Elsevier, vol. 71(1), pages 72-95, March.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Yoto V. Yotov, 2024. "The evolution of structural gravity: The workhorse model of trade," Contemporary Economic Policy, Western Economic Association International, vol. 42(4), pages 578-603, October.
    2. Breinlich, Holger & Corradi, Valentina & Rocha, Nadia & Ruta, Michele & Silva, J.M.C. Santos & Zylkin, Tom, 2021. "Machine learning in international trade research - evaluating the impact of trade agreements," LSE Research Online Documents on Economics 114379, London School of Economics and Political Science, LSE Library.
    3. Koen Jochmans & Vincenzo Verardi, 2022. "Instrumental‐variable estimation of exponential‐regression models with two‐way fixed effects with an application to gravity equations," Journal of Applied Econometrics, John Wiley & Sons, Ltd., vol. 37(6), pages 1121-1137, September.
    4. Mario Larch & Yoto V. Yotov, 2024. "Estimating the effects of trade agreements: Lessons from 60 years of methods and data," The World Economy, Wiley Blackwell, vol. 47(5), pages 1771-1799, May.
    5. Beniamino Quintieri & Giovanni Stamato, 2023. "Are preferential agreements beneficial to EU trade? New evidence from the EU–South Korea treaty," The World Economy, Wiley Blackwell, vol. 46(12), pages 3511-3541, December.
    6. Christian Elleby & Wusheng Yu & Qian Yu, 2018. "The Chinese Export Displacement Effect Revisited," IFRO Working Paper 2018/02, University of Copenhagen, Department of Food and Resource Economics.
    7. J. M. C. Santos Silva & Silvana Tenreyro, 2022. "The Log of Gravity at 15," Portuguese Economic Journal, Springer;Instituto Superior de Economia e Gestao, vol. 21(3), pages 423-437, September.
    8. Tyazhelnikov, Vladimir & Romalis, John, 2024. "Russian counter-sanctions and smuggling: Forensics with structural gravity estimation," Journal of International Economics, Elsevier, vol. 152(C).
    9. Silviano Esteve-Pérez & Salvador Gil-Pareja & Rafael Llorca-Vivero, 2020. "Does the GATT/WTO promote trade? After all, Rose was right," Review of World Economics (Weltwirtschaftliches Archiv), Springer;Institut für Weltwirtschaft (Kiel Institute for the World Economy), vol. 156(2), pages 377-405, May.
    10. Gabriel Felbermayr & Constantinos Syropoulos & Erdal Yalcin & Yoto V. Yotov, 2025. "On the heterogeneous effects of sanctions on trade," Canadian Journal of Economics/Revue canadienne d'économique, John Wiley & Sons, vol. 58(1), pages 247-280, February.
    11. Weidner, Martin & Zylkin, Thomas, 2021. "Bias and consistency in three-way gravity models," Journal of International Economics, Elsevier, vol. 132(C).
    12. Andrzej Cieślik & Oleg Gurshev, 2022. "Friends with or without benefits? An empirical evaluation of bilateral trade and economic integration between some of the post-Soviet economies," Eurasian Economic Review, Springer;Eurasia Business and Economics Society, vol. 12(4), pages 769-795, December.
    13. Suárez-Varela, Marta & Rodríguez-Crespo, Ernesto, 2022. "Is dirty trade concentrating in more polluting countries? Evidence from Africa," Economic Analysis and Policy, Elsevier, vol. 76(C), pages 728-744.
    14. Peiró-Palomino, Jesús & Rodríguez-Crespo, Ernesto & Suárez-Varela, Marta, 2022. "Do countries with higher institutional quality transition to cleaner trade?," Ecological Economics, Elsevier, vol. 201(C).
    15. Heid, Benedikt & Stähler, Frank, 2024. "Structural gravity and the gains from trade under imperfect competition: Quantifying the effects of the European Single Market," Economic Modelling, Elsevier, vol. 131(C).
    16. Dutt, Pushan, 2020. "The WTO is not passé," European Economic Review, Elsevier, vol. 128(C).
    17. Beverelli, Cosimo & Gourevich, Isabella & Heiland, Inga & Keck, Alexander & Larch, Mario & Yotov, Yoto, 2023. "Trade and welfare effects of the WTO Trade Facilitation Agreement," WTO Staff Working Papers ERSD-2023-04, World Trade Organization (WTO), Economic Research and Statistics Division.
    18. Chang, Pao-Li & Lee, Myoung-Jae, 2011. "The WTO trade effect," Journal of International Economics, Elsevier, vol. 85(1), pages 53-71, September.
    19. Grant, Jason H. & Boys, Kathryn A. & Giddens, Janice C. & Loux, William, 2025. "Enhancing nutrition availability through international trade: U.S. and global dairy exports to emerging markets," Food Policy, Elsevier, vol. 132(C).
    20. Anna Golovko & Hasan Sahin, 2021. "Analysis of international trade integration of Eurasian countries: gravity model approach," Eurasian Economic Review, Springer;Eurasia Business and Economics Society, vol. 11(3), pages 519-548, September.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2509.11271. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.