skills/thematic-screener/SKILL.md
Daily Top N hot themes × Top M short-term movers per theme. Combines theme-detector heat scoring (medium-term) with short-term-target predictions (1d/5d/15d) into a "Tactical Opportunity Radar" recommendation log. Tags concentration WARNING when ≥2 picks share theme. Records FRED + market regime snapshot at recommendation time for future backtest cross-tabs. Standalone — not auto-wired into investment_protocol. Use for daily watchlist refresh / Dashboard推薦面板feed / batch screening across hot themes.
npx skillsauth add kavi-lin/stock thematic-screenerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Daily aggregator that connects two upstream skills:
theme-detector (heat / lifecycle, medium-term)
↓
Top N themes by heat
↓
representative_stocks (per theme)
↓
short-term-target (1d / 5d / 15d projection per ticker)
↓
+ regime_snapshot (SPY / VIX / FRED)
+ concentration_flag (per §11.B WARNING-not-REMOVE)
↓
data/recommendations/<DATE>.json
# Default: top 5 themes × top 4 movers (~ 20 predict.py calls, 100-300s)
python3 skills/thematic-screener/scripts/screen.py
# Smoke test
python3 skills/thematic-screener/scripts/screen.py --top-themes 2 --top-movers 2 --no-write
# JSON-only for piping
python3 skills/thematic-screener/scripts/screen.py --json-only
{
"as_of": "ISO timestamp",
"experimental": true,
"framework": "Tactical Opportunity Radar v0.1 (thematic-screener)",
"regime_snapshot": {
"spy_close": 713.94,
"spy_ma50": 676.99,
"spy_ma50_status": "above",
"spy_rsi_14": 87.4,
"vix": 18.71,
"yield_curve_t10y2y": 0.62,
"yield_curve_inverted": false,
"fed_funds_current": 3.64,
"credit_spread_pctile_1y": 29,
"credit_stress_elevated": false,
"fred_regime_label": "expansion | caution"
},
"theme_detector_meta": {"age_hr": 20.0, "file": "..."},
"screener_params": {"top_themes": 5, "top_movers": 4},
"themes": [
{
"name": "Nuclear Energy",
"direction": "bullish",
"heat": 78.3,
"heat_label": "Hot",
"lifecycle_stage": "Mature",
"confidence": "Medium",
"proxy_etfs": ["URA", "URNM", "NLR"],
"fred_alignment": "neutral",
"top_movers": [
{
"ticker": "CEG",
"short_term": { ...full short-term-target output... },
"concentration_flag": {
"theme": "Nuclear Energy",
"co_recommendations": ["VST", "OKLO"],
"warning": "Theme 'Nuclear Energy' has 3 co-recs; correlated drawdown risk in same-theme exposure"
}
}
]
}
],
"global_warnings": []
}
Same theme ≥ 2 picks → concentration_flag with co-recommendations and warning text.
Important: Per §11.B修正 — concentration is WARNING not REMOVE. The screener returns ALL top movers; downstream consumers (Dashboard) decide whether to dim / hide / cap. This is because:
v0.1: concentration is THEME-based (proxy). v0.2: switch to GICS sub-industry once lookup table built.
Each daily log includes the full market state at recommendation time:
Why this matters for backtest: Future weekly_review.py (Step 7) can cross-tab predictions vs outcomes by regime — answer "does the model work better when SPY RSI < 70 vs > 70?" / "when fred_regime_label = caution vs expansion?" etc.
scripts/screen.py
├── load_latest_themes() → reads skills/theme-detector/cache/theme_detector_*.json
├── load_fred_snapshot() → reads skills/fred-macro/cache/*.json
├── get_market_snapshot() → yfinance SPY/^VIX
├── select_top_movers() → theme.representative_stocks[:max_movers]
├── run_short_term_target() → subprocess to skills/short-term-target/scripts/predict.py
├── tag_concentration() → §11.B WARNING (not REMOVE)
└── build_output() / write → data/recommendations/<DATE>.json
Key design choices:
| Area | Limitation | Plan | |---|---|---| | Concentration grain | Theme-level (not GICS sub-industry) | v0.2: add GICS lookup table for finer dedup | | FRED → theme alignment | Always "neutral" — placeholder | v0.2 evaluate after Step 7 outcome data | | Cache | Reads only; no own cache | Sufficient (theme-detector/short-term-target each cache themselves) | | Cost | ~ N×M predict.py calls (≈ 100-300s for 5×4) | Acceptable for daily cadence | | Validation | No outcome backtest yet (Step 7) | Day-1 log accumulation enables Step 7 |
skills/thematic-screener/
├── SKILL.md # this file
├── README.md # usage walkthrough
├── CHANGELOG.md # version history
├── scripts/screen.py # main entry
├── cache/ # gitignored (currently unused — reads upstream caches)
└── data/recommendations/ # gitignored — daily JSON logs
└── YYYY-MM-DD.json # one per run-day
| Skill | Relationship |
|---|---|
| theme-detector | Direct upstream — reads its cache |
| short-term-target | Direct upstream — subprocess invokes its predict.py |
| fred-macro | Optional upstream — reads cache for regime context |
| momentum-monitor | Independent (different scoring paradigm) |
| investment_protocol_v4_8.md | No relationship — does not affect protocol decisions |
| weekly_review.py (Step 7, future) | Direct downstream — reads data/recommendations/ to evaluate hit rate |
development
# earnings-analyst — 個股財報深度分析 > **Trigger**: `財報 [TICKER]` > **Version**: V1.0 > **Data Source**: FMP HTTP REST(`$FMP_API_KEY`) ## 目的 針對單一個股產出**深度財報分析報告**(逐季趨勢、品質指標、估值、分析師共識),涵蓋 sector V1.4 與 `分析 [TICKER]` 既有 protocol **沒有**的「財報層級」深潛內容。 ## 與既有 skill 的差異 | Skill | 重點 | 觸發 | |---|---|---| | `us-stock-analysis` | 估值/技術/情緒 snapshot(yfinance + FMP partial) | Phase 2 fundamentals lane | | `earnings-valuation-forecaster` | 12M 目標價 3×3 敏感度 | ad-hoc / earnings 前 14 天 | | `earnings-trade-analyzer` |
testing
Short-term (1d / 5d / 15d) directional projection for a US stock — "Tactical Opportunity Radar". Outputs target range + confidence breakdown + benchmark-relative alpha + trading meta (stop / position size hint / exit trigger). Each horizon uses independent weights from config/weights.yaml. Refuses to project when source data is stale (returns insufficient_data with reasons). Hard-clamped to prevent cold-start absurd predictions. Use when caller wants short-term directional bias on a specific ticker, NOT for long-term valuation (use earnings-valuation-forecaster for 12-month). Standalone — not auto-wired into investment_protocol.
tools
Shared Finnhub API client used by other skills. Provides rate-limited (60/min), cached, retry-aware access to 17 Finnhub endpoints covering quotes, OHLCV, fundamentals, earnings calendar, earnings surprises, insider transactions, recommendation history, price targets, upgrades/downgrades, dividends, splits, IPOs, and SEC filings. Also exports adapters that normalize Finnhub raw responses into FMP-compatible shapes so that downstream code can swap providers without changing call sites. Use when another skill needs Finnhub data or when building a unified provider layer.
development
Analyze recent post-earnings stocks using a 5-factor scoring system (Gap Size, Pre-Earnings Trend, Volume Trend, MA200 Position, MA50 Position). Scores each stock 0-100 and assigns A/B/C/D grades. Use when user asks about earnings trade analysis, post-earnings momentum screening, earnings gap scoring, or finding best recent earnings reactions.