skills/short-term-target/SKILL.md
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.
npx skillsauth add kavi-lin/stock short-term-targetInstall 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.
Short-term directional projection skill. Sister to earnings-valuation-forecaster (12-month fundamental target). Together they cover both ends of the time spectrum; investment_protocol_v4_8.md covers the 3-6 month middle.
Take one US ticker and output 1d / 5d / 15d directional projections with target range, confidence breakdown, benchmark-relative alpha, and trading meta. Designed for daily refresh on Dashboard / batch screening across watchlist.
What it is:
What it is NOT:
# Pretty-printed JSON
python3 skills/short-term-target/scripts/predict.py NVDA
# Compact JSON (for piping into other tools)
python3 skills/short-term-target/scripts/predict.py NVDA --json-only
Required: nothing — yfinance is open. dual_fetch / sector_intel are read if present (graceful degrade).
Optional environment: FINNHUB_API_KEY, FMP_API_KEY if extending to v0.2 with real news API.
{
"ticker": "NVDA",
"as_of": "ISO timestamp",
"current_price": 195.32,
"weights_version": "v0.1.0",
"horizons": {
"1d": {
"status": "ok | insufficient_data",
"target_central": 198.5,
"target_low": 192.0,
"target_high": 204.0,
"target_central_pct": 1.63,
"confidence": 0.62,
"confidence_breakdown": {
"base": 0.50,
"news_freshness": 0.08,
"sector_heat_persistence": 0.10,
"atr_penalty": -0.04,
"horizon_penalty": -0.01,
"data_completeness_bonus": 0.02,
"model_clamped_penalty": 0.0
},
"drivers": {"news_score": 0.4, "sector_heat": 0.64, "momentum_score": 0.6, "atr_pct": 3.95},
"model_clamped": false,
"data_sufficiency": {"ohlcv_days": 60, "news_age_hr": 0.5, "sector_age_hr": 14.9, "atr_pct": 3.95},
"weights_applied": {...},
"driver_labels": {"momentum": "RSI=97, current>MA20>MA50", "news": "vol 2.2× avg, gap +13.9%", "sector_status": "ok_proxy_median"},
"benchmark_etf": "SPY",
"benchmark_realized_pct": 0.77,
"implied_alpha_pct": 0.86
},
"5d": {...},
"15d": {...}
},
"trading_meta": {
"stop_suggestion": 188.0,
"stop_distance_pct": 5.93,
"position_size_hint_pct": 5.0,
"tx_cost_estimate_pct": 0.05,
"min_holding_days": 1,
"exit_trigger": "Close < 188.0 OR 5d target X reached OR confidence drops < 0.4"
},
"invalidation": "Close < $X OR sector heat downgrades by 0.2 OR ATR jumps > 50% from Y%",
"metadata": {
"dual_fetch_status": "ok | no_ticker_file | ...",
"sector_heat_status": "ok_proxy_median | no_cache | ...",
"news_driver_kind": "proxy_volume_gap (v0.1)",
"experimental": true,
"framework": "Tactical Opportunity Radar v0.1",
"benchmark_etf": "SPY"
},
"global_warnings": ["..."]
}
When a horizon's required sources are too stale or missing:
"5d": {
"status": "insufficient_data",
"missing": ["sector>72h_old", "ohlcv<5d"],
"would_need": "Refresh stale sources OR wait for sufficient OHLCV history",
"data_sufficiency": {...}
}
No target / confidence is fabricated when status is insufficient_data. Caller must handle absence.
yfinance OHLCV (60d)
↓
ATR (14) + Momentum (RSI + MA structure) + News proxy (volume/gap)
↓
sector_intel cache → sector_heat (0-1)
↓
config/weights.yaml HORIZON_WEIGHTS[h] applied per horizon
↓
shift_pct = α × news + β × sector_heat + γ × momentum
↓
hard clamp by horizon (1d ±5%, 5d ±15%, 15d ±30%)
↓
target_range = target_central ± k × ATR
confidence = base + news_fresh + heat_persist - atr_penalty - horizon_penalty + ...
↓
benchmark ETF realized (forward window) → implied_alpha
↓
trading_meta (stop / pos% / exit)
| Horizon | Must have | Triggers insufficient_data if |
|---|---|---|
| 1d | quote (live), 1d ATR, 24h news | quote > 60min OR news > 8h OR ATR sample < 5d |
| 5d | 5d momentum baseline, 24-48h news, sector heat | sector_intel > 72h OR news > 24h OR ohlcv < 5d |
| 15d | 15d realized vol, sector heat persistence, multi-week news | sector_intel > 168h OR ohlcv < 15d OR news < 5 in 3w |
All thresholds in config/weights.yaml freshness_thresholds. Edit there.
base = 0.50
+ news_freshness : (news_conf - 0.5) * 0.4 # max +0.2
+ sector_heat_persistence: heat * 0.15 # max +0.15
+ atr_penalty : -(atr_pct - 3.0) / 10 # heavy penalty for high ATR
+ horizon_penalty : -(days_horizon / 100) # 1d -0.01, 5d -0.05, 15d -0.15
+ data_completeness : +0.02 if all sources fresh
+ model_clamped_penalty : -0.15 if shift_pct was clamped
= clamp(0.0, 0.95) # never 1.0
Output confidence_breakdown exposes every term — sum equals final confidence (audit-able).
Each horizon's prediction shows:
benchmark_etf: chosen by sub-industry (defaults to SPY in v0.1; GICS lookup deferred to v0.2)benchmark_realized_pct: ETF's recent N-day realized returnimplied_alpha_pct: prediction - benchmark_realized⚠️ Caveat: implied_alpha_pct compares forward prediction vs backward realized. It's a proxy assuming benchmark continues at recent pace. Document caveat: if SPY had a big recent move, alpha will look misleadingly small/negative. Use as directional context, not absolute claim.
Designed for trade decisions, not watchlist (per user requirement):
stop_suggestion: 1.5 × ATR below currentstop_distance_pct: stop distance as % (1.5 × atr_pct)position_size_hint_pct: 0.33 / atr_pct, capped 0.5%-5%. Risks ~0.5% portfolio per trade.tx_cost_estimate_pct: flat 0.05% (round-trip estimate for liquid US stocks)min_holding_days: 1 (avoid being whipsawed by own short signals)exit_trigger: composite condition stringconfig/weights.yaml is hand-editable. To recalibrate:
python3 skills/short-term-target/scripts/weekly_review.py (Step 7, separate tool)reports/SHORT_TERM_WEEKLY_<DATE>.mdconfig/weights.yaml accordinglyweights_version fieldTool does NOT auto-overwrite config. User has full control.
| Area | Limitation | Plan | |---|---|---| | News driver | Volume/gap proxy, not real news API | v0.2 add Finnhub /company-news with sentiment | | GICS sub-industry | Not looked up; benchmark defaults to SPY | v0.2 add ticker→GICS resolver | | Cache | None — every call hits yfinance | Add 4h TTL cache | | dual_fetch consumption | Best-effort read; not enforced | Optional | | Real Finnhub catalysts (insider, upgrades) | Not used | v0.2 | | Validation | None — first run, no outcome data | Step 5 outcome log accumulates from day 1 |
skills/short-term-target/
├── SKILL.md # this file
├── README.md # usage walkthrough + interpretation guide
├── CHANGELOG.md # version history
├── config/weights.yaml # hand-editable parameters
├── scripts/predict.py # main entry
├── cache/ # gitignored
└── data/ # gitignored — recommendation log dest (Step 5)
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
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.
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.