Team ZH
Inspiration
Creative data manipulation at its core: we take five disparate data sources — bilateral trade flows, options-implied distributions, macro indicators, political hawkishness profiles, and real-time asset prices — and fuse them through a novel multi-layer pipeline that no single dataset could support alone.
The Liberation Day tariffs of April 2, 2025 were the motivating case. The market cascade that followed produced three anomalies that linear models cannot explain: the dollar depreciated when trade theory predicts appreciation, equities/bonds/dollar sold off simultaneously breaking safe-haven correlations, and the bond sell-off forced a 90-day tariff pause on April 9 — a reflexive feedback loop in which the cascade altered the policy that caused it. We built a system to capture exactly these dynamics.
What it does
The system ingests a policy shock and models cross-asset propagation as a network problem. Four integrated components run end-to-end:
Information-Theoretic Shock Encoding. The shock magnitude is the KL divergence between the pre-announcement market-implied distribution (extracted from options surfaces and futures curves) and the realised outcome. Impact scales with distributional surprise, not policy level.
Heterogeneous Graph Neural Network. A graph with three node types (sovereign economies, asset classes, agent classes) and six directed edge types. Temporal attention weights ensure fast-transmitting edges (equities) fire early while slow edges (real economy feedback) fire later, producing a time-ordered cascade.
Structural Causal Identification. A DoWhy-based layer tests whether GNN edges represent genuine causal transmission versus spurious correlation. Identification via the backdoor criterion; refutation via placebo treatment and random common cause insertion. Edges failing refutation are downweighted.
Game-Theoretic Retaliation. Foreign governments are modelled as utility-maximising agents over discrete strategy sets {no response, proportional, escalatory, negotiate}. Nash equilibrium via support enumeration produces a probability distribution over retaliation scenarios — each a secondary shock fed back into the GNN.
The system generates three alpha channels: temporal cascade arbitrage (position before the cascade reaches later-order assets), retaliation scenario mispricing (exploit gaps between system and market-implied scenario probabilities), and reflexivity positioning (trade the market-policy feedback loop when the Lipschitz constant approaches 1).
How we built it
The core engine is Python — PyTorch Geometric for the heterogeneous GNN, DoWhy/EconML for structural causal inference, nashpy for Nash equilibrium computation, and NumPy/SciPy for numerical work. Live market data is pulled from Yahoo Finance (19 tickers across 9 economies) and FRED (VIX, Treasury yields, credit spreads, GDP, CPI). Bilateral trade weights are hardcoded from UN Comtrade and US Census Bureau data — these are slow-moving and don't require live API access.
The creative manipulation lies in the fusion: trade weights become graph edges, options surfaces become KL divergence scalars, political science becomes payoff matrices, and the GNN transforms all of it into a time-ordered cascade with actionable portfolio signals.
The interactive demo is built in Streamlit with Plotly visualisations across six tabs — shock encoding, network graph, cascade heatmap, game-theoretic retaliation, causal structure, and portfolio signals. The full pipeline runs end-to-end in seconds.
A 28-page technical paper was produced prior to the hackathon formalising the mathematical framework and five extensions beyond the prototype.
Challenges we ran into
The primary challenge was causal identification in a densely connected financial network. Multiple valid causal structures are consistent with observed data — disentangling whether a tariff independently causes both equity and credit declines, or whether equity declines cause credit widening via risk appetite, requires careful application of Pearl's do-calculus and robust refutation testing. DoWhy's refutation methods (placebo treatment, random common cause) provided the necessary validation but added significant computational cost — causal identification accounts for roughly 50-70% of total pipeline runtime.
Constructing payoff matrices for the game-theoretic module required balancing three competing objectives per actor (economic welfare, political cost, strategic positioning) while ensuring the Nash equilibrium produced realistic mixed strategies rather than degenerate pure strategies. We solved this by introducing interaction effects between actors — coordinated retaliation strengthens bargaining position, mutual escalation triggers trade war spirals — and blending Nash equilibrium with bounded-rationality softmax to model strategic uncertainty.
Accomplishments that we're proud of
The system's outputs align with observed Liberation Day dynamics without being trained on them. The shock encoder correctly identifies the most anomalous asset moves as carrying the highest distributional surprise. The causal layer validates the key transmission channels from the academic literature — including the bidirectional equity-rate reflexive feedback loop that drove the April 9 policy reversal. The game-theoretic module produces equilibrium strategies consistent with revealed geopolitical behaviour: hawkish actors favour escalation while alliance-constrained actors favour negotiation, matching the actual April 2025 responses.
All four components — shock encoding, GNN propagation, causal identification, game-theoretic retaliation — run end-to-end on live market data and produce coherent, interpretable outputs. This is not a mockup.
What we learned
Financial networks are complex adaptive systems where the standard assumption of exogenous shocks breaks down precisely when it matters most. The reflexivity insight — that market outcomes feed back into the policy function — is not just a philosophical observation but a mathematically formalisable phenomenon with testable convergence properties (Banach fixed-point theorem, Lipschitz constant monitoring).
We also learned that the gap between theoretical financial modelling and practical implementation is substantial. Concepts like KL divergence shock encoding and temporal attention in GNNs are elegant on paper but require careful engineering to produce sensible outputs — particularly around edge weight calibration, temporal attention parameterisation, and payoff matrix construction.
What's next for Cross-Asset Policy Shock Propagation Engine
The technical paper (View Paper) formalises five extensions that transform the prototype into a comprehensive research framework:
Regime-Switching Propagation Dynamics — hidden Markov models conditioning the GNN topology on K=4 macro-financial regimes, so the same shock propagates differently in tight versus loose financial conditions.
Lyapunov Stability Analysis — real-time cascade sensitivity detection via maximal Lyapunov exponent estimation, providing a continuous measure of network fragility before a shock hits.
Counterfactual Scenario Generation — Pearl's do-calculus enabling interventional inference across specific retaliation paths, quantifying the mispricing gap per scenario.
Transfer Entropy Topology Monitoring — model-free directed information flow measurement between asset classes, providing real-time validation of GNN predictions and early warning of topological regime shifts.
Reflexivity Fixed-Point Iteration — formalising the market-policy feedback loop as a Banach contraction mapping with analytically characterisable convergence properties. The Lipschitz constant serves as a real-time instability signal.
The full source code is available on our GitHub. Clone the repo, install dependencies, and launch the Streamlit demo to explore the system interactively. For the most comprehensive results, max out the cascade timesteps and shock multiplier, and select all available countries in the retaliation panel.
Log in or sign up for Devpost to join the conversation.