IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2509.11271.html
   My bibliography  Save this paper

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. 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.
    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. 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 2, chapter 0, pages 511-545, Springer.
    8. 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.
    9. 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.
    10. 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.
    11. repec:oup:ecpoli:v:16:y:2001:i:33:p:449-461 is not listed on IDEAS
    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. Holger Breinlich & Valentina Corradi & Nadia Rocha & Michele Ruta & Joao M.C. Santos Silva & Tom Zylkin, 2021. "Machine Learning in International Trade Research ?- Evaluating the Impact of Trade Agreements," School of Economics Discussion Papers 0521, School of Economics, University of Surrey.
    3. 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.
    4. 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.
    5. 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.
    6. Natalie Chen & Dennis Novy, 2022. "Gravity and Heterogeneous Trade Cost Elasticities," The Economic Journal, Royal Economic Society, vol. 132(644), pages 1349-1377.
    7. 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.
    8. Weidner, Martin & Zylkin, Thomas, 2021. "Bias and consistency in three-way gravity models," Journal of International Economics, Elsevier, vol. 132(C).
    9. 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.
    10. Arne Nagengast & Fernando Rios-Avila & Yoto Yotov, 2024. "The European Single Market and Intra-EU Trade: An Assessment with Heterogeneity-Robust Difference-in-Differences Methods," School of Economics Working Paper Series 2024-5, LeBow College of Business, Drexel University.
    11. 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).
    12. 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).
    13. Mario Larch & Jeff Luckstead & Yoto V. Yotov, 2024. "Economic sanctions and agricultural trade," American Journal of Agricultural Economics, John Wiley & Sons, vol. 106(4), pages 1477-1517, August.
    14. 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.
    15. Mario Larch & Serge Shikher & Constantinos Syropoulos & Yoto V. Yotov, 2022. "Quantifying the impact of economic sanctions on international trade in the energy and mining sectors," Economic Inquiry, Western Economic Association International, vol. 60(3), pages 1038-1063, July.
    16. Dongin Kim & Sandro Steinbach, 2024. "The Linder hypothesis for foreign direct investment revisited," Review of International Economics, Wiley Blackwell, vol. 32(4), pages 1901-1928, September.
    17. Benjamin Jung, 2023. "The Trade Effects of the EU-South Korea Free Trade Agreement: Heterogeneity Across Time, Country Pairs, and Directions of Trade within Country Pairs," Open Economies Review, Springer, vol. 34(3), pages 617-656, July.
    18. French, Scott & Zylkin, Tom, 2024. "The effects of free trade agreements on product-level trade," European Economic Review, Elsevier, vol. 162(C).
    19. Eduardo Rodrigues Sanguinet & Augusto Mussi Alvim & Miguel Atienza, 2022. "Trade agreements and participation in global value chains: Empirical evidence from Latin America," The World Economy, Wiley Blackwell, vol. 45(3), pages 702-738, March.
    20. Pedro Esteban Moncarz & Manuel Flores & Sebastián Villano & Marcel Vaillant, 2023. "Intra‐ and extra‐regional trade costs: A comparative approach to Latin‐American performance," The World Economy, Wiley Blackwell, vol. 46(8), pages 2248-2284, August.

    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.