By Mariel Álvarez, Óscar Adrián Huitz, Emiliano Montalvo, David Roberto Valenzuela y Carlos Emmanuel Saldaña
Predicting how much countries will trade—and what they will trade—in the coming months is not as simple as looking at recent trends. A single country may trade hundreds of products with different trading partners, and each flow can respond differently to factors such as changes in tariffs, exchange rates, or commodity prices.
One way to tackle this challenge is to group countries with similar trade patterns before making the forecast, potentially improving its accuracy.
The study Forecasting Trade Flows under Geopolitical Uncertainty: A Hybrid Econometric–LSTM Approach proposes first grouping trade series with similar patterns and then building a specific model for each group.
The researchers tested this approach using China’s and the United States’ imports and exports, combining econometric and machine-learning tools to forecast trade flows in an environment where tariffs can change from month to month.
AI Forecasting for International Trade
The need is clear: traditional forecasting models, based on historical trends or gravity equations, perform poorly when there are sudden disruptions [1]. General equilibrium models are better at capturing policy shocks, but they do not scale well to thousands of countries and products.
At a one-month horizon, the LSTM (Long Short-Term Memory) model outperformed the other two comparison models across all four groups analyzed. For China’s exports, the average error fell from 18.9% to 17.4%, while for imports, it dropped from 25.2% to 22.5% (Figure 1).
Grouping Before Forecasting
Forecasting international trade is challenging because there are many data series—records of each product’s exports over time—and their behavior can vary widely. A single country exports hundreds of products, and changes in sales for one product are not necessarily related to changes in another.
Conventional methods address this in two ways: they either combine all the series into a single model, losing detail, or estimate one model for each series, making the task unmanageable.
The hybrid econometric–LSTM approach uses the Phillips and Sul log-t test [2], which identifies convergence clubs—groups of series that start at different levels but eventually move toward a similar trajectory.
The test identified 24 clubs—groups of products with similar trade patterns—in U.S. trade and 11 in China’s. Each club gets its own model. This preserves differences across groups without requiring thousands of separate models.
Once the clubs are formed, the next step is to reduce the number of variables.
Principal Component Analysis condenses 24 macroeconomic indicators—including industrial production, real exchange rates, commodity prices, and trade uncertainty indexes—into a handful of factors. A LASSO regression (Least Absolute Shrinkage and Selection Operator)—a statistical method that helps identify which variables provide useful information and which can be discarded—then retains only the variables that contribute to the forecast within each club.
That selection feeds into an LSTM network, a type of neural network designed to recognize patterns in time-series data and capture relationships that linear models may miss.
The data come from the Observatory of Economic Complexity [3]. They consist of monthly observations from January 2023 through March 2025 for the 20 largest trading partners of China and the United States, with products classified at the four-digit level of the Harmonized System.
More Data, Better Forecasts?
To determine how much of the improvement came from the clubs—groups of countries with similar trade patterns—and how much came from the neural network—an artificial intelligence model that learns patterns from data—the authors compared their model with two alternatives: an LSTM network without clubs or external variables, and another model with external variables but no clubs.
The proposed model outperformed the LSTM with external variables but no clubs, and by a wider margin. This suggests that adding macroeconomic information to a neural network can actually be counterproductive when the differences in data behavior across groups of countries are not addressed first.
Compared with the version using external variables, the proposed model performed better for China’s exports and imports and for U.S. imports. The only exception was U.S. exports, where the difference was not statistically significant.
Diebold-Mariano tests—a statistical method used to determine whether differences between two forecasting models are real or could be due to chance—rule out the possibility that the observed differences are simply random: the results are statistically significant at the 1% level for the full dataset and for most groups.
The improvement comes from the convergence structure—grouping countries with similar trade patterns—rather than from deep learning alone.
Where the Model Falls Short
The advantage is concentrated in the short term. At three- and six-month horizons, performance deteriorates across all models (Figure 1). In some cases, the proposed model does not even outperform the naïve forecast, which simply repeats the last observed value.
China’s series produced mixed results. For imports, the global LSTM network performed better. Clubs with fewer series or less stable patterns were more sensitive to model-specification errors: some improved by more than 20% compared with the benchmark models, while others deteriorated by a similar margin (Figure 2).
The authors point to the main limitation: the dataset spans just over two years, which is a short period for identifying long-term dynamics—the very assumption underlying the formation of convergence clubs. It also does not capture major disruptions such as the COVID-19 pandemic.
The framework has practical applications, including scenario analysis, inventory management, assessing the impact of tariffs, and early detection of trade disruptions.
The underlying idea could be applied well beyond international trade. Grouping heterogeneous series according to their long-term behavior before training a model could be useful for any economic forecasting problem involving thousands of series with different dynamics.
The authors propose two directions for future research. One is to extend the study period. The other is to examine whether China’s trade series have structural dynamics that do not fit the convergence assumption.
Key reference
Álvarez-Salas, M., Huitz-Montero, O. A., Montalvo-Vásquez, E., Valenzuela Vega, D. R., & Saldaña Villanueva, C. E. (2026). Forecasting trade flows under geopolitical uncertainty: A hybrid econometric–LSTM approach. Trendinomics, 2(2), 1–12.
Other references
- Borin, A., Gazzani, A., & Mancini, M. (2024). Trade and economic activity: Nonlinear modeling and forecasting. Journal of Forecasting, 44(4), 1247–1265.
- Phillips, P. C. B., & Sul, D. (2007). Transition modeling and econometric convergence tests. Econometrica, 75(6), 1771–1855.
- Simoes, A. J. G., & Hidalgo, C. A. (2011). The Economic Complexity Observatory: An analytical tool for understanding the dynamics of economic development. Workshops at the Twenty-Fifth AAAI Conference on Artificial Intelligence. https://oec.world
- Diebold, F. X., & Mariano, R. S. (1995). Comparing predictive accuracy. Journal of Business & Economic Statistics, 13(3), 253–263.
- Pesaran, M. H., Schuermann, T., & Smith, L. V. (2009). Forecasting economic and financial variables with global VARs. International Journal of Forecasting, 25(4), 642–675.
Authors
Mariel Álvarez-Salas. Undergraduate student in Data Science and Mathematics Engineering at Tec de Monterrey. She works as a research assistant at Tec de Monterrey and as a Data Science intern at Welo Data.
Oscar Adrián Huitz-Montero. Economics student at the Autonomous University of Nuevo León. He works as a spot market specialist at Johnson Controls and as a research assistant at Tec de Monterrey.
Emiliano Montalvo-Vásquez. Holds a degree in Government and Public Transformation and a degree in Economics from Tec de Monterrey. He works as a researcher at the School of Social Sciences and Government at Tec de Monterrey.
David Roberto Valenzuela Vega. Ph.D. in Economics from the Autonomous University of Nuevo León. Professor in the Department of Economics and consultant at the School of Social Sciences and Government at Tec de Monterrey.
Carlos Emmanuel Saldaña Villanueva. Ph.D. in Economics from the Autonomous University of Nuevo León. Professor at the School of Business, Accounting, and Finance at Tec de Monterrey.

