SuperAPI AI Directory

demographic-fiscal-trap-analyzer

Data & analytics

View repository

Updated 10-15 21:41

About this skill

<essential_principles>

The "Demographic-Fiscal Trap" refers to the situation in which, as the old-age dependency ratio continues to rise, government debt/GDP remains persistently high, the bureaucratic system expands inefficiently, and nominal growth cannot cover interest payments, the government tends to reduce its real liabilities through "financial repression" or "inflation erosion."

Core features of this trap:

  1. Demographic rigidity: The rise in the old-age dependency ratio is an irreversible long-term trend
  2. Debt self-reinforcement: When r > g, the debt ratio automatically expands
  3. Political resistance: The political cost of cutting welfare spending is extremely high
  4. Monetary exit: When there is no path to fiscal reform, monetary dilution becomes the "path of least resistance"

This skill uses a four-dimensional scoring framework:

Pillar Weight (default) Core indicators
Aging Pressure 35% Old-age dependency ratio level + 10-year slope
Debt Dynamics 35% Debt/GDP + 5-year slope + (r-g)
Bloat Index 15% Government consumption/GDP + government expenditure/GDP
Growth Drag 15% Nominal GDP growth rate (scored negatively)

Final fiscal_trap_score = Σ(weight × z-score) weighted sum

The Inflation Incentive Score measures the strength of a government's motivation to choose the "inflation erosion" path:

inflation_incentive =
    0.40 × zscore(debt_level)           # 高債務 → 強動機
  + 0.20 × zscore(r - g)                # r > g → 難以自然去槓桿
  + 0.20 × zscore(neg_real_rate_share)  # 負實質利率持續 → 已在執行
  + 0.20 × zscore(bloat_index)          # 高官僚膨脹 → 難以削減支出

When this index > 1.5, it indicates that the economy has a strong incentive to maintain a negative real interest rate environment.

This skill uses publicly reproducible data sources:

Data type Preferred source Secondary source API/download method
Dependency ratio World Bank WDI UN WPP API / CSV
Government debt IMF WEO World Bank API / CSV
Government expenditure IMF GFS World Bank API / CSV
Health expenditure WHO GHED World Bank API / CSV
Nominal GDP growth World Bank IMF WEO API
CPI inflation World Bank IMF API
10-year government bond yield OECD / national central banks Trading Economics API / scraping

All indicators can be obtained through wbdata、imfpy or direct API.

To make cross-country comparisons meaningful, all raw indicators are converted to z-scores:

zscore(x) = (x - μ_cross_section) / σ_cross_section

where μ and σ are the cross-country cross-sectional statistics for the same period.

This makes:

  • z > 1.5 → significantly above average (warning)
  • z > 2.0 → extreme value (red flag)
  • z < -1.0 → significantly better than average

Based on the two main axes, Aging Pressure and Debt Dynamics, economies are divided into four quadrants:

Quadrant Aging pressure Debt dynamics Typical countries Policy space
Q1: Dual-high crisis High (>1) High (>1) Japan, Italy, Greece Extremely narrow
Q2: Aging-dominated High (>1) Low (<1) Germany, South Korea Medium (Debt Available)
Q3: Debt-Led Low (<1) High (>1) United States, Brazil Medium (Demographic Dividend)
Q4: Relatively Healthy Low (<1) Low (<1) India, Indonesia Broad

Q1 quadrant countries are most likely to enter a "Fiscal Trap" and choose the inflation dilution path.

</essential_principles>

  1. Quantify Fiscal Vulnerability: Calculate each country/region's fiscal_trap_score and inflation_incentive_score
  2. Identify Structural Risks: Through four-pillar decomposition, diagnose which dimension contributes the most risk
  3. Quadrant Positioning: Classify economies into four quadrants to determine their policy space
  4. Trend Early Warning: Use dependency ratio projections to 2050 for forward-looking assessment of trap evolution
  5. Cross-Country Comparison: Support side-by-side comparison of multiple countries to identify relative risk ranking

<quick_start>

Quick Start

Single-Country Analysis

請分析日本的人口財政陷阱風險,使用 2010-2023 年資料,預測至 2050 年

Multi-Country Comparison

比較 G7 國家的財政陷阱分數,並按通膨激勵指數排序

Custom Weights

分析台灣的財政陷阱,使用自訂權重:老化 40%、債務 40%、膨脹 10%、成長 10%

</quick_start>

Parameter Type Required Default Description
entities list[string] Yes - Country/region code (ISO3 or region such as OECD, EU, WORLD)
start_year int Yes - Historical data start year
end_year int Yes - Historical data end year (usually = latest year)
forecast_end_year int No 2050 Dependency ratio projection end year
dependency_components list[string] No ["old_age","youth","total"] Dependency ratio decomposition items
fiscal_modules list[string] No ["debt","spending","health"] Enabled fiscal modules
bureaucracy_proxies list[string] No ["gov_wage_bill","public_employment_share","gov_consumption"] Bureaucratic expansion proxy indicator
inflation_channel string No "real_rates" Inflation path analysis method
weights dict No {"aging":0.35,"debt":0.35,"bloat":0.15,"growth_drag":0.15} Weights for each pillar

<workflows_overview>

Available Workflows

  1. full-analysis.md - Full Analysis: Execute all modules and produce a comprehensive report
  2. debt-dynamics.md - Debt Dynamics Feature: In-depth analysis of the r-g gap and debt trajectory
  3. aging-projection.md - Aging Projection: Dependency ratio forecasts and forward-looking fiscal pressure
  4. cross-country.md - Cross-Country Comparison: Side-by-side scoring and ranking of multiple countries
  5. inflation-path.md - Inflation Path: Analyze the persistence of negative real interest rates and monetary dilution incentives </workflows_overview>

<interpretation_guide>

Results Interpretation Guide

Fiscal Trap Score Interpretation

Score Range Risk Level Suggested Focus
< 0 Low Risk Sound fiscal position, ample policy space
0 - 1 Medium Risk Need to monitor deterioration in specific pillars
1 - 2 High Risk Significant structural problems, reform window narrowing
> 2 Extremely High Risk Extremely high fiscal trap risk, rising probability of inflation dilution

Inflation Incentive Score Interpretation

Score Range Policy Bias Implications for Asset Allocation
< 0.5 Orthodox Fiscal Policy Nominal bonds relatively safe
0.5 - 1.5 Moderate Financial Repression Real returns under pressure
> 1.5 Strong Dilution Incentive Inflation-hedging assets should be considered
</interpretation_guide>

<execution_examples>

Case Study: Japan Demographic-Fiscal Trap Analysis (2010-2023)

Analysis Instructions

請分析日本的人口財政陷阱風險,使用 2010-2023 年資料,預測至 2050 年

Key Findings

Composite Score Results

  • Fiscal Trap Score: 2.03 (CRITICAL > 2.0 threshold)
  • Inflation Incentive Score: 2.38 (Extremely High > 1.5 threshold)
  • Quadrant Classification: Q1 - Dual-High Crisis (HighAging & HighDebt)
  • OECD Ranking: #1 (Highest-Risk Country)

Four-Pillar Detailed Scoring

Pillar Z-Score Weight Contribution Global Ranking Risk Level
Aging Pressure 2.40 35% 0.84 #1 ★★★★★
Debt Dynamics 2.45 35% 0.86 #1 ★★★★★
Bureaucratic Bloat 1.09 15% 0.16 #15 ★★☆☆☆
Growth Drag 1.10 15% 0.17 #33 ★★☆☆☆

Key Indicators Overview (2010→2023)

老年撫養比:      35.5% → 48.5%      (全球最高,加速中)
政府債務/GDP:   215.8% → 262.5%     (全球最高,超可持續邊界)
實質利率:        -2.5% (2023)        (金融抑制制度化)
名義GDP成長:     1.5%平均           (全球最低)
利息支出:        3.2% GDP (2023)    (2050年預測達8%+)

Trap Self-Reinforcing Mechanisms

老化 → 社保支出↑ → 赤字↑ → 債務↑ → 利息↑ → 赤字更↑
              ↓(無法切斷)↓
         整個迴圈傳統財政改革無法化解

Future Scenario Projections

Scenario Probability Characteristics Impact
Inflation Acceleration 70% Nominal GDP growth 4-5%, central bank allows inflation Yen depreciation 15-25%
Interest Rate Shock 20% YCC collapse, real interest rate normalization Explosive growth in debt ratio
Reform Breakthrough 10% Fundamental social security reform, immigration opening Extremely low political possibility

Asset Allocation Recommendations (Japanese Investors)

Recommended

  • 30% US equities (USD strength + positive real interest rates)
  • 20% US bonds (3-4% yield vs JGB -2.5%)
  • 15% Emerging markets (growth potential, yen-hedged)
  • 10% Gold (inflation hedge)
  • 10% Japanese real estate (Tokyo/tier-1 cities, inflation beneficiary)
  • 15% Cash/alternative assets

Should Avoid

  • ✗ Pure JGB holdings (annual real return -2.5%)
  • ✗ Regional real estate (population declining)
  • ✗ Yen accumulation (purchasing power erosion)

Generated Deliverables

The following documents are automatically generated after analysis completion:

  1. Structured JSON - Complete data and calculation process
  2. Technical Report - 49KB detailed analysis document
  3. Executive Summary - Quick grasp in 5-10 minutes
  4. Visualization Charts (5 charts)
    • 01_four_pillars_20260119.png - Four-pillar score breakdown
    • 02_time_series_20260119.png - 2010-2023 time series
    • 03_projections_20260119.png - 2024-2050 projections
    • 04_asset_allocation_20260119.png - Asset allocation recommendations
    • 05_risk_scorecard_20260119.png - Risk scorecard

Monitoring Indicators (Investment Decision Reference)

Indicator Current Value Warning Threshold Meaning
CPI Inflation 3.3% >4% sustained for 3 years Confirmation of inflation dilution
10y Yield 0.8% >1.5% Gradual YCC removal
JPY/USD 160 >180 Yen depreciation signal
BoJ Bond Holdings 52% <45% Normalization signal

</execution_examples>