SuperAPI AI Directory

analyze-jgb-insurer-superlong-flow

General & other

View repository

Updated 10-16 05:07

About this skill

Skill for analyzing Japanese insurance companies' super-long-term JGB net buying and selling flows

Use JSDA public data to verify narratives such as "insurance companies recorded a record sell-off of super-long-end government bonds," and provide a reproducible summary (including streak / record / cumulative value).

<essential_principles>

Since 2018/05, the Japan Securities Dealers Association (JSDA) has integrated investor-type transaction statistics into the "Trading Volume of OTC Bonds" dataset.

Data location:

Key Sheets:

  • (J)合計差引 - Net buying and selling amount (Sell - Purchase)

Data characteristics:

  • Frequency: monthly
  • Classification: investor type × bond type × maturity bucket
  • Unit: 100 million yen
  • Lag: about T+1 month

Note: The old version of "Trends in Bond Transactions (by investor type)" before 2018/05 is no longer updated.

JSDA uses "Sell - Purchase" as the calculation method for the difference:

net_sale = 賣出金額 - 買入金額
  • Positive value = net selling(Sell > Purchase, demand decreases)
  • Negative value = net buying(Purchase > Sell, demand increases)

This is opposite in sign to some news reports, so special attention is required.

JSDA Excel column structure (row 4):

JSDA field English Description
超長期 Interest-bearing Long-term (over 10-year) Coupon-bearing bonds over 10 years
利付長期 Interest-bearing Long-term Coupon-bearing bonds 5-10 years
利付中期 Interest-bearing Medium-term Coupon-bearing bonds 2-5 years
割引 Zero-Coupon Zero-coupon bonds
国庫短期証券等 Treasury Discount Bills Treasury bills

This Skill uses:超長期(corresponding to the commonly used "10+ years" or "super-long" scope in news)

JSDA classification English Description
生保・損保 Life & Non-Life Insurance Companies Life insurance + non-life insurance combined
都市銀行 City Banks Major commercial banks
地方銀行 Regional Banks Regional banks
信託銀行 Trust Banks Including pension management
外国人 Foreigners Overseas investors

This Skill uses:生保・損保(insurance companies combined)

record_high = max(series)  # 最大淨賣出(正值最大)
is_record_sale = (latest == record_high) AND (latest > 0)

Notes:

  • The data start point affects the determination of "historical records," and the output must state the sample period
  • If it is only a recent extreme, it must be labeled "highest in the past N months"

</essential_principles>

<quick_start>

Fastest way: run quick analysis

cd .claude/skills/analyze-jgb-insurer-superlong-flow
pip install pandas numpy openpyxl  # 首次使用
python scripts/jsda_flow_analyzer.py --quick

Output example(actual test results for 2025/12):

## 日本保險公司超長期 JGB 淨買賣驗證報告

**分析期間**:2022-04 ~ 2025-12(45 個月)

### 核心結論

| 指標 | 數值 | 說明 |
|------|------|------|
| 本月(2025-12)| **8,224 億日圓** | 淨賣出 |
| 是否創歷史紀錄 | **✓ 是** | 全樣本 (45 個月) |
| 連續淨賣出月數 | **5 個月** | 自 2025-08 起 |
| 本輪累積淨賣出 | **13,959 億日圓** | 1.40 兆日圓 |

### Headline Takeaways

1. ✓ 驗證屬實:日本保險公司在 2025/12 創下歷史最大單月淨賣出
2. 已連續 5 個月淨賣出超長期國債,累積 1.40 兆日圓
3. 當前淨賣出規模處於歷史極端區間(Z-score: 2.71)

Full analysis (including historical comparison):

python scripts/jsda_flow_analyzer.py --full --format json

Force re-download of data:

python scripts/jsda_flow_analyzer.py --quick --refresh

</quick_start>

  1. Quick check - View the latest month's net buying and selling and consecutive net selling status
  2. Full analysis - Perform a complete historical comparison and extreme value determination
  3. Verify news - Enter the numbers from the news and compare them with the original JSDA data
  4. JSON output - Output structured JSON for subsequent processing

Please select or directly execute the analysis.

<input_schema>

</input_schema>

<output_schema>

JSON output structure:

{
  "skill": "analyze_jgb_insurer_superlong_flow",
  "version": "1.0.0",
  "as_of": "2026-01-26",
  "data_source": {
    "name": "JSDA Trading Volume of OTC Bonds (公社債店頭売買高)",
    "url": "https://www.jsda.or.jp/shiryoshitsu/toukei/tentoubaibai/",
    "sheet": "(J)合計差引"
  },
  "parameters": {
    "investor_group": "life_and_nonlife_insurance",
    "investor_label": "生保・損保 (Life & Non-Life Insurance Companies)",
    "maturity_bucket": "super_long",
    "maturity_label": "超長期 (Interest-bearing Long-term over 10-year)",
    "sign_convention": "正值=淨賣出 (Sell-Purchase), 負值=淨買入",
    "unit": "100 million yen (億円)"
  },
  "analysis_period": {
    "start": "2022-04",
    "end": "2025-12",
    "months": 45
  },
  "latest_month": {
    "date": "2025-12",
    "net_sale_100m_yen": 8224,
    "net_sale_trillion_yen": 0.8224,
    "interpretation": "淨賣出"
  },
  "record_analysis": {
    "is_record_sale": true,
    "record_sale_100m_yen": 8224,
    "record_sale_date": "2025-12",
    "record_purchase_100m_yen": -8889,
    "record_purchase_date": "2023-03",
    "lookback_period": "全樣本 (45 個月)"
  },
  "streak_analysis": {
    "consecutive_net_sale_months": 5,
    "streak_start": "2025-08",
    "cumulative_net_sale_100m_yen": 13959,
    "cumulative_net_sale_trillion_yen": 1.3959
  },
  "historical_stats": {
    "mean_100m_yen": -2025,
    "std_100m_yen": 3785,
    "latest_zscore": 2.71,
    "latest_percentile": 0.9778
  },
  "headline_takeaways": [
    "✓ 驗證屬實:日本保險公司在 2025/12 創下歷史最大單月淨賣出(8,224 億日圓)",
    "已連續 5 個月淨賣出超長期國債,累積金額 13,959 億日圓(1.40 兆日圓)",
    "當前淨賣出規模處於歷史極端區間(Z-score: 2.71,超過 2 個標準差)"
  ]
}

</output_schema>

<reference_index> Reference documents (references/)

Document Content
data-sources.md JSDA data sources and XLS download instructions
methodology.md Calculation methodology (streak, record, cumulative)
</reference_index>

<scripts_index>

Script Command Purpose
jsda_flow_analyzer.py --quick Quick check
jsda_flow_analyzer.py --full Full analysis
jsda_flow_analyzer.py --refresh Force re-download data
</scripts_index>

<success_criteria> When the Skill executes successfully:

  • Output the latest month's net sell/buy value
  • Determine whether it is a historical extreme (including an explanation of the lookback period)
  • Calculate the number of consecutive net-selling months and the cumulative amount
  • Clearly indicate the maturity bucket and investor scope
  • Provide Z-score and percentile
  • Actionable headline takeaways </success_criteria>

<directory_structure>

analyze-jgb-insurer-superlong-flow/
├── SKILL.md                           # 本文件(主入口)
├── skill.yaml                         # 前端展示元數據
├── workflows/
│   ├── quick-check.md                 # 快速檢查工作流
│   ├── full-analysis.md               # 完整分析工作流
│   └── verify-claim.md                # 驗證新聞工作流
├── references/
│   ├── data-sources.md                # 資料來源說明
│   └── methodology.md                 # 方法論與公式
├── scripts/
│   └── jsda_flow_analyzer.py          # 主分析腳本(含數據下載)
└── data/
    └── cache/                         # 自動緩存目錄(.gitignore)

</directory_structure>