Claude Trading Skills 泡沫探测器速查手册:用 Bubble-O-Meter v2.1 构建 5 分钟可执行的择时纪律
Claude Trading Skills 泡沫探测器速查手册:用 Bubble-O-Meter v2.1 构建 5 分钟可执行的择时纪律
本篇技术指南以 quick_reference.md 为主体骨架,系统拆解 claude-trading-skills 项目中 us-market-bubble-detector 技能的日常操作层:如何在开盘前 5 分钟完成一次结构化泡沫风险评估、如何把 0-15 分映射为风险预算与 ATR 止损倍数、以及如何用仓库内置的 bubble_scorer.py 把手工打分变成可校验、可复现的命令行输出。读完后你将掌握一套完整链路:从 6 项定量指标的机械打分、3 项定性调整的证据门槛,到止盈模板、做空复合条件与应急响应流程的具体落地方式。
一、这份速查表在整个技能中的位置
us-market-bubble-detector 采用 Minsky/Kindleberger 框架的 v2.1 修订版,其知识体系被拆成多层文档,速查表处于最贴近日常操作的一层:
| 文档 | 定位 | 使用时机 |
|---|---|---|
| SKILL.md | 主契约:四阶段评估流程、输出报告模板 | 首次使用、需要完整评估 |
| implementation_guide.md | 逐步实现指南、NG/OK 对照、四级质量评级 | 首次使用(官方推荐优先阅读) |
| bubble_framework.md | 理论框架(日文):Minsky 五阶段、行为心理学 | 需要理论背景时 |
| historical_cases.md | 历史案例(日文):互联网泡沫、加密、疫情泡沫 | 需要历史坐标时 |
| quick_reference.md | 日常速查:5 分钟清单、行动矩阵、止盈模板 | 每日操作 |
主文档明确给出了加载策略:日常运营加载 quick_reference.md(日文版)或 quick_reference_en.md(英文版),其他参考文件按需加载。从源码结构看,这两个速查文件被刻意保持同步——测试 test_skill_contract.py 对两者同时断言了 v2.1 计分模型的关键数字(6 quantitative indicators、3 qualitative adjustments、13-15),并显式禁止旧版本残留(Score 8 indicators、13-16、5-8、9-12 均不得出现)。这意味着速查表不是随手写的备忘,而是受回归测试保护的契约文件。
二、5 分钟晨间例行清单
速查表开篇即给出"开盘前完成"的三步流程,这是整份文档的使用节奏基线:
□ Step 1: Update Bubble-O-Meter (2 minutes)
- Score 6 quantitative indicators (0-2) + 3 qualitative adjustments (0-1)
- Confirm risk budget based on the 0-15 total score
□ Step 2: Position Management (2 minutes)
- Update ATR trailing stops
- Check if stair-step profit-taking targets reached
- Determine new entry eligibility
□ Step 3: Signal Confirmation (1 minute)
- Media/social media trends (Google Trends, Twitter)
- Major indices' distance from 52-week highs
- VIX & Put/Call ratio
三步的时间分配体现了 v2.1 的核心设计哲学:打分只占 2 分钟,因为它是机械查表而非主观判断;仓位管理占 2 分钟,因为风险预算与 ATR 倍数才是真正产生交易动作的环节;信号确认占 1 分钟,仅用于交叉验证。
一个容易误读的细节:Step 3 的"媒体/社交趋势"与 Step 1 的定性调整 B 项共用同一数据,但用途不同——Step 1 决定是否计分(要求 5 倍以上同比 + 主流媒体确认),Step 3 只是每日的态势感知。把观察到的现象直接换算成分数,正是 v2.1 要治理的问题。
三、紧急评估 3 问:只作预警,不作结论
速查表提供了一组"3 问"快速筛查,用于判断是否需要启动完整评估:
Q1: "Are non-investors recommending it?"
- YES → Record specific, independent recommendations for verification
- NO → No social-penetration concern identified by this question
Q2: "Has the narrative become 'common sense'?"
- YES → Record examples of consensus and treatment of dissent for verification
- NO → No consensus concern identified by this question
Q3: "Is 'this time is different' the catchphrase?"
- YES → Record specific media examples for verification
- NO → No narrative concern identified by this question
All 3 YES → Strong warning signal: run the full quantitative evaluation before acting.
这里最关键的约束藏在后续段落中,必须完整理解:
YES/NO answers alone establish neither a phase nor an action, including when all answers are NO. Complete Phase 1 data collection and Phase 2 quantitative scoring, then apply Phase 3 evidence-based adjustments under the strict criteria in SKILL.md. Use the final score for the phase and action matrix below; Critical requires a final score of 13-15. If required data are missing, leave the assessment incomplete and request the missing inputs instead of assigning a phase or action.
也就是说:
- 3 问全 YES 不等于进入 Critical,它只是"强烈预警信号",要求你去做完整量化评估;
- 3 问全 NO 也不等于安全,不能据此得出"仍处早期"或"健康状态"的结论;
- 数据缺失时正确做法是"评估未完成",而不是就近归入某个阶段。
这条约束同样被测试锁定。test_skill_contract.py 专门抽取速查表的紧急评估段落,断言其中必须包含 Phase 1 data collection、Phase 2 quantitative scoring、Phase 3 evidence-based adjustments、Critical requires a final score of 13-15、leave the assessment incomplete,并且禁止出现 Critical zone、Euphoria stage、Still early、healthy state 这类"抄近路"结论词。同一测试还要求全文不得出现旧版口号 When taxi drivers talk stocks, exit——正确表述已改为 When taxi drivers talk stocks, run the full quantitative assessment(见黄金法则第 2 条)。
这是一个值得注意的版本治理细节:"出租车司机谈论股票就清仓"这种朗朗上口的经验法则被认为是有害的,因为社会渗透只是需要验证的线索,不是卖出指令。
四、行动矩阵:从分数到风险预算
v2.1 的行动矩阵是整个速查表最核心的可执行表格(原文标注 REVISED v2.1):
| Phase | Score | Risk Budget | Entry | Profit-Taking | Stop | Shorts |
|---|---|---|---|---|---|---|
| Normal | 0-4 | 100% | Normal | At target | 2.0 ATR | No |
| Caution | 5-7 | 70-80% | 50% reduced | 25% at +20% | 1.8 ATR | No |
| Elevated Risk | 8-9 | 50-70% | Selective | 40% at +20% | 1.6 ATR | Consider |
| Euphoria | 10-12 | 40-50% | Stop | 50% at +20% | 1.5 ATR | After conditions |
| Critical | 13-15 | 20-30% | Stop | 75-100% immediate | 1.2 ATR | Recommended |
Note: Maximum score reduced from 16 to 15 points (Phase 2: max 12, Phase 3: max 3)
矩阵中每一列都对应一个独立决策变量:
- Risk Budget:可用于风险敞口的总预算占比,是仓位上限的乘数;
- Entry:新开仓许可。
Normal正常;50% reduced仓位减半;Selective仅高质量标的;Stop停止开新多头; - Profit-Taking:止盈强度。从"到达目标价才动"到
75-100% immediate; - Stop:ATR 追踪止损倍数,风险越高越紧(2.0 → 1.2);
- Shorts:做空许可级别,从
No到Recommended,且需叠加 7 条复合条件(见第八节)。
8-9 分为什么单列一个阶段
这是 v2.1 相对 v2.0 最重要的结构性变化。在 v2.0 中 9 分被划入 Euphoria,对应 40% 风险预算,属于极端防御;v2.1 新增 Elevated Risk(8-9 分)并给出 50-70% 风险预算。主文档对此的解释是:该区间代表"警戒升级但尚未极端防御",市场出现警示信号但并非迫在眉睫的崩盘,应"在保持优质持仓的同时构建灵活性"。
这个改动对实操的影响是显著的:同样 9 分,v2.0 要求把风险预算压到 40%,v2.1 允许 50-70%,避免了在数据只显示"偏热"时被迫清仓。变更记录 CHANGELOG.md 用一张对照表完整保留了这次调整的轨迹。
五、6 项定量指标:机械查表打分
速查表把定量部分压缩成 6 段阈值代码块,每项 0-2 分,满分 12。以下完整继承并补充源码中的字段名映射(字段名来自 bubble_scorer.py)。
1. Put/Call Ratio → put_call_ratio
0 points: P/C > 0.85
1 point: P/C 0.70-0.85
2 points: P/C < 0.70
依据:P/C 低于 0.70 代表看涨期权过度拥挤,历史上是泡沫期特征。主文档要求采集 5 日移动平均(CBOE Equity P/C),而不是单日值——单日 P/C 受到期日与事件驱动影响很大。
2. Volatility Suppression + New Highs → volatility_suppression
0 points: VIX > 15 or index more than 10% from highs
1 point: VIX 12-15 and index near highs
2 points: VIX < 12 and major index within 5% of 52-week high
依据:极端低波 + 指数贴近新高 = 过度自满。这是唯一一个双条件指标,两项必须同时满足才能得分:VIX 低但指数离高点很远(如急跌后的低波反弹)不计 2 分。
3. Leverage → leverage
0 points: Margin debt YoY <= +10% or negative
1 point: Margin debt YoY +10-20%
2 points: Margin debt YoY +20% or more and all-time high
依据:杠杆快速上升是泡沫前兆。2 分同样要求双条件——同比 +20% 以上 且 创历史新高。数据源为 FINRA 月度保证金融资余额,注意其发布有滞后,主文档要求采集"最新月份 + 同比变化"。
4. IPO Market Overheating → ipo_heat
0 points: Normal levels
1 point: Quarterly IPO count >1.5x five-year average
2 points: Quarterly IPO count >2x five-year average and median first-day return +20%+
依据:低质量 IPO 洪流是泡沫晚期特征。注意 2 分条件需要"季度数量 > 5 年均值 2 倍"与"首日中位涨幅 +20% 以上"同时成立;只有数量放大而首日表现平淡时封顶 1 分。
5. Breadth Anomaly → breadth_anomaly
0 points: >60% of S&P 500 stocks above 50DMA
1 point: 45-60% above 50DMA
2 points: New high and <45% above 50DMA
依据:少数股票驱动的行情更脆弱。这是最容易误判的一项:2 分要求"指数创新高"与"仅不到 45% 成分股在 50 日均线之上"并存——即典型的窄幅领涨。如果指数未创新高且宽度很窄(同步下跌),按阈值表应落在 1 分或 0 分区间,需严格按表述判断。
6. Price Acceleration → price_acceleration
0 points: Past 3-month return below 85th percentile
1 point: Past 3-month return in 85-95th percentile
2 points: Past 3-month return above 95th percentile
依据:价格加速不可持续。主文档补充了关键口径:百分位是相对过去 10 年的三月期收益率分布计算的。这一项必须计算,不能凭"涨得太快"的直觉;实现指南给出了反例:单日 4.5% 涨幅若处于过去 10 年的第 80 百分位,则应得 0 分。
六、3 项定性调整:+3 上限与证据门槛
定性调整每项 0-1 分,合计上限 +3。v2.0 的上限是 +5,v2.1 收紧到 +3,并且引入了硬性的证据要求。
A. Social Penetration → social_penetration
0 points: Any required evidence missing
1 point: Direct user report + specific examples + at least 3 independent sources
三个条件必须同时满足:用户直接报告的"非投资者推荐"、带姓名/日期的具体例子、至少 3 个独立来源。主文档给出了正反例:
- ❌ 无效:
"AI narrative is prevalent"(不可测量)、"I saw articles about retail investors"(非直接报告)、"Everyone is talking about stocks"(模糊未验证) - ✅ 有效:
"My barber asked about NVDA (Nov 1), dentist mentioned AI stocks (Nov 2), Uber driver discussed crypto (Nov 3)"
B. Media/Search Trends → media_search_trends
0 points: Search trends <5x or no mainstream coverage confirmation
1 point: Google Trends 5x+ YoY and mainstream coverage confirmed
必须同时具备:Google Trends 同比 5 倍以上(实测数字)+ 主流媒体覆盖确认(带日期的杂志封面、电视专题)。主文档强调:"Elevated narrative" without data = +0 points。
- ✅ 有效:
"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)."
验证路径也写得很具体:搜索 [topic] Google Trends 2025 记录数字、搜索 [topic] Time magazine cover 找日期、搜索 [topic] CNBC special 找节目确认。
C. Valuation Disconnect → valuation_disconnect
0 points: P/E <25 or fundamentals support valuation
1 point: P/E >25, fundamentals ignored, and "this time is different" documented
这一项的重点不是"估值高",而是"估值高且基本面被公开话语主动忽略",同时禁止与 Phase 2 重复计分。自检问题非常实用:如果 P/E 已在定量部分体现,或企业确有盈利支撑,或叙事背后有基本面改善,则必须计 0 分。
- ✅ 有效:
"S&P P/E = 35x (vs historical 18x). CNBC article: 'Earnings don't matter in AI era' (Oct 2025)." - ❌ 无效:
"P/E 30.8 but companies have real earnings and AI has fundamental backing"(基本面有支撑 → 0 分)
确认偏误防线
加任何定性分之前,主文档要求过一道四问清单:是否有具体可测数据?独立观察者是否会得出同样结论?是否与 Phase 2 重复计分?是否记录了来源明确的证据?这道清单不是修辞——变更日志记录了一次真实翻车:某次分析定量 9 分,却因"AI 叙事升温"(无数据)与"P/E 30.8"(重复计分)各加 1 分,得到 11/16 分并进入"极端防御"的 40% 风险预算;按 v2.1 复盘应为 9/15 分、50-70% 预算。这也是"评分从 16 分制改为 15 分制"的直接动因。
七、关键数据源与 API 自动取数
可即时查验的指标源
| Indicator | Source | Example URL |
|---|---|---|
| Google Search Trends | Google Trends | trends.google.com |
| VIX (Fear Index) | CBOE | cboe.com/vix |
| Put/Call Ratio | CBOE | cboe.com/data |
| Margin Balance | FINRA | finra.org/data |
| Futures Positions | CFTC COT | cftc.gov/reports |
| IPO Statistics | Renaissance IPO | renaissancecapital.com |
API 自动取数示例
速查表给出的两段可直接运行的采集代码:
# Example: Google Trends (pytrends)
from pytrends.request import TrendReq
pytrends = TrendReq()
pytrends.build_payload(['SPY', 'stock market'])
data = pytrends.interest_over_time()
# Example: VIX (yfinance)
import yfinance as yf
vix = yf.Ticker('^VIX')
current_vix = vix.history(period='1d')['Close'].iloc[-1]
需要区分两个层次的依赖:这两段示例属于外部采集工具,需要自行安装 pytrends / yfinance;而技能自带的评分脚本 bubble_scorer.py 是纯标准库实现,requirements.txt 只有一行注释 # stdlib-only: packaged scripts use the Python standard library only.,主文档也明确 API keys: None required、Python 3.9+。
换言之:技能不替你抓数据,但严格校验你的打分。 这种职责切分是有意的——数据采集需要联网与人工核验(例如"FINRA 最新月度余额"必须现场搜索),而打分环节必须可机械复现。
数据整理与时效要求
实现指南要求把采集结果整理成含"来源 + 采集日期"的表格,并给出核验点:所有指标必须有具体数值、来源可靠、数据在 1 周内。反面写法 "VIX is at low levels" 明确判为不合格,"VIX is 15.3" 才算合格。
八、止盈策略模板:从阶梯减仓到 ATR 追踪
速查表提供三套模板,从保守到激进。
模板 1:阶梯式止盈(保守)
Position: $10,000 initial investment
Targets: +20%, +40%, +60%, +80%
+20% ($12,000) → Sell 25% = $3,000 secured
+40% ($14,000) → Sell 25% = $3,500 secured
+60% ($16,000) → Sell 25% = $4,000 secured
+80% ($18,000) → Sell 25% = $4,500 secured
Total profits: $15,000 (+50% equivalent)
需要精读这组数字:初始本金 $10,000,四档各卖出 25% 仓位。由于每档卖出时市值已抬升,回收现金依次为 $3,000 / $3,500 / $4,000 / $4,500,合计 $15,000,相当于初始本金的 150%(原文标注 +50% equivalent,即相对本金多回收 50%)。这个模板的价值在于把"卖出"拆成四笔预设限价单,把择时交给规则而非情绪。
模板 2:ATR 追踪止损(激进)
def calculate_trailing_stop(current_price, atr_20d, bubble_phase):
"""
Calculate trailing stop based on bubble stage
bubble_phase: 'normal', 'caution', 'elevated_risk', 'euphoria', 'critical'
"""
multipliers = {
'normal': 2.0,
'caution': 1.8,
'elevated_risk': 1.6,
'euphoria': 1.5,
'critical': 1.2
}
multiplier = multipliers.get(bubble_phase, 2.0)
stop_price = current_price - (atr_20d * multiplier)
return stop_price
# Usage example
current_price = 450.0
atr_20d = 10.0 # Average True Range over 20 days
bubble_phase = 'euphoria'
stop = calculate_trailing_stop(current_price, atr_20d, bubble_phase)
print(f"Trailing Stop: ${stop:.2f}")
# Output: Trailing Stop: $435.00
函数中的倍数表与行动矩阵的 Stop 列完全一致(2.0 / 1.8 / 1.6 / 1.5 / 1.2),示例输出可验算:450 − 10 × 1.5 = 435.00。multipliers.get(..., 2.0) 的默认值保证传入未知阶段时退化为最宽松设置,避免因拼写错误意外收紧止损。
阶段标识符采用下划线风格(elevated_risk),与 bubble_scorer.py 内部返回的 "Elevated Risk"(带空格)不同。如果需要串联使用,需自行做一次映射,例如 result["phase"].lower().replace(" ", "_")。
模板 3:混合式(推荐)
Stage 1 (Boom period):
→ Reduce 50% of position via stair-step profit-taking
Stage 2 (Euphoria period):
→ Apply ATR trailing to remaining 50%, follow upside
Stage 3 (Panic signs):
→ Exit immediately when ATR stop hit
混合式的逻辑是解决"卖早了"与"卖晚了"的两难:先用阶梯法锁定一半利润(消除后悔成本),剩下的一半用 ATR 追踪让利润奔跑,直到止损被打掉。这与行动矩阵中 Euphoria 阶段"50% at +20%"的止盈强度是自洽的。
九、做空时机:7 条复合条件
速查表对做空的态度分成明确的红与绿两区。
❌ 绝对不要做:早期逆势
Reason: Normal for prices to rise 2-3x more after feeling "too high"
Risk: "Markets can remain irrational longer than you can remain solvent"
✅ 推荐做法:复合条件明确之后
至少满足 3 条才考虑启动:
- □ Weekly chart shows clear lower highs
- □ Volume peaks out (3 consecutive weeks declining)
- □ Sharp drop in leverage indicators (margin balance -20%+)
- □ Media/search trends peak out
- □ Weak stocks within sector start breaking down first
- □ VIX surges (+30%+)
- □ Fed/policy shift signals
执行示例(原文的逐条勾选):
Condition Check:
[✓] 1. Weekly lower highs forming
[✓] 2. Volume declining 3 weeks straight
[×] 3. Margin balance still elevated
[✓] 4. Google search trends -40%
[×] 5. Still broad rally continuing
[✓] 6. VIX +35% surge
[×] 7. No policy changes
→ 4/7 met, shorts consideration OK
→ Small position (25% of normal) for test entry
注意"4/7 达标"对应的动作是"小仓位试单(正常规模的 25%)",而非重仓。主文档进一步按阶段设定了最低门槛与仓位上限,可以与本节的 3 条通用底线一起读:
| Phase | 最低条件数 | 仓位建议 | 止损 |
|---|---|---|---|
| Normal | 0/7(不允许) | — | — |
| Caution | — | 不建议 | — |
| Elevated Risk | 2/7 | 正常规模 10-15% | ATR 2.0× |
| Euphoria | 3/7 | 正常规模 20-25% | 定义风险(期权/紧止损) |
| Critical | 5/7 | 小仓分批、确认后金字塔加仓 | ATR 1.5× 或更紧 |
一处需要留意的口径差异:速查表写"至少 3 条可以开始考虑",而主文档对 Critical 阶段要求 5/7。二者是叠加关系——阶段越高门槛越高,速查表的 3 条是全局下限。
十、四类常见失败模式与机械解法
速查表把心理问题直接对应到可执行规则,这是它最实用的部分之一:
Failure 1: "Too late" paralysis, missing opportunities
心理:后悔厌恶(怕买在最后一棒) 解法:
- 感到"太晚了"的时候,恰恰去做一次 Bubble-O-Meter
- Score <=7:可以小仓位进场
- Score 8-9:只做极优设置并降低仓位
- Score >=10:不进场才是正确决策
Failure 2: Re-entry after profit-taking (buying high)
心理:后见之明偏误("我就知道还能涨") 解法:
- 止盈后 72 小时禁止回补
- 回补决策必须先跑 Bubble-O-Meter
Failure 3: Can't take profits due to "still rising"
心理:贪婪 + 过度自信 解法:
- 把阶梯止盈自动化(预设限价单)
- 追求"满意",放弃"完美"
Failure 4: Too-early shorts
心理:主观的"明显太高了" 解法:
- 机械化核验复合条件
- 至少等 3 条条件成立
四条解法的共同结构是把决策从"感觉"迁移到"查表"。第 1 条的分数分档(≤7 / 8-9 / ≥10)与行动矩阵的 Entry 列互相印证:8-9 分对应 Selective,≥10 分对应 Stop。
十一、应急响应流程
速查表用一张决策树把盘中突发状况压缩成四层判断:
Detect market volatility
↓
Q: Have positions?
↓YES
Q: Down -5% or more?
↓YES
Q: ATR stop reached?
↓YES
→ Sell immediately (no debate)
↓NO (Stop not reached)
Q: Bubble-O-Meter score 13+?
↓YES
→ Consider 75%+ profit-taking
↓NO (Score ≤12)
Q: VIX surge +30%+?
↓YES
→ 50% profit-taking, tighten remaining stops
↓NO
→ Business as usual, continue calm observation
三个值得注意的设计点:
- 止损触发是唯一"不需要讨论"的动作(
Sell immediately (no debate))——这是整份文档中唯一取消辩论的指令,因为 ATR 止损是事前约定的机械规则。 - 13 分是硬门槛,与主文档"Critical requires a final score of 13-15"严格对齐;测试也锁定了这一表述。
- VIX 单日 +30% 不足以直接清仓,只触发 50% 止盈 + 收紧剩余止损,避免被单日恐慌洗出。
十二、墙上贴的 10 条黄金法则
- See process, not price —— 看过程,不看价格
- When taxi drivers talk stocks, run the full quantitative assessment —— 出租车司机谈股票时,跑完整量化评估(注意:不是"清仓")
- "This time is different" is always the same —— "这次不一样"永远都一样
- Mechanical rules protect psychology —— 机械规则保护心理
- Short after confirmation, take profits early —— 确认后再做空,止盈要早
- When skepticism hurts, the end begins —— 当质疑开始让人痛苦时,终局开始
- Aim for satisfaction, abandon perfection —— 追求满意,放弃完美
- Bubbles last longer than expected, collapses are faster —— 泡沫比预期更持久,崩塌比预期更快
- Leverage is an express ticket to ruin —— 杠杆是通往毁灭的快车票
- "Markets can remain irrational longer than you can remain solvent" —— 市场保持非理性的时间,可能长于你保持偿付能力的时间
第 2 条是 v2.1 修订的重点对象,第 4 条则解释了为什么整份速查表要写成"清单 + 阈值 + 矩阵"的形式:规则的存在意义是替代临场心理判断。
十三、用 CLI 把速查表变成可复现输出
速查表的阈值最终由 bubble_scorer.py 落地。它支持两种输入方式。
方式一:交互式逐项录入
python3 skills/us-market-bubble-detector/scripts/bubble_scorer.py --manual
脚本会先打印 get_scoring_guidelines() 生成的九项打分口径,然后按 BubbleScorer.indicators 顺序逐项提示(6 项 0-2 + 3 项 0-1)。输入非法时会重试并提示 Enter a numeric value 或 Enter a value between 0 and 2(该行为在 test_skill_contract.py 中被断言)。
方式二:用 JSON 一次性提交分数
扁平结构(九个键平铺):
python3 skills/us-market-bubble-detector/scripts/bubble_scorer.py --scores \
'{"put_call_ratio":2,"volatility_suppression":2,"leverage":2,
"ipo_heat":1,"breadth_anomaly":2,"price_acceleration":2,
"social_penetration":1,"media_search_trends":0,"valuation_disconnect":1}' \
--output text
实测输出(已在本仓库运行验证):
============================================================
US Market Bubble Risk - Bubble-O-Meter v2.1
============================================================
Evaluated at: 2026-11-15T12:42:22.326778
Quantitative: 11/12
Qualitative adjustment: +2/3
Final score: 13/15 (86.7%)
Phase: Critical (Risk: Extreme)
Risk budget: 20-30%
Minsky phase: Peak Euphoria/Profit Taking
Recommended action: Prioritize major profit-taking, hedging, and halt new entries
Quantitative indicators:
- Put/Call Ratio: 2/2 (high)
- Volatility Suppression + New Highs: 2/2 (high)
- Leverage: 2/2 (high)
- IPO Market Overheating: 1/2 (medium)
- Breadth Anomaly: 2/2 (high)
- Price Acceleration: 2/2 (high)
Qualitative adjustments:
- Social Penetration: +1/1 (high)
- Media/Search Trends: +0/1 (low)
- Valuation Disconnect: +1/1 (high)
============================================================
嵌套结构(定量/定性分组,便于把两阶段流程显式化):
python3 skills/us-market-bubble-detector/scripts/bubble_scorer.py --scores \
'{"quantitative":{"put_call_ratio":0,"volatility_suppression":0,"leverage":0,
"ipo_heat":0,"breadth_anomaly":0,"price_acceleration":0},
"qualitative":{"social_penetration":0,"media_search_trends":0,"valuation_disconnect":0}}' \
--output json
解析逻辑在 _scores_from_json()(bubble_scorer.py):检测到顶层含 quantitative 或 qualitative 键即按嵌套解析,否则视为扁平九键映射;非对象(如 [])报 --scores must be a JSON object,嵌套值非对象报 nested scores must use object values。
JSON 输出字段说明
calculate_score() 返回的字典结构,对下游自动化最有用:
| 字段 | 含义 |
|---|---|
quantitative_score |
6 项定量合计(0-12) |
qualitative_adjustment |
3 项定性合计(0-3) |
total_score / max_score |
最终分与满分(15) |
percentage |
得分率,保留 1 位小数 |
phase |
Normal / Caution / Elevated Risk / Euphoria / Critical |
risk_level |
Low / Medium / Medium-High / High / Extreme |
risk_budget |
100% / 70-80% / 50-70% / 40-50% / 20-30% |
minsky_phase |
推断的 Minsky 阶段标签 |
recommended_action |
一行动作建议 |
numerical_scores 系列 |
quantitative_scores、qualitative_scores、indicator_scores |
detailed_* |
每项指标的名称、得分、满分、high/medium/low 状态、描述 |
分数到阶段的映射与校验
_classify_score()(bubble_scorer.py)与行动矩阵一一对应:<=4 Normal、<=7 Caution、<=9 Elevated Risk、<=12 Euphoria、其余 Critical。注意这里用累进 if 而非区间表,所以只要总分连续,就不会出现空档。
_estimate_minsky_phase()(bubble_scorer.py)进一步用子项区分同一分数带内的阶段:
<=4:Displacement/Early Boom<=7:若price_acceleration >= 1且volatility_suppression >= 1判为Boom,否则回落到Displacement/Early Boom<=9:Late Boom/Elevated Risk<=12:若price_acceleration == 2且breadth_anomaly == 2判为Euphoria,否则Late Boom/Early Euphoria>12:Peak Euphoria/Profit Taking
这意味着同一分数可能对应不同阶段标签,切勿只用总分做字符串匹配。
输入校验失败即退出
_validate_scores()(bubble_scorer.py)要求九项键一个不能少、一个不能多,且值必须是整数(显式排除 bool),并在该项 max_score 范围内。实测非法输入:
$ python3 skills/us-market-bubble-detector/scripts/bubble_scorer.py --scores \
'{"put_call_ratio":3,...}'
Error: put_call_ratio must be between 0 and 2
$ echo $?
1
缺键会报 Missing score(s): ...,多余键报 Unknown score(s): ...,传 true 或 1.5 都会报 must be an integer。不传任何参数时退出码为 1,并把打分指引输出到 stderr、stdout 保持为空——这种"失败即关闭"的设计让脚本适合放进定时任务或 CI 流水线,不会静默产出错误结论。
十四、自检与告警:什么时候该推翻自己的评分
速查表本身不包含质量分级,但与之配套的 implementation_guide.md 提供了完整的评审标准,可作为速查表的"事后校验层"。
四级评估质量
| 等级 | 判据 |
|---|---|
| Level 1 失败 | 6 项中只采集到 ≤3 项、凭印象打分、无来源记录 |
| Level 2 勉强及格 | 采集 4-5 项、混入部分印象判断、来源不完整 |
| Level 3 良好(推荐) | 6 项全覆盖、机械打分、每项都有来源与日期、定性 ≤+2 |
| Level 4 优秀 | 数据完美、与历史对标、多源交叉验证、与其他量化框架一致性检查、显式说明不确定性 |
注意 Level 3 的定性上限建议是 ≤ +2 分,比硬上限 +3 更保守。
红旗清单
观察到以下任一情况,应重做评估:
🚩 "Many reports" → No numbers
🚩 "Experts are cautious" → No quantitative data
🚩 "Obviously too high" → Subjective judgment
🚩 Score 10+ points but Put/Call > 1.0
🚩 Score 10+ points but VIX > 20
🚩 Score 10+ points but Margin YoY < +15%
🚩 No data source documentation
🚩 No collection date documentation
后三条是极有价值的内部一致性检验:如果总分宣称 10 分以上(Euphoria 起),却出现 P/C > 1.0(对应 0 分)、VIX > 20(对应 0 分)、保证金同比 < +15%(对应 0 或 1 分),说明定性部分把分数抬高了,必须回退检查是否违反"证据可测"与"禁止重复计分"。
十五、延伸阅读与使用边界
速查表末尾列出的资料可作为理论补充:
- 书籍:《Manias, Panics, and Crashes》(Charles Kindleberger)、《Irrational Exuberance》(Robert Shiller)、《The Alchemy of Finance》(George Soros)
- 研究:Hyman Minsky 的金融不稳定假说、行为金融学经典论文
- 数据与工具:TradingView(图表与指标)、FRED(经济指标时间序列)、Finviz(筛选与热力图)、Google Trends(社会趋势)
结尾的授权说明值得留意:
Last Updated: 2025 Edition License: Educational and personal use only, redistribution prohibited
这意味着速查表内容仅供学习与个人使用,不应再分发。同时按主文档的定位,本技能属于决策支持工具而非投资建议——它的作用是把"我感觉市场太热了"这类模糊判断,替换成"9/15 分、Elevated Risk、风险预算 50-70%、ATR 1.6×、做空需 2/7 条件"这样可核验、可回溯、可复盘的结论。
最后提一句实操中最容易踩的坑:不要用定性分去补定量分的不足。 v2.1 把定性上限从 +5 压到 +3,并在变更记录里用一次真实的 11/16 → 9/15 复盘说明原因——当定量数据只支持"偏热"时,任何来自叙事感觉的加分都会把风险预算错误地压向极端防御,从而在趋势延续期被迫离场。速查表的所有清单、矩阵与红旗,本质上都是在阻止这一件事。
相关文件索引
- 速查表本体:skills/us-market-bubble-detector/references/quick_reference.md
- 技能主契约:skills/us-market-bubble-detector/SKILL.md
- 实现指南:skills/us-market-bubble-detector/references/implementation_guide.md
- 理论框架:skills/us-market-bubble-detector/references/bubble_framework.md
- 历史案例:skills/us-market-bubble-detector/references/historical_cases.md
- 版本变更:skills/us-market-bubble-detector/CHANGELOG.md
- 评分脚本:skills/us-market-bubble-detector/scripts/bubble_scorer.py
- 契约测试:skills/us-market-bubble-detector/scripts/tests/test_skill_contract.py
- 依赖说明:skills/us-market-bubble-detector/requirements.txt