Skip to main content

Nowcasting Global Trade: A RAS Simulation

In the fast-moving world of international trade, data is often the bottleneck. Detailed Inter-Country Input-Output (ICIO) tables—the maps that tell us exactly how many semiconductors Japan sold to Germany—often lag by years. Yet, policymakers and analysts need to know what the world looks like today.

How do we reconcile the detailed structural data of the past with the aggregate economic realities of the present? In this analysis, we deployed the RAS Method (Bi-Proportional Adjustment) to "Nowcast" the 2022 global trade structure using only historical patterns and current headlines.

The Methodology: A Blind Simulation

To rigorously test the RAS capability, we set up a "Blind Simulation" using Python. Although we possessed the full 2022 Input-Output tables, we deliberately ignored the interior data—the specific supply chain connections between countries.

Instead, we fed the algorithm only two specific inputs, mimicking the real-world constraint where detailed data is missing:

  • The "Seed" (Structure): The outdated 2016 trade matrix, representing the "technological recipe" of the past.
  • The "Controls" (Scale): The 2022 Row and Column totals. These represent the verified "Headline Numbers" (Total Exports and Total Imports per country) which are typically released years ahead of the detailed tables.

The algorithm's task was to mathematically stretch and compress the 2016 structure until it perfectly fit inside the 2022 aggregate boundaries.

Technical Challenge & Solution:
Real-world data is messy. Our Python script handled two specific pitfalls to ensure convergence:
  • The Zero Problem: Trade routes that didn't exist in 2016 (zeros) would mathematically stay zero forever. We solved this by injecting a tiny epsilon value (1×10-4) into the seed matrix, allowing the algorithm to "discover" new trade routes (like Vietnam → USA) if the 2022 totals demanded it.
  • Negative Values: Inventory changes and subsidies often appear as negative numbers in raw data, which causes the RAS algorithm to explode. We implemented a cleaning step to clip these values at zero, ensuring mathematical stability.

The Big Questions: What This Solves

By forcing the 2016 trade structure to conform to 2022's hard totals, we generated a Predicted 2022 Matrix that allows us to answer structural questions without waiting for official reports:

  • Is "Decoupling" Real? – Did trade between the US and China shrink relative to their economic growth?
  • Who are the New Hubs? – Which countries (e.g., Vietnam, Mexico) have structurally intensified their trade relationships with the West?
  • The Reshoring Question: – Have major economies like Germany and the USA become more insular, trading more with themselves (Domestic Output) than with partners?

Visualizing the Shift: The 2016–2022 Heatmap

The heatmap below visualizes the Implied Structural Growth derived from our RAS simulation. This is not just a map of volume, but of structural intensity.

How to Read This Map

  • Deep Blue (Intensification): These cells represent trade relationships that grew faster than the general GDP growth of the trading partners. A blue square for Vietnam → USA signals a deepening structural reliance.
  • Red (Relative Decline): These cells indicate trade relationships that lagged. A red hue for China → USA implies that, even if absolute dollar amounts rose, the share of trade is shrinking relative to China's massive total output—a quantitative signal of decoupling.
  • White / Light: These relationships grew roughly in line with the broader economy.

Conclusion

This simulation demonstrates that while we often lack detailed maps of the present, we can construct reliable approximations using the RAS method. By fusing the "geometry" of the past with the "scale" of the present, analysts can identify winners and losers in the post-2020 supply chain restructuring long before official tables are published.

Analysis performed using Python, Pandas, and the OECD ICIO Datasets.

Comments

Popular posts from this blog

Modeling Core PCE inflation: A dual approach

Today's release of the August 2025 Personal Consumption Expenditures (PCE) inflation data drew widespread media attention, with coverage highlighting both the persistence of inflation and its implications for Federal Reserve policy. Across outlets, analysts pointed to resilient consumer spending and income growth as signs of underlying economic strength, even as inflation remains above the Fed's 2% target. The consensus among media reports is that while inflation is not worsening, its stubbornness continues to challenge policymakers navigating a softening labor market and evolving rate expectations. To provide deeper insights into inflation's trajectory, I've developed a forecasting framework that combines two econometric approaches — ARIMA time series modeling and Phillips Curve analysis—to predict Core PCE inflation. This analysis presents a unique opportunity to validate my forecasting methodology against eight months of 2025 data. ...

Do Minimum Wage Increases Really Kill Jobs? Evidence from the "Fight for $15" Era

The debate over minimum wage policy has raged for decades, with economists, policymakers, and business leaders offering sharply different predictions about its effects on employment. Critics warn that raising the minimum wage will force employers to cut jobs, while supporters argue that higher wages boost worker productivity and spending power. But what does the actual data tell us. Using a comprehensive difference-in-differences analysis and Federal Reserve Economic Data covering 43 U.S. states from 2012-2020 of the "Fight for $15" movement between 2012 and 2020, I provide some evidence about how minimum wage increases actually affect employment in the real world. The Perfect Natural Experiment The period from 2012 to 2020 provided economists with an ideal "natural experiment" to study minimum wage effects. Here's why this timeframe was perfect for analysis: Federal Stability : The federal minimum wage remained frozen at $7.25 per hour since 2009, creating ...

Mapping the Matrix: Malaysia's Corporate Network

The complex interconnections that define modern society are readily visible in our Facebook or LinkedIn networks. But what about the corporate world? I recently began mapping the web of cross-shareholding among Malaysia's listed corporations. Using Social Network Analysis (SNA), I visualized the ecosystem to identify key "communities" and power brokers. The goal? To see if a company's position in this web predicts its financial destiny. The State of Play (2015) Figure 1: Malaysia's Corporate Network in 2015 (Created via Gephi) The map above visualizes the network as of 2015. While I have excluded specific company names, the "super-nodes" (the largest circles) represent the most connected shareholders in the economy—primarily government-linked investment companies (GLICs), fund managers, and international asset managers. A Decade of Growing Complexity ...