skills/earnings-valuation-forecaster/SKILL.md
Project 12-month target prices for a US stock using earnings trend analysis, peer multiple comparison, and sensitivity grids. Produces bull / base / bear scenarios with upside/downside, key assumptions, trigger conditions, and a 3×3 sensitivity matrix (EPS growth × forward multiple). Use when user asks for 目標價, fair value, 合理價格, valuation target, price projection, scenario analysis, or "what's this stock worth in 12 months" for a specific ticker. Standalone skill — not auto-wired into investment protocol.
npx skillsauth add kavi-lin/stock earnings-valuation-forecasterInstall 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.
Take one US ticker and produce a 12-month scenario-based target price range from earnings fundamentals + multiple comparison. This fills the gap in the system where we consume analyst consensus PTs but never produce our own.
What it is:
What it is NOT:
investment_protocol_v4_8.md (user chose standalone)# Required
export FMP_API_KEY=your_key_here
# Standalone CLI
python3 skills/earnings-valuation-forecaster/scripts/forecast.py MSFT
python3 skills/earnings-valuation-forecaster/scripts/forecast.py NVDA --json-only
python3 skills/earnings-valuation-forecaster/scripts/forecast.py AAPL --output-dir reports/
Within Claude Code, trigger via:
/earnings-valuation-forecaster MSFTFetches last 8 quarters of diluted EPS from FMP /income-statement?period=quarter.
EPS_fwd = EPS_ttm × (1 + cagr_4yr_adjusted)
where cagr_4yr_adjusted is last-4Q EPS growth dampened ×0.7 (decay factor
so recent parabolic growth doesn't extrapolate linearly)/analyst-estimates next-year EPS medianFinal forward_eps = median(method_1, method_2, method_3) if all available,
else mean of available. Flag confidence: HIGH | MEDIUM | LOW based on:
FMP /key-metrics?period=quarter&limit=20 gives 5 years of trailing PE.
Compute:
pe_p25 (bear multiple — 25th percentile of last 5Y, trimmed)pe_p50 (base multiple — median)pe_p75 (bull multiple — 75th percentile)Fallback if < 20 quarters: use min / median / max of available with warning.
| | EPS bear (−15%) | EPS base | EPS bull (+15%) | |---|---|---|---| | PE bear (p25) | deep_bear | moderate_bear | — | | PE base (p50) | mild_bear | BASE | mild_bull | | PE bull (p75) | — | moderate_bull | BULL |
Bull target = EPS_fwd × 1.15 × PE_p75
Base target = EPS_fwd × PE_p50
Bear target = EPS_fwd × 0.85 × PE_p25
Each scenario reports:
upside_pct: vs current priceachieves_if: forward-looking conditions (e.g., "next 2 earnings beat by > 5%
AND multiple re-rates to p75")invalidated_if: falsifiable kill condition (e.g., "any FY miss > 10%
OR PE compresses below p25"){
"ticker": "MSFT",
"generated_at": "2026-04-20T10:15:00",
"current_price": 384.23,
"ttm_eps": 11.80,
"forward_eps": {
"value": 13.20,
"method_1_cagr": 13.50,
"method_2_consensus": 13.10,
"method_3_trend": 13.00,
"confidence": "HIGH",
"spread_pct": 3.8
},
"multiple_range": {
"pe_p25": 24.5,
"pe_p50": 32.0,
"pe_p75": 38.8,
"window_quarters": 20
},
"scenarios": {
"bear": {"target": 266.0, "upside_pct": -30.8, "eps_delta": -15, "pe": 24.5,
"achieves_if": "forward EPS miss > 10% or margin compression",
"invalidated_if": "beats guidance 2 quarters in a row"},
"base": {"target": 422.4, "upside_pct": 10.0, "eps_delta": 0, "pe": 32.0,
"achieves_if": "in-line earnings + range-bound multiple",
"invalidated_if": "either earnings surprise > 10% or multiple break"},
"bull": {"target": 589.6, "upside_pct": 53.5, "eps_delta": +15, "pe": 38.8,
"achieves_if": "capex cycle extension + 2x consensus beat",
"invalidated_if": "any guidance cut or macro multiple compression"}
},
"sensitivity_grid": [
[266.0, 313.0, 360.0],
[307.0, 361.0, 415.0],
[427.0, 502.0, 577.0]
],
"sensitivity_axes": {
"rows": ["PE p25 (24.5)", "PE p50 (32.0)", "PE p75 (38.8)"],
"cols": ["EPS bear (-15%)", "EPS base", "EPS bull (+15%)"]
},
"caveats": [
"Multiple range uses company 5Y history — blind to sector regime shifts",
"Forward EPS trend method assumes business model continuity",
"Not a replacement for DCF / intrinsic value analysis"
]
}
Written to reports/YYYYMMDD_<TICKER>_valuation.md:
# MSFT · 12-Month Valuation Scenarios
**Current**: $384.23 · **TTM EPS**: $11.80 · **Forward EPS**: $13.20 (HIGH conf)
| Scenario | Target | Upside | PE | EPS Δ | Key Trigger |
|----------|--------|--------|-----|--------|-------------|
| 🐂 Bull | $589.6 | +53.5% | 38.8× | +15% | capex extension + 2x beat |
| 📊 Base | $422.4 | +10.0% | 32.0× | 0% | in-line, range-bound |
| 🐻 Bear | $266.0 | −30.8% | 24.5× | −15% | miss > 10% or compression |
## Sensitivity Matrix (target price)
| | EPS −15% | EPS base | EPS +15% |
|---|---|---|---|
| **PE p25** | $266 | $313 | $360 |
| **PE p50** | $307 | $361 | $415 |
| **PE p75** | $427 | $502 | $578 |
## Forward EPS reconciliation
- Trailing CAGR (dampened): $13.50
- Analyst consensus: $13.10
- Trend regression: $13.00
- **Adopted**: $13.20 (median, ±3.8% spread → HIGH confidence)
## Caveats
...
--pre-earnings flag pivots output to a pre-earnings cheat sheet focused on the next scheduled earnings event (≤ 7d typical). Best-by-design when financial-mode-cycle calendar shows fmp_confirmed earnings within a week.
python3 skills/earnings-valuation-forecaster/scripts/forecast.py NVDA --pre-earnings
python3 skills/earnings-valuation-forecaster/scripts/forecast.py AMD --pre-earnings --output-dir reports/
/earnings future-dated row → {date, days_until, eps_estimated, rev_estimated}. source: fmp_confirmed. Returns null if FMP has nothing.skills/earnings-analyst/cache/<TICKER>_<DATE>.json exists — pulls segment names from segments.product_fy[0].products + recent quality_flagsreports/<YYYYMMDD>_<TICKER>_pre_earnings.md (suffix differs from _valuation.md to avoid overwriting plain mode)pre_earnings: {…} block; plain-mode cache won't be picked up by --pre-earnings (and vice versa)earnings-analyst for post-earnings deep-diveTriggered automatically by Dashboard 「📋 財報前瞻」button on earnings.html and calendar.html upcoming events when:
next_earnings_source === 'fmp_confirmed'0 <= days_until <= 7Per-ticker cache at cache/<ticker>.json, TTL 4 hours (default).
CLI flags: --no-cache, --max-age <sec>.
{"status": "unsupported", "reason": "negative_ttm_eps"} — user should
switch to P/S or EV/EBITDA based valuation (not in scope).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.
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.