Measuring Trade Flows, Impact of Tariffs and Economic Shocks: AI-Driven Econometric Modeling
- Amir Bagherpour
- Mar 10
- 2 min read
Using LLM enhanced econometrics to optimize trade and supply chain models, I applied an approach to estimating impact of tariffs on trade flows, wages, producer prices, and the economy.
The approach integrates gravity models, trade policy simulations, and AI-assisted econometric tools, leveraging Sankey diagrams, density plots, and 3D visualizations to quantify tariff effects.
🔹 Key Insights
📊 Mapping Trade Flows of top 3 U.S. trade partners (Sankey & Gravity Model)
✔ China, Mexico, and Canada are the largest U.S. trade partners, highlighting supply chain dependencies.
✔ U.S. trade deficits are driving policy decisions, spurring tariffs and impacting trade flows. China, Mexico, and Canada have trade imbalances with U.S.
📈 Estimating Wage & Price Impacts (Density Contour Models & Trade Policy Simulations)
✔ Tariffs impact on wages is non-linear and depends on industry.
✔ Mexico & Canada show higher volatility, suggesting greater sensitivity to tariff shifts.
✔ China’s response appears more stable, possibly due to broader trade diversification.
📉 The Price of Tariffs (3D Surface Plot & U.S. Economic Effects)
✔ Higher tariffs correlate with rising producer costs, adding inflationary pressure.
✔ Beyond a certain threshold, tariff impacts escalate, affecting multiple industries.
✔ Tariffs support some domestic industries but increase input costs, influencing investment and employment.
🔹 Impact on the U.S. Economy
📌 Manufacturing & Supply Chains:
🔹 Tariffs raise production costs, particularly in automotive, technology, and manufacturing sectors reliant on imports.
🔹 Retaliatory tariffs reduce U.S. export competitiveness, affecting agriculture and aerospace.
📌 Wages & Employment:
🔹 Higher input costs may suppress wage growth, while job effects vary by industry.
📌 Inflation & Consumer Prices:
🔹 Producer costs often pass to consumers, contributing to inflationary pressure.
🔹 How AI Enhances Econometric Modeling
🤖 AI-Augmented Trade Analysis
✔ Automated Data Retrieval – LLMs streamline WTO, IMF, and trade policy data extraction.
✔ Model Optimization – AI-assisted regression diagnostics refine tariff impact estimates.
✔ Scenario Testing & Forecasting – AI-driven simulations improve counterfactual analysis.
🔹 Example: AI-enhanced econometrics dynamically recalibrates trade elasticity assumptions, improving real-time scenario analysis.
🔹 Key Takeaways
📌 China: More stable trade responses with lower wage and price uncertainty.
📌 Mexico & Canada: Higher volatility and stronger exposure to U.S. trade policies.
📌 U.S. Economy: Tariffs affect supply chains, wages, and consumer prices.
📌 Overall: Data-driven trade analytics is essential for managing risk and measuring economic implications.
Flow of Trade Between U.S. and Partners

Sankey Diagram Depicts the Flow of Imports and Exports between the United States and trading partners.
Mean Producer Price Changes, Wage Changes and Tariff Levels

Impact of U.S. Tariffs on China, Mexico and Canada

Assessing Wage and Price Effects (Density Contour Models and Trade Policy Simulations), density plots reveals variance and impacts of tariffs.
Comments