skills/earnings-analyst/SKILL.md
# 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` |
npx skillsauth add kavi-lin/stock skills/earnings-analystInstall 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.
Trigger:
財報 [TICKER]Version: V1.0 Data Source: FMP HTTP REST($FMP_API_KEY)
針對單一個股產出深度財報分析報告(逐季趨勢、品質指標、估值、分析師共識),涵蓋 sector V1.4 與 分析 [TICKER] 既有 protocol 沒有的「財報層級」深潛內容。
| 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 | post-earnings gap/趨勢 5 因子評分 | earnings 後 |
| earnings-analyst(本) | 8 季三表結構化趨勢 + 品質 flag + 0-100 composite score | 財報 [TICKER] |
# Step 1 — Fetch:呼叫 17 個 FMP endpoint(含 5 個 V1.73 infographic 層),寫 cache
python3 skills/earnings-analyst/scripts/fetch.py NVDA
# Step 2 — Analyze:derive 邊際/成長/品質 + composite scoring(in-place 寫回 cache)
python3 skills/earnings-analyst/scripts/analyze.py NVDA
# Step 3 — Validate cache schema(rc=0 才能進 narrate phase)
python3 skills/earnings-analyst/scripts/validate.py NVDA
由 Claude Code 在 conversation 內執行,不寫 python orchestrator(50K 字 transcript 抽取)。
Claude 用 Read 工具讀取:
skills/earnings-analyst/cache/<TICKER>_<DATE>.json 全文transcript.content 字串(~50K 字),為 CFO 季度電話會議逐字稿接著用 Write 工具寫出 skills/earnings-analyst/cache/<TICKER>_<DATE>.infographic.json,schema 見 schema.md 的「Infographic Cache (V1.0)」section。
必抽欄位(transcript 有時):
headline_oneliner — 整體一句話摘要surprise.* — 從 cache.earnings_surprises[0] 計算 beat/miss + surprise_pctsegments_q.items[] — 從 transcript CFO 段落抽季度數字(infographic 上的 569.9/309.8 億等),抽不到才退化用 cache.segments.product_fy[0] + is_fy_fallback=truegeographic_q.items[] — 同上邏輯capital_returns.{buyback_authorization_usd, dividend_per_share_*, dividend_hike_pct, announcements[]} — 從 transcript 抓 "authorized $X buyback"、"raising our dividend by Y% to $Z" 等句子ceo_quote.{speaker, title, quote, context} — 挑 1-2 句最能表達本季 narrative 的 CEO 引述key_highlights[](≥3) — icon + title + body,涵蓋成長/產品/區域/資本/風險 等面向summary[](≥2) — tldr 條列transcript=null 時(fallback):
transcript_used=false,省略 ceo_quotesegments_q.is_fy_fallback=true,用 FY 年度capital_returns.announcements=[],只填 cash_flow[0] 上有的執行金額key_highlights 從 quarterly_pnl yoy + quality_flags 合成# Step 5 — Render:既有 markdown 報告(細節 reference,不變)
python3 skills/earnings-analyst/scripts/render.py NVDA
# Step 6 — Validate infographic schema(rc=0 才算完成)
python3 skills/earnings-analyst/scripts/validate_infographic.py NVDA
財報 [TICKER] trigger)T=NVDA && \
python3 skills/earnings-analyst/scripts/fetch.py "$T" && \
python3 skills/earnings-analyst/scripts/analyze.py "$T" && \
python3 skills/earnings-analyst/scripts/validate.py "$T" && \
echo "→ Step 4: Claude reads cache+transcript, writes infographic.json" && \
python3 skills/earnings-analyst/scripts/render.py "$T" && \
python3 skills/earnings-analyst/scripts/validate_infographic.py "$T"
(TICKER, last_earnings_date)skills/earnings-analyst/cache/<TICKER>_<YYYY-MM-DD>.json(YYYY-MM-DD = 最新季財報日)/income-statement?limit=1) 拿最新季 date;若 cache 已有同 date 檔且 < 90d → skip 11 個 endpoint--force: 繞過 cache 強制重 fetch12 calls/run(完整 fetch),free plan 250/day。Cache hit 只用 1 call。
| Endpoint | 用途 |
|---|---|
| /profile | sector / industry / marketCap / price / CEO |
| /income-statement?period=quarter&limit=8 | 8 季 P&L |
| /balance-sheet-statement?period=quarter&limit=8 | 8 季 BS |
| /cash-flow-statement?period=quarter&limit=8 | 8 季 CF |
| /key-metrics-ttm | ROE/ROIC/FCF yield/Income Quality TTM |
| /ratios-ttm | margins/D-E/PE/PB/Current Ratio TTM |
| /financial-growth?period=annual&limit=5 | 5y CAGR |
| /enterprise-values?period=quarter&limit=1 | EV |
| /discounted-cash-flow | DCF intrinsic |
| /price-target-consensus | 分析師目標價區間 |
| /ratings-snapshot | FMP 1-5 composite + 子分項 |
| /grades-historical?limit=6 | 6 個月 buy/hold/sell 變動 |
Paid blocker(graceful skip):
/key-metrics?period=quarter(逐季 metric 細項)→ TTM + 自算替代/analyst-estimates?period=quarter(forward EPS)→ earnings-valuation-forecaster 自算 3-method 替代earningsTranscript → 略過 transcript sentimentESG → 略過 ESG section| 元件 | 滿分 | 邏輯 | |---|---|---| | Quality | 30 | 25 base − 4×flag count + bonus(income quality > 1.1 / cash conv > 1.1) | | Growth | 30 | 10 base + revenue YoY tier + acceleration ± + 5y CAGR tier | | Valuation | 25 | 10 base + DCF upside tier + FCF yield tier + ratings overall ± | | Analyst | 15 | 5 base + PT upside tier + grades buy% tier |
Verdict 對照: 80+ STRONG / 65+ SOLID / 50+ MIXED / 35+ WEAK / <35 DETERIORATING
analyze.py 額外輸出 structural_shift 區塊(不影響 composite_score,獨立 signal):
| Signal | 條件 |
|---|---|
| eps_qoq_jump | EPS QoQ ≥ 30% |
| gm_breakout | gross margin ≥ 歷史 8Q [1:9] mean + 2σ |
| rev_accel | revenue YoY ≥ 25% AND 比上一季 YoY 高 ≥ 5pp |
Tier:
NONE — 0 ~ 1 signalCANDIDATE — 最新 Q ≥ 2 signalCONFIRMED — 最新 Q AND 上一 Q 都 CANDIDATE(兩季連續結構性跳躍)INSUFFICIENT_DATA — 不足 5 季下游消費:投資 protocol Phase 3 Step 1.5 (V2.18.0 modulation) 讀此 tier,CANDIDATE 放寬估值錨點 + position cap 50%;CONFIRMED 解除 sector_avoid + Red Team mean-reversion attack blocked。MU/QCOM 超級週期錯失案例的 systemic fix。
詳見 schema.md 與 investment/investment_protocol_v5_0.md Phase 3 Step 1.5。
仿 reference equity-research/earnings-analysis SKILL.md 的 JPMorgan / Goldman 格式。MD report 規範如下:
| 維度 | 規範 | Why | |---|---|---| | 長度 | 8-12 頁(A4 single-column) | 機構分析師 1-2 day turnaround 就要產出,不是長篇 initiation | | 字數 | 3,000-5,000 字(純內容,不含表格 / 圖 caption)| 太短 = 沒洞察;太長 = client 不讀 | | Summary tables | 1-3 張(不完整三表)| 焦點是「本季 vs guide / consensus 變動」,不是教學財報 | | Charts | 8-12 張(infographic + sparkline 混合)| segment / margin / capex / FCF trend / 估值帶狀圖 | | Turnaround | earnings 後 24-48h 內產出 | 後續價格反應已 priced in,越晚越無 alpha | | Audience 假設 | reader 已熟悉公司基本面 | 不重述產品線 / 創辦人故事 | | 焦點 | NEW info only — beat/miss、guidance 變動、segment mix shift、management commentary 新訊號 | 區別於 initiating-coverage(30-50 頁完整覆蓋) |
規則:MD report 內所有財務數字、表格 footer、引述、guidance 變動都必須掛 markdown clickable hyperlink,不能只寫 Source: 10-Q 純文字。讀者點得到才算 source。
| 內容 | 必掛 link 指向 | URL 模板 |
|---|---|---|
| 季度三表數字(P&L / BS / CF)| SEC EDGAR 10-Q filing | https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK={ticker}&type=10-Q |
| 年度數字(5y CAGR)| SEC EDGAR 10-K | https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK={ticker}&type=10-K |
| Earnings release 數字 / guidance | 公司 IR 頁面 press release | https://investor.{company}.com/news/...(從 transcript / FMP profile 抓) |
| Transcript CEO/CFO 引述 | FMP earningsTranscript endpoint 或 IR webcast 連結 | https://discountingcashflows.com/company/{TICKER}/transcripts/ 或公司 IR webcast |
| Analyst PT consensus | FMP /price-target-consensus 來源頁 | https://financialmodelingprep.com/financial-statements/{TICKER} |
| FMP ratings 評級 | FMP /ratings-snapshot ticker 頁 | https://site.financialmodelingprep.com/financial-summary/{TICKER} |
| DCF intrinsic | FMP /discounted-cash-flow ticker 頁 | https://site.financialmodelingprep.com/discounted-cash-flow/{TICKER} |
❌ 錯:
Source: Q3 2024 10-Q filed November 8, 2024; Company earnings release
✅ 對:
Source: [Q3 2024 10-Q](https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=NVDA&type=10-Q) filed Nov 8, 2024;
[earnings release](https://investor.nvidia.com/news/2024-q3-earnings)
(deterministic, see analyze.py) 即可render.py 產出時應自動填 link(template 預設帶 markdown link 結構)。若 LLM narrate phase(Step 4)寫 infographic.json 時忘掉 hyperlink,render 階段 fallback 到「無 link 純文字」是允許的(degrade gracefully),但 final report 一行 WARN: missing source links — see Citations section in SKILL.md 必須出現。
earnings-valuation-forecaster(此 skill 沒整合,使用者需自己接)分析 [TICKER] Phase 2 流程 — 此 skill 是獨立深度層,不自動掛上 daily protocol(避免 token 浪費)data.json、不影響 Dashboardtesting
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.
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.