mcpField
F
ftd-detector

ftd-detector

github.com/tradermontyデータ・データベース3.4k3.4k 回インストール2 日前に更新
リポジトリ

ftd-detector について

ftd-detectorは、William O'NeilのFollow-Through Day手法で、調整後の相場底入れシグナルを評価するスキルです。再参入を検討する市場分析者向けに、シグナルのスコアとエクスポージャーの目安を示します。

主な機能

  1. 01調整からラリーへの状態追跡
  2. 02Follow-Through Dayシグナルの検出
  3. 030~100でのシグナル品質評価
  4. 04シグナル後の相場状況の評価
  5. 05JSONとMarkdownレポートの生成

活用シーン

  1. 01相場調整が終わりつつあるかの評価
  2. 02ラリーの試みが続くかの確認
  3. 03調整後のエクスポージャー変更の検討

インストール

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

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

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

同梱ファイル

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

requirements.txt
references/
ftd_methodology.md
post_ftd_guide.md
scripts/
fmp_client.py
ftd_detector.py
post_ftd_monitor.py
rally_tracker.py
report_generator.py
scripts/tests/
conftest.py
helpers.py
test_fmp_client.py
test_ftd_detector.py
test_post_ftd_monitor.py
test_rally_tracker.py
test_report_generator.py

詳細

FTD Detector Skill

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)

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が高リスク表示の後の底打ちシグナル確認

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

Execution Workflow

Phase 1: Execute Python Script

Run the FTD detector script:

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)

Phase 2: Present Results

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)
Phase 3: Contextual Guidance

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

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

Quality Score (0-100)

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

Prerequisites

  • FMP API Key: Required. Set FMP_API_KEY environment variable or pass via --api-key flag.
  • Python 3.9+: With requests library installed.
  • API Budget: 4 calls per execution (well within FMP free tier of 250/day).

Output Files

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

Reference Documents

skills/ftd-detector/references/ftd_methodology.md
  • O'Neil の FTD ルールの詳細
  • ラリーの試みの仕組みと日数の数え方
  • FTD の過去の事例(2020 年 3 月、2022 年 10 月)
skills/ftd-detector/references/post_ftd_guide.md
  • FTD 後のディストリビューションデーによる失敗率
  • パワートレンドの定義と条件
  • 成功パターンと失敗パターンの比較
リファレンスを読み込むタイミング
  • 初回の使用時: 全体を理解するため、skills/ftd-detector/references/ftd_methodology.md を読み込みます
  • FTD 後に関する質問: skills/ftd-detector/references/post_ftd_guide.md を読み込みます
  • 通常の実行時: スクリプトが分析を処理するため、リファレンスは不要です

コメント