mcpField
U
us-market-bubble-detector

us-market-bubble-detector

github.com/tradermontyその他3.4k3.4k 回インストール2 日前に更新
リポジトリ

us-market-bubble-detector について

米国市場のバブルリスクを評価するスキルです。ポジションやリスク管理を検討する投資家向けに、指標を閾値に基づいて採点し、上限付きの定性調整を加えてリスク段階を判定します。

主な機能

  1. 01市場構造とレバレッジデータの収集
  2. 026指標による定量スコアリング
  3. 03定性調整を最大3点に制限
  4. 045段階のリスク分類
  5. 05エクスポージャーと空売りの指針

活用シーン

  1. 01市場がバブル局面かを評価
  2. 02リスクスコアに基づく投資比率の調整
  3. 03空売り条件の充足状況を確認

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/tradermonty/claude-trading-skills --skill us-market-bubble-detector

インストール後、Claude Code で/us-market-bubble-detectorを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

CHANGELOG.md
requirements.txt
references/
bubble_framework.md
historical_cases.md
implementation_guide.md
quick_reference_en.md
quick_reference.md
scripts/
bubble_scorer.py
scripts/tests/
test_skill_contract.py

詳細

US Market Bubble Detection Skill (Revised v2.1)

Key Revisions in v2.1

Critical Changes from v2.0:

  1. ✅ Mandatory Quantitative Data Collection - Use measured values, not impressions or speculation
  2. ✅ Clear Threshold Settings - Specific numerical criteria for each indicator
  3. ✅ Two-Phase Evaluation Process - Quantitative evaluation → Qualitative adjustment (strict order)
  4. ✅ Stricter Qualitative Criteria - Max +3 points (reduced from +5), requires measurable evidence
  5. ✅ Confirmation Bias Prevention - Explicit checklist to avoid over-scoring
  6. ✅ Granular Risk Phases - Added "Elevated Risk" phase (8-9 points) for nuanced risk management

When to Use This Skill

Use this skill when:

English:

  • User asks "Is the market in a bubble?" or "Are we in a bubble?"
  • User seeks advice on profit-taking, new entry timing, or short-selling decisions
  • User reports social phenomena (non-investors entering, media frenzy, IPO flood)
  • User mentions narratives like "this time is different" or "revolutionary technology" becoming mainstream
  • User consults about risk management for existing positions

Japanese:

  • ユーザーが「今の相場はバブルか?」と尋ねる
  • 投資の利確・新規参入・空売りのタイミング判断を求める
  • 社会現象(非投資家の参入、メディア過熱、IPO氾濫)を観察し懸念を表明
  • 「今回は違う」「革命的技術」などの物語が主流化している状況を報告
  • 保有ポジションのリスク管理方法を相談

Evaluation Process (Strict Order)

Phase 1: Mandatory Quantitative Data Collection

CRITICAL: Always collect the following data before starting evaluation

1.1 Market Structure Data (Highest Priority)
□ Put/Call Ratio (CBOE Equity P/C)
  - Source: CBOE DataShop or web_search "CBOE put call ratio"
  - Collect: 5-day moving average

□ VIX (Fear Index)
  - Source: Yahoo Finance ^VIX or web_search "VIX current"
  - Collect: Current value + percentile over past 3 months

□ Volatility Indicators
  - 21-day realized volatility
  - Historical position of VIX (determine if in bottom 10th percentile)
1.2 Leverage & Positioning Data
□ FINRA Margin Debt Balance
  - Source: web_search "FINRA margin debt latest"
  - Collect: Latest month + Year-over-Year % change

□ Breadth (Market Participation)
  - % of S&P 500 stocks above 50-day MA
  - Source: web_search "S&P 500 breadth 50 day moving average"
1.3 IPO & New Issuance Data
□ IPO Count & First-Day Performance
  - Source: Renaissance Capital IPO or web_search "IPO market 2025"
  - Collect: Quarterly count + median first-day return

⚠️ CRITICAL: Do NOT proceed with evaluation without Phase 1 data collection


Phase 2: Quantitative Evaluation (Quantitative Scoring)

Score mechanically based on collected data using the following criteria:

Indicator 1: Put/Call Ratio (Market Sentiment)
Scoring Criteria:
- 2 points: P/C < 0.70 (excessive optimism, call-heavy)
- 1 point: P/C 0.70-0.85 (slightly optimistic)
- 0 points: P/C > 0.85 (healthy caution)

Rationale: P/C < 0.7 is historically characteristic of bubble periods
Indicator 2: Volatility Suppression + New Highs
Scoring Criteria:
- 2 points: VIX < 12 AND major index within 5% of 52-week high
- 1 point: VIX 12-15 AND near highs
- 0 points: VIX > 15 OR more than 10% from highs

Rationale: Extreme low volatility + highs indicates excessive complacency
Indicator 3: Leverage (Margin Debt Balance)
Scoring Criteria:
- 2 points: YoY +20% or more AND all-time high
- 1 point: YoY +10-20%
- 0 points: YoY +10% or less OR negative

Rationale: Rapid leverage increase is a bubble precursor
Indicator 4: IPO Market Overheating
Scoring Criteria:
- 2 points: Quarterly IPO count > 2x 5-year average AND median first-day return +20%+
- 1 point: Quarterly IPO count > 1.5x 5-year average
- 0 points: Normal levels

Rationale: Poor-quality IPO flood is characteristic of late-stage bubbles
Indicator 5: Breadth Anomaly (Narrow Leadership)
Scoring Criteria:
- 2 points: New high AND < 45% of stocks above 50DMA (narrow leadership)
- 1 point: 45-60% above 50DMA (somewhat narrow)
- 0 points: > 60% above 50DMA (healthy breadth)

Rationale: Rally driven by few stocks is fragile
Indicator 6: Price Acceleration
Scoring Criteria:
- 2 points: Past 3-month return exceeds 95th percentile of past 10 years
- 1 point: Past 3-month return in 85-95th percentile of past 10 years
- 0 points: Below 85th percentile

Rationale: Rapid price acceleration is unsustainable

Phase 3: Qualitative Adjustment (REVISED v2.1)

Limit: +3 points maximum (REDUCED from +5 in v2.0)

⚠️ CONFIRMATION BIAS PREVENTION CHECKLIST:

Before adding ANY qualitative points:
□ Do I have concrete, measurable data? (not impressions)
□ Would an independent observer reach the same conclusion?
□ Am I avoiding double-counting with Phase 2 scores?
□ Have I documented specific evidence with sources?
Adjustment A: Social Penetration (0-1 points, STRICT CRITERIA)
+1 point: ALL THREE criteria must be met:
  ✓ Direct user report of non-investor recommendations
  ✓ Specific examples with names/dates/conversations
  ✓ Multiple independent sources (minimum 3)

+0 points: Any criteria missing

⚠️ INVALID EXAMPLES:
- "AI narrative is prevalent" (unmeasurable)
- "I saw articles about retail investors" (not direct report)
- "Everyone is talking about stocks" (vague, unverified)

✅ VALID EXAMPLE:
"My barber asked about NVDA (Nov 1), dentist mentioned AI stocks (Nov 2),
Uber driver discussed crypto (Nov 3)"
Adjustment B: Media/Search Trends (0-1 points, REQUIRES MEASUREMENT)
+1 point: BOTH criteria must be met:
  ✓ Google Trends showing 5x+ YoY increase (measured)
  ✓ Mainstream coverage confirmed (Time covers, TV specials with dates)

+0 points: Search trends <5x OR no mainstream coverage

⚠️ CRITICAL: "Elevated narrative" without data = +0 points

HOW TO VERIFY:
1. Search "[topic] Google Trends 2025" and document numbers
2. Search "[topic] Time magazine cover" for specific dates
3. Search "[topic] CNBC special" for episode confirmation

✅ VALID EXAMPLE:
"Google Trends: 'AI stocks' at 780 (baseline 150 = 5.2x).
Time cover 'AI Revolution' (Oct 15, 2025).
CNBC 'AI Investment Special' (3 episodes Oct 2025)."

⚠️ INVALID EXAMPLE:
"AI/technology narrative seems elevated" (unmeasurable)
Adjustment C: Valuation Disconnect (0-1 points, AVOID DOUBLE-COUNTING)
+1 point: ALL criteria must be met:
  ✓ P/E >25 (if NOT already counted in Phase 2 quantitative)
  ✓ Fundamentals explicitly ignored in mainstream discourse
  ✓ "This time is different" documented in major media

+0 points: P/E <25 OR fundamentals support valuations

⚠️ SELF-CHECK QUESTIONS (if ANY is YES, score = 0):
- Is P/E already in Phase 2 quantitative scoring?
- Do companies have real earnings supporting valuations?
- Is the narrative backed by fundamental improvements?

✅ VALID EXAMPLE for +1:
"S&P P/E = 35x (vs historical 18x).
CNBC article: 'Earnings don't matter in AI era' (Oct 2025).
Bloomberg: 'Traditional metrics obsolete' (Nov 2025)."

⚠️ INVALID EXAMPLE:
"P/E 30.8 but companies have real earnings and AI has fundamental backing"
(fundamentals support = +0 points)

Phase 3 Total: Maximum +3 points


Phase 4: Final Judgment (REVISED v2.1)
Final Score = Phase 2 Total (0-12 points) + Phase 3 Adjustment (0 to +3 points)
Range: 0 to 15 points

Judgment Criteria (with Risk Budget):
- 0-4 points: Normal (Risk Budget: 100%)
- 5-7 points: Caution (Risk Budget: 70-80%)
- 8-9 points: Elevated Risk (Risk Budget: 50-70%) ⚠️ NEW in v2.1
- 10-12 points: Euphoria (Risk Budget: 40-50%)
- 13-15 points: Critical (Risk Budget: 20-30%)

Key Change in v2.1:

  • Added "Elevated Risk" phase (8-9 points) for more nuanced positioning
  • 9 points is no longer extreme defensive zone (was 40% risk budget)
  • Now allows 50-70% risk budget at 8-9 point level
  • More gradual transition from Caution to Euphoria phases

Data Sources (Required)

US Market
Japanese Market

Implementation Checklist

Verify the following when using:

□ Have you collected all Phase 1 data?
□ Did you apply each indicator's threshold mechanically?
□ Did you keep qualitative evaluation within +3 point limit?
□ Are you NOT assigning points based on news article impressions?
□ Does your final score align with other quantitative frameworks?

Important Principles (Revised)

1. データ > 印象

定量データを伴わない「多くのニュース報道」や「専門家は慎重です」といった話は無視してください。

2. 厳格な順序:定量的評価 → 定性的評価

必ず次の順序で評価してください:フェーズ 1(データ収集)→ フェーズ 2(定量的評価)→ フェーズ 3(定性的調整)。

3. 主観的指標の上限

定性的調整の合計上限は +3 点です。定量的評価を覆すことはできません。

4. 「タクシー運転手」は象徴的なもの

投資家以外からの直接的な推奨がない限り、大衆への浸透を安易に認めないでください。


よくある失敗と解決策(改訂版)

失敗 1:ニュース記事に基づく評価

❌ 「高市トレードに関する報道が多い」→ メディアの過熱度 2 点 ✅ Google Trends の数値を確認 → 測定値に基づいて評価

失敗 2:専門家のコメントへの過剰反応

❌ 「過熱への警告」→ 熱狂ゾーン ✅ Put/Call、VIX、信用取引残高の測定値に基づいて判断

失敗 3:株価上昇への感情的な反応

❌ 1 日で 4.5%上昇 → 株価加速 2 点 ✅ 10 年間の分布における位置を確認 → 客観的に評価

失敗 4:バリュエーションだけに基づく判断

❌ P/E 17 → バリュエーション乖離 2 点 ✅ P/E、ナラティブへの依存度、その他の定量指標を総合的に判断


バブル段階別の推奨アクション(改訂版 v2.1)

通常(0-4 点)

リスク予算:100%

  • 通常の投資戦略を継続
  • ATR 2.0×のトレーリングストップを設定
  • 段階的な利益確定ルールを適用(+20%で 25%を利益確定)

空売り:不可

  • 複合条件を満たしていません(0/7 項目)
注意(5-7 点)

リスク予算:70-80%

  • 一部利益確定を開始(20-30%削減)
  • ATR を 1.8×に引き締め
  • 新規ポジションのサイズを 50%削減

空売り:推奨しません

  • より明確な反転シグナルを待つ
リスク上昇(8-9 点)⚠️ v2.1 で新設

リスク予算:50-70%

  • 利益確定を増やす(30-50%削減)
  • ATR を 1.6×に引き締め
  • 新規ポジション:厳選し、質の高いものに限定
  • 将来の機会に備え、現金準備を開始

空売り:慎重に検討

  • 複合条件を少なくとも 2/7 項目確認した後に限る
  • 小規模な試験的ポジション(通常のサイズの 10-15%)
  • 厳格な損切り(ATR 2.0×)

新設フェーズの根拠: このゾーンは、極端に守勢に転じることなく、警戒を強める段階です。 市場には警戒すべき兆候が見られますが、差し迫った崩壊の兆候はありません。 柔軟性を高めるための準備を進めながら、質の高いポジションへのエクスポージャーを維持してください。

熱狂(10-12 点)

リスク予算:40-50%

  • 段階的な利益確定を加速(50-60%削減)
  • ATR を 1.5×に引き締め
  • 大幅な調整局面を除き、新規のロングポジションは取らない

空売り:積極的に検討

  • 複合条件を少なくとも 3/7 項目確認した後
  • 小規模なポジション(通常のサイズの 20-25%)
  • リスクを限定できる手段のみ(オプション、タイトなストップ)
危機(13-15 点)

リスク予算:20-30%

  • 大幅な利益確定、または全面的なヘッジの実施
  • ATR 1.2×、または固定の損切り
  • 現金保全モードに切り替え、大きな市場変動に備える

空売り:推奨

  • 複合条件を少なくとも 5/7 項目確認した後
  • 小規模なポジションで段階的に参入し、確認後に積み増す
  • タイトな損切り(ATR 1.5×以上)
  • リスクを限定するため、プットオプションを検討

空売りの複合条件(7 項目)

以下のうち少なくとも 3 項目を確認した後にのみ、空売りを検討してください。

1. Weekly chart shows lower highs
2. Volume peaks out
3. Leverage indicators drop sharply (margin debt decline)
4. Media/search trends peak out
5. Weak stocks start to break down first
6. VIX surges (spike above 20)
7. Fed/policy shift signals

出力形式

評価レポートの構成(v2.1)
# [Market Name] Bubble Evaluation Report (Revised v2.1)

## Overall Assessment
- Final Score: X/15 points (v2.1: max reduced from 16)
- Phase: [Normal/Caution/Elevated Risk/Euphoria/Critical]
- Risk Level: [Low/Medium/Medium-High/High/Extremely High]
- Evaluation Date: YYYY-MM-DD

## Quantitative Evaluation (Phase 2)

| Indicator | Measured Value | Score | Rationale |
|-----------|----------------|-------|-----------|
| Put/Call | [value] | [0-2] | [reason] |
| VIX + Highs | [value] | [0-2] | [reason] |
| Margin YoY | [value] | [0-2] | [reason] |
| IPO Heat | [value] | [0-2] | [reason] |
| Breadth | [value] | [0-2] | [reason] |
| Price Accel | [value] | [0-2] | [reason] |

**Phase 2 Total: X/12 points**

## Qualitative Adjustment (Phase 3) - STRICT CRITERIA

**⚠️ Confirmation Bias Check:**
- [ ] All qualitative points have measurable evidence
- [ ] No double-counting with Phase 2
- [ ] Independent observer would agree

### A. Social Penetration (0-1 points)
- Evidence: [REQUIRED: Direct user reports with dates/names]
- Score: [+0 or +1]
- Justification: [Must meet ALL three criteria]

### B. Media/Search Trends (0-1 points)
- Google Trends Data: [REQUIRED: Measured numbers, YoY multiplier]
- Mainstream Coverage: [REQUIRED: Specific Time covers, TV specials with dates]
- Score: [+0 or +1]
- Justification: [Must have 5x+ search AND mainstream confirmation]

### C. Valuation Disconnect (0-1 points)
- P/E Ratio: [Current value]
- Fundamental Backing: [Yes/No - if Yes, score = 0]
- Narrative Analysis: [REQUIRED: Specific media quotes ignoring fundamentals]
- Score: [+0 or +1]
- Justification: [Must show fundamentals actively ignored]

**Phase 3 Total: +X/3 points (max reduced from +5 in v2.0)**

## Recommended Actions

**Risk Budget: X%** (Phase: [Normal/Caution/Elevated Risk/Euphoria/Critical])
- [Specific action 1]
- [Specific action 2]
- [Specific action 3]

**Short-Selling: [Not Allowed/Consider Cautiously/Active/Recommended]**
- Composite conditions: X/7 met
- Minimum required: [0/2/3/5] for current phase

## Key Changes in v2.1
- Stricter qualitative criteria (max +3, down from +5)
- Added "Elevated Risk" phase for 8-9 points
- Confirmation bias prevention checklist
- All qualitative points require measurable evidence

参考資料

references/implementation_guide.md(英語)- 初回の利用に推奨
  • データ収集を必須とする、段階的な評価プロセス
  • NG 例と OK 例
  • 自己点検の品質基準(4 段階)
  • レビュー時の危険信号
  • 客観的な評価のベストプラクティス
references/bubble_framework.md(日本語)
  • 詳細な理論的枠組み
  • ミンスキー/キンドルバーガー・モデルの解説
  • 行動心理学の要素
references/historical_cases.md (日本語)
  • 過去のバブル事例の分析
  • ドットコム、暗号資産、パンデミックバブル
  • 共通パターンの抽出
references/quick_reference.md (日本語)
references/quick_reference_en.md (英語)
  • 日次チェックリスト
  • 緊急時の3つの質問による評価
  • クイックスコアリングガイド
  • 主要なデータソース
リファレンスを読み込むタイミング
  • 初回利用時、または詳細なガイダンスが必要な場合: implementation_guide.md を読み込む
  • 理論的な背景が必要な場合: bubble_framework.md を読み込む
  • 歴史的な文脈が必要な場合: historical_cases.md を読み込む
  • 日次運用: quick_reference.md (日本語) または quick_reference_en.md (英語) を読み込む

まとめ: v2.1 改訂の本質

v2.0 の問題点 (2025年11月に特定):

  • 定性的調整が緩すぎる (最大 +5)
  • 「AI ナラティブが高まっている」→ +1 点 (データなし)
  • 「P/E 30.8」→ +1 点 (定量評価との二重計上)
  • 結果: 11/16 点 - 根拠なく過度に弱気

v2.1 の解決策:

  • 定性的調整をより厳格化 (最大 +3)
  • 「AI ナラティブが高まっている」→ 0 点 (未測定)
  • 「P/E 30.8 だが AI にファンダメンタルズの裏付けがある」→ 0 点 (ファンダメンタルズが支持)
  • 結果: 9/15 点 - バランスの取れた、データ駆動型の評価

主な改善点:

  1. 確証バイアスの防止: 定性的な点数を加算する前の明示的なチェックリスト
  2. 測定可能な証拠の要求: 具体的なデータ (Google トレンド、メディア報道) がなければ点数なし
  3. 二重計上の防止: バリュエーションはフェーズ2の定量評価を重複させてはならない
  4. きめ細かなリスクフェーズ: より nuanced な位置づけのための「リスク上昇」(8〜9 点) を追加
  5. バランスの取れたリスクバジェット: 9 点 = 50〜70% (40% の極端な防御的姿勢ではない)

中核原則:

「神は我々を信じる。それ以外の者は全員データを持ってこなければならない。」 - W. Edwards Deming

2025 年の教訓: データ駆動型のフレームワークでさえ、主観的な定性的調整によって損なわれる可能性があります。 v2.1 では、すべての定性的点数について測定可能な証拠を要求します。 独立した観察者が各調整を検証できなければなりません。


バージョン履歴:

  • v2.0 (2025年10月27日): 定量的データ収集の義務化
  • v2.1 (2025年11月3日): 定性的基準の厳格化、確証バイアスの防止、きめ細かなリスクフェーズ

v2.1 改訂の理由: 測定されていない「ナラティブ」評価や二重計上による過剰なスコアリングを防ぐため。 すべてのバブルリスク評価が独立して検証可能であり、確証バイアスから free であることを確保するため。

コメント