Skip to main content
skill CX Codex

ftd-detector — Claude Code skill for follow-through day detection

Detects Follow-Through Day signals using William O'Neil's methodology and scores whether it's time to increase exposure after a correction.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add tradermonty/claude-trading-skills --skill ftd-detector -a claude-code
Open on GitHub

What ftd-detector does

The skill runs a Python script that pulls S&P 500 and QQQ history from the FMP API and feeds it through a state machine. States cover no signal, correction, rally attempt, FTD window, and confirmation. When the market drops 3% or more with three down days, the skill tracks the bounce and waits for a confirming day between day 4 and 10.

Output comes as JSON and Markdown with an FTD quality score from 0 to 100 and a recommended exposure level. A score of 80+ means a strong signal and 75–100% exposure; below 40 means no signal or a failed one.

You need an FMP API key, passed via the FMP_API_KEY environment variable or the --api-key flag. Python 3.9+ with the requests library is also required. Each run uses 4 API calls, within the free tier of 250 per day.

The skill pairs with market-top-detector: that one finds tops, this one finds bottoms. If no correction happened, FTD analysis doesn't apply and the skill points you to the top detector instead.

What it helps with

  • tell whether a correction has ended and a bottom is forming
  • score FTD signal quality from 0 to 100
  • get a recommended exposure level after confirmation
  • track market state across two indices at once
  • time re-entry after a 3%+ decline

Example prompts for the agent

  • Check for an FTD signal on the S&P 500 and NASDAQ
  • The market dropped 5%, is it safe to add exposure?
  • Run ftd-detector and show the current signal quality

How to install ftd-detector

1Skills CLI (Vercel)

npx skills add tradermonty/claude-trading-skills --skill ftd-detector -a claude-code

2Manually: put the files in place

~/.claude/skills/ftd-detector/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/ftd-detector/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about ftd-detector

How do I install ftd-detector in Claude Code?

Run npx skills add tradermonty/claude-trading-skills --skill ftd-detector -a claude-code. The skill lands in ~/.claude/skills/ftd-detector/SKILL.md.

What does ftd-detector do?

It looks for Follow-Through Day signals using William O'Neil's methodology. It tracks the S&P 500 and NASDAQ, scores signal quality, and suggests an exposure level.

How is ftd-detector different from market-top-detector?

market-top-detector watches for distribution and exit signals. ftd-detector watches for bottom confirmation and re-entry timing. They complement each other: one is defensive, the other offensive.

Source text

SKILL.md · MIT
---
name: ftd-detector
description: Detects Follow-Through Day (FTD) signals for market bottom confirmation using William O'Neil's methodology. Dual-index tracking (S&P 500 + NASDAQ) with state machine for rally attempt, FTD qualification, and post-FTD health monitoring. Use when user asks about market bottom signals, follow-through days, rally attempts, re-entry timing after corrections, or whether it's safe to increase equity exposure. Complementary to market-top-detector (defensive) - this skill is offensive (bottom confirmation).
---

# 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

| Aspect | FTD Detector | Market Top Detector |
|--------|-------------|-------------------|
| Focus | Bottom confirmation (offensive) | Top detection (defensive) |
| Trigger | Market correction (3%+ decline) | Market at/near highs |
| Signal | Rally attempt → FTD → Re-entry | Distribution → Deterioration → Exit |
| Score | 0-100 FTD quality | 0-100 top probability |
| Action | When to increase exposure | When to reduce exposure |

---

## Execution Workflow

### Phase 1: Execute Python Script

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)

### 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
```

| State | Definition |
|-------|-----------|
| NO_SIGNAL | Uptrend, no qualifying correction |
| CORRECTION | 3%+ decline with 3+ down days |
| RALLY_ATTEMPT | Day 1-3 of rally from swing low |
| FTD_WINDOW | Day 4-10, waiting for qualifying FTD |
| FTD_CONFIRMED | Valid FTD signal detected |
| RALLY_FAILED | Rally broke below swing low |
| FTD_INVALIDATED | Close below FTD day's low |

## Quality Score (0-100)

| Score | Signal | Exposure |
|-------|--------|----------|
| 80-100 | Strong FTD | 75-100% |
| 60-79 | Moderate FTD | 50-75% |
| 40-59 | Weak FTD | 25-50% |
| <40 | No FTD / Failed | 0-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's FTD rules in detail
- Rally attempt mechanics and day counting
- Historical FTD examples (2020 March, 2022 October)

### `skills/ftd-detector/references/post_ftd_guide.md`
- Post-FTD distribution day failure rates
- Power Trend definition and conditions
- Success vs failure pattern comparison

### When to Load References
- **First use:** Load `skills/ftd-detector/references/ftd_methodology.md` for full understanding
- **Post-FTD questions:** Load `skills/ftd-detector/references/post_ftd_guide.md`
- **Regular execution:** References not needed - script handles analysis

© tradermonty · MIT · tradermonty/claude-trading-skills

Similar skills

Everything for Finance and business →

From the same set73

trader-memory-core This skill keeps investment theses from a screener idea through a closed position with a postmortem. Useful when trade decisions get lost between chats. CX Codex +1 3,300installs pead-screener Screens gap-up stocks after earnings for PEAD follow-through, reading weekly candles for red-candle pullbacks and breakouts. Handy for post-report drift setups. CX Codex +1 3,300installs kanchi-dividend-us-tax-accounting Classifies US dividend streams for stocks, REITs, and BDCs while evaluating holding periods and placement across taxable and retirement accounts. CX Codex +1 3,300installs edge-candidate-agent Turns US equity EOD observations into research tickets and exports validated candidates for trade-strategy-pipeline Phase I. CX Codex +1 3,300installs strategy-pivot-designer Detects stagnation in backtest iteration loops and generates structurally different strategy proposals when parameter tuning hits a local optimum. CX Codex +1 3,300installs data-quality-checker A skill that checks market analysis documents before publication: price scale, tickers, dates, allocation totals, units. Findings come back as warnings for human review. CX Codex +1 3,300installs dividend-growth-pullback-screener Finds dividend growers with 12%+ annual payout growth that have slipped to RSI 40 or below. Useful for entering quality names during short-term weakness. CX Codex +1 3,300installs theme-detector Identifies trending cross-sector market themes and evaluates their lifecycle stage using FINVIZ data. Useful when tracking sector rotation and bullish or bearish narratives. CX Codex +1 3,300installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor