ftd-detector

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

FTD Detector Skill

FTD检测器工具

Purpose

用途

Detect Follow-Through Day (FTD) signals that confirm a market bottom, using William O'Neil's proven methodology. Generates a quality score (0-100) with exposure guidance for re-entering the market after corrections.
Complementary to Market Top Detector:
  • Market Top Detector = defensive (detects distribution, rotation, deterioration)
  • FTD Detector = offensive (detects rally attempts, bottom confirmation)
采用William O'Neil的成熟方法论,检测用于确认市场底部的Follow-Through Day(FTD)信号。生成0-100的质量评分,并提供回调后重新入场的股票敞口指导。
与市场顶部检测器互补:
  • 市场顶部检测器 = 防御型(检测派发、轮动、市场恶化)
  • FTD检测器 = 进攻型(检测反弹尝试、底部确认)

When to Use This Skill

适用场景

English:
  • User asks "Is the market bottoming?" or "Is it safe to buy again?"
  • User observes a market correction (3%+ decline) and wants re-entry timing
  • User asks about Follow-Through Days or rally attempts
  • User wants to assess if a recent bounce is sustainable
  • User asks about increasing equity exposure after a correction
  • Market Top Detector shows elevated risk and user wants bottom signals
Japanese:
  • 「底打ちした?」「買い戻して良い?」
  • 調整局面(3%以上の下落)からのエントリータイミング
  • フォロースルーデーやラリーアテンプトについて
  • 直近の反発が持続可能か評価したい
  • 調整後のエクスポージャー拡大の判断
  • Market Top Detectorが高リスク表示の後の底打ちシグナル確認
中文场景:
  • 用户询问“市场见底了吗?”或“现在重新买入安全吗?”
  • 用户观察到市场回调(下跌3%+),想了解重新入场时机
  • 用户询问Follow-Through Day或反弹尝试相关问题
  • 用户想评估近期的反弹是否可持续
  • 用户询问回调后是否可以增加股票敞口
  • 市场顶部检测器显示风险升高,用户想要底部信号
原日文场景翻译:
  • “市场见底了吗?”“可以重新买入了吗?”
  • 回调阶段(下跌3%以上)后的入场时机
  • 关于跟进日(FTD)和反弹尝试的问题
  • 想要评估近期反弹是否可持续
  • 回调后判断是否扩大股票敞口
  • 市场顶部检测器显示高风险后,确认底部信号

Difference from Market Top Detector

与市场顶部检测器的区别

AspectFTD DetectorMarket Top Detector
FocusBottom confirmation (offensive)Top detection (defensive)
TriggerMarket correction (3%+ decline)Market at/near highs
SignalRally attempt → FTD → Re-entryDistribution → Deterioration → Exit
Score0-100 FTD quality0-100 top probability
ActionWhen to increase exposureWhen to reduce exposure

维度FTD检测器市场顶部检测器
核心关注底部确认(进攻型)顶部检测(防御型)
触发条件市场回调(下跌3%+)市场处于或接近高位
信号流程反弹尝试 → FTD → 重新入场派发 → 恶化 → 离场
评分0-100的FTD质量分0-100的顶部概率分
操作建议何时增加敞口何时减少敞口

Execution Workflow

执行流程

Phase 1: Execute Python Script

阶段1:运行Python脚本

Run the FTD detector script:
bash
python3 skills/ftd-detector/scripts/ftd_detector.py --api-key $FMP_API_KEY
The script will:
  1. Fetch S&P 500 and QQQ historical data (60+ trading days) from FMP API
  2. Fetch current quotes for both indices
  3. Run dual-index state machine (correction → rally → FTD detection)
  4. Assess post-FTD health (distribution days, invalidation, power trend)
  5. Calculate quality score (0-100)
  6. Generate JSON and Markdown reports
API Budget: 4 calls (well within free tier of 250/day)
执行FTD检测器脚本:
bash
python3 skills/ftd-detector/scripts/ftd_detector.py --api-key $FMP_API_KEY
该脚本将:
  1. 从FMP API获取标普500和QQQ的历史数据(60+交易日)
  2. 获取两个指数的当前报价
  3. 运行双指数状态机(回调 → 反弹 → FTD检测)
  4. 评估FTD后的市场健康状况(派发日、信号失效、趋势强度)
  5. 计算质量评分(0-100)
  6. 生成JSON和Markdown报告
API预算: 4次调用(完全在免费版每日250次调用的限额内)

Phase 2: Present Results

阶段2:展示结果

Present the generated Markdown report to the user, highlighting:
  • Current market state (correction, rally attempt, FTD confirmed, etc.)
  • Quality score and signal strength
  • Recommended exposure level
  • Key watch levels (swing low, FTD day low)
  • Post-FTD health (distribution days, power trend)
向用户展示生成的Markdown报告,重点突出:
  • 当前市场状态(回调、反弹尝试、FTD已确认等)
  • 质量评分和信号强度
  • 建议的敞口水平
  • 关键观察点位(摆动低点、FTD当日低点)
  • FTD后的市场健康状况(派发日、趋势强度)

Phase 3: Contextual Guidance

阶段3:上下文指导

Based on the market state, provide additional guidance:
If FTD Confirmed (score 60+):
  • Suggest looking at leading stocks in proper bases
  • Reference CANSLIM screener for candidate stocks
  • Remind about position sizing and stops
If Rally Attempt (Day 1-3):
  • Advise patience, do not buy ahead of FTD
  • Suggest building watchlists
If No Correction:
  • FTD analysis is not applicable in uptrend
  • Redirect to Market Top Detector for defensive signals

根据市场状态提供额外指导:
若FTD已确认(评分60+):
  • 建议关注处于合适形态的领涨个股
  • 参考CANSLIM筛选器选取候选股票
  • 提醒注意仓位管理和止损设置
若处于反弹尝试阶段(第1-3天):
  • 建议保持耐心,不要在FTD确认前买入
  • 建议建立观察列表
若无回调行情:
  • FTD分析在上升趋势中不适用
  • 引导用户使用市场顶部检测器获取防御型信号

State Machine

状态机

NO_SIGNAL → CORRECTION → RALLY_ATTEMPT → FTD_WINDOW → FTD_CONFIRMED
                ↑              ↓               ↓              ↓
                └── RALLY_FAILED ←─────────────┘     FTD_INVALIDATED
StateDefinition
NO_SIGNALUptrend, no qualifying correction
CORRECTION3%+ decline with 3+ down days
RALLY_ATTEMPTDay 1-3 of rally from swing low
FTD_WINDOWDay 4-10, waiting for qualifying FTD
FTD_CONFIRMEDValid FTD signal detected
RALLY_FAILEDRally broke below swing low
FTD_INVALIDATEDClose below FTD day's low
NO_SIGNAL → CORRECTION → RALLY_ATTEMPT → FTD_WINDOW → FTD_CONFIRMED
                ↑              ↓               ↓              ↓
                └── RALLY_FAILED ←─────────────┘     FTD_INVALIDATED
状态定义
NO_SIGNAL上升趋势,无符合条件的回调
CORRECTION下跌3%+且包含3个以上下跌交易日
RALLY_ATTEMPT从摆动低点开始反弹的第1-3天
FTD_WINDOW第4-10天,等待符合条件的FTD出现
FTD_CONFIRMED检测到有效的FTD信号
RALLY_FAILED反弹跌破摆动低点
FTD_INVALIDATED收盘价低于FTD当日低点

Quality Score (0-100)

质量评分(0-100)

ScoreSignalExposure
80-100Strong FTD75-100%
60-79Moderate FTD50-75%
40-59Weak FTD25-50%
<40No FTD / Failed0-25%

评分区间信号强度建议敞口
80-100强FTD信号75-100%
60-79中等FTD信号50-75%
40-59弱FTD信号25-50%
<40无FTD/信号失效0-25%

API Requirements

API要求

Required: FMP API key (free tier sufficient: 4 calls per execution)
必填: FMP API密钥(免费版足够:每次执行仅需4次调用)

Output Files

输出文件

  • JSON:
    ftd_detector_YYYY-MM-DD_HHMMSS.json
  • Markdown:
    ftd_detector_YYYY-MM-DD_HHMMSS.md
  • JSON:
    ftd_detector_YYYY-MM-DD_HHMMSS.json
  • Markdown:
    ftd_detector_YYYY-MM-DD_HHMMSS.md

Reference Documents

参考文档

references/ftd_methodology.md

references/ftd_methodology.md

  • O'Neil's FTD rules in detail
  • Rally attempt mechanics and day counting
  • Historical FTD examples (2020 March, 2022 October)
  • 详细介绍O'Neil的FTD规则
  • 反弹尝试机制和天数计算
  • 历史FTD案例(2020年3月、2022年10月)

references/post_ftd_guide.md

references/post_ftd_guide.md

  • Post-FTD distribution day failure rates
  • Power Trend definition and conditions
  • Success vs failure pattern comparison
  • FTD后的派发日失败率
  • 趋势强度(Power Trend)的定义和条件
  • 成功与失败模式对比

When to Load References

何时加载参考文档

  • First use: Load
    ftd_methodology.md
    for full understanding
  • Post-FTD questions: Load
    post_ftd_guide.md
  • Regular execution: References not needed - script handles analysis
  • 首次使用: 加载
    ftd_methodology.md
    以全面理解
  • FTD后相关问题: 加载
    post_ftd_guide.md
  • 常规执行: 无需参考文档——脚本将自动完成分析