Sovereign Debt Crisis MCP
Pricing
Pay per event + usage
Sovereign Debt Crisis MCP
MCP intelligence server for sovereign debt crisis detection and analysis.
Pricing
Pay per event + usage
Rating
0.0
(0)
Developer
ryan clinton
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
8 days ago
Last modified
Categories
Share
A Model Context Protocol server implementing an endogenous political economy sovereign default simulator. Fuses macroeconomic, trade, FX, regulatory, and geopolitical data from 15 Apify actors into a sovereign debt network, then applies game theory, econometrics, and mechanism design to simulate defaults, contagion, and political transitions.
Tools (8)
| # | Tool | Method | Price |
|---|---|---|---|
| 1 | simulate_sovereign_default | Eaton-Gersovitz (1981) value function iteration on (b,y) state space | $0.045 |
| 2 | compute_clearing_contagion | Eisenberg-Noe (2001) + CDS circularity (Scarf-type damped iteration) | $0.045 |
| 3 | estimate_fiscal_sustainability | Hansen (1999) panel threshold regression with bootstrap inference | $0.035 |
| 4 | design_optimal_restructuring | Myerson mechanism design + Nash-Rubinstein alternating offers | $0.040 |
| 5 | model_speculative_attack | Morris-Shin (2003) global games with unique switching equilibrium | $0.040 |
| 6 | detect_crisis_jumps | Lee-Mykland (2008) non-parametric jump detection via bipower variation | $0.035 |
| 7 | forecast_multi_frequency | MIDAS regression (Ghysels 2004) with Almon exponential lag polynomials | $0.035 |
| 8 | assess_political_transition_risk | Acemoglu-Robinson (2006) inequality-driven regime transitions | $0.035 |
Data Sources (15 actors across 5 categories)
Macro (6): IMF, World Bank, FRED, BLS, OECD, Eurostat Trade (2): UN COMTRADE, World Bank Projects FX (3): Exchange Rates, Historical Exchange Rates, ECB Exchange Rates Regulatory (2): Federal Register, Congress Bills Geopolitical (2): OpenSanctions, REST Countries
Mathematical Foundations
Tool 1: Sovereign Default — Eaton-Gersovitz Model
The canonical model of strategic sovereign default. A small open economy with income y and debt b chooses between repayment and default:
- Continuation value: V_c(b,y) = max_{b'} u(c) + β·E[max(V_c(b',y'), V_d(y'))] where c = y - b + q(b',y)·b'
- Default value: V_d(y) = u(y^def) + β·E[θ·V_c(0,y') + (1-θ)·V_d(y')]
- Bond price: q(b',y) = E[1{no default}]/(1+r_f) — endogenous risk pricing
The default threshold, borrowing policy, and equilibrium spreads are all simultaneously determined as a fixed point.
Tool 2: Clearing Contagion — Eisenberg-Noe with CDS
Standard Eisenberg-Noe finds clearing payments via monotone fixed-point iteration (Tarski's theorem). CDS circularity breaks monotonicity: bank A's solvency depends on bank B paying CDS protection, but B's ability to pay depends on C, which depends on A. The non-monotone mapping requires Scarf-type damped iteration with a convergence rate of O(1/k) instead of the geometric convergence of standard methods.
Tool 3: Fiscal Sustainability — Hansen Threshold Regression
Tests whether fiscal behavior changes regime at a debt-to-GDP threshold γ. The model y_it = α_i + β₁·x·I(q≤γ) + β₂·x·I(q>γ) + ε classifies countries into sustainable vs. unsustainable fiscal regimes. The threshold is identified by minimizing concentrated SSR over a grid, with significance assessed via Hansen bootstrap (asymptotic distribution is non-standard — mixture of chi-squareds).
Tool 4: Optimal Restructuring — Myerson + Rubinstein
Combines mechanism design with bargaining theory:
- Myerson revelation principle: Debtor type θ (capacity to pay) is private info. IC constraints require monotone transfer schedules.
- Nash bargaining: max (u_d - d_d)^α · (u_c - d_c)^(1-α) gives fair surplus split.
- Rubinstein alternating offers: First-mover share = (1-δ_c)/(1-δ_d·δ_c) where δ are discount factors. More patient player captures more surplus.
Tool 5: Speculative Attack — Morris-Shin Global Games
Resolves the Obstfeld (1996) indeterminacy (multiple equilibria in currency crises) via incomplete information. Speculators receive private signals x_i = θ + σ·ε_i about fundamentals θ. With finite signal precision (σ > 0), there exists a unique switching equilibrium θ*: speculators attack iff x_i < θ*, and the peg collapses iff θ < θ*. This is perhaps the most elegant application of global games to macroeconomics.
Tool 6: Crisis Jumps — Lee-Mykland Test
Non-parametric detection of jumps in CDS/spread data:
- Bipower variation σ̂² estimates continuous volatility while being robust to jumps
- Test statistic L_i = |Δlog(X_i)| / σ̂_i
- Under H₀: (L_i - C_n)/S_n converges to Gumbel distribution
- Centering: C_n = √(2·log(n)) - [log(π)+log(log(n))] / [2√(2·log(n))]
Tool 7: Multi-Frequency Forecast — MIDAS Regression
Bridges the frequency gap between daily financial data and quarterly macro data:
- y_t^(Q) = β₀ + β₁ · Σ_k B(k;θ)·x_{t-k}^(D) + ε_t
- Almon exponential weights: B(k;θ₁,θ₂) = exp(θ₁k+θ₂k²) / Σexp(...)
- Parsimonious: 2 parameters govern the entire high-frequency lag structure
- Nowcasting: current-quarter prediction using within-quarter high-freq data
Tool 8: Political Transition — Acemoglu-Robinson
Models political transitions as inequality-driven Markov dynamics:
- Elite regime: Concedes redistribution when revolution threat θ exceeds threshold
- Democratic regime: Median voter taxation at τ_m
- Coup risk: Elite military capacity × (1 - cost of coup)
- Gini threshold: Inequality crossing critical level triggers transition
- Markov chain over {democratic, hybrid, authoritarian} with endogenous transition probabilities
Architecture
Client ──► Express (port 3019) ──► McpServer factory│┌─────────────┼─────────────┐▼ ▼ ▼SSE transport Streamable HTTP Health endpoint│ │▼ ▼getOrBuildNetwork() (5-min TTL cache)│┌───────────┼───────────┐▼ ▼ ▼15 Apify actors Graph build 8 analysis tools(parallel fetch) (fusion) (per-request)
Usage
npm installnpm run buildnpm start
Environment variables:
APIFY_TOKEN— Apify API token for actor executionPORT— Server port (default: 3019)
Endpoints
GET /sse— SSE transport for MCPPOST /messages?sessionId=...— SSE message handlerPOST /mcp— Streamable HTTP transportGET /health— Health check with network stats


