Earnings Recap

作者 himself6501fc7b4b34ae無授權條款3.3K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫3 天前更新

Analyze a company's most recent (or a specified past) earnings report from Yahoo Finance data (yfinance): actual vs estimated EPS, surprise size, revenue and margin trends, and the stock's price reaction. Use this skill whenever the user asks how earnings went — beat or miss, earnings surprise, quarterly results, the post-earnings move, or an earnings call recap — including casual references to a past report such as "AMZN reported last night" or "how did they do". For an upcoming report, use earnings-preview.

AI 產生的概覽

使用 Yahoo Finance 資料分析公司最新或指定過往的財報,涵蓋每股盈餘超預期幅度、趨勢與股價反應。

功能
透過 yfinance 套件取得財報日期、每股盈餘預估值與實際值、季度損益表、現金流量表和資產負債表資料,以及股價歷史與新聞。它會計算盈餘超預期幅度、營收與利潤率趨勢,以及財報反應時段的股價變動並與過往報告比較。接著產出附有支撐表格和注意事項的文字回顧。
適用情境
當使用者詢問某公司財報表現如何、是否優於或低於預期、超預期幅度多大,或財報後股價如何反應時使用。適用於已公布或剛公布的季度,而非即將發布的財報。
執行需求
需要 Python 及 yfinance 套件(缺少時透過 pip 安裝),並需要連線至 Yahoo Finance 資料的網路存取。此技能不附帶指令碼,僅包含說明與參考文件。輸出僅供研究與教育用途,不構成投資建議。

Earnings Recap Skill

Generates a post-earnings analysis using Yahoo Finance data via yfinance. Covers the actual vs estimated numbers, surprise magnitude, stock price reaction, and financial context — a complete picture of what happened.

Important: Data is for research and educational purposes only. Not financial advice. yfinance is not affiliated with Yahoo, Inc.


Step 1: Ensure yfinance Is Available

Current environment status:

!`python3 -c "exec('try:\n import yfinance\n print(\'yfinance \' + yfinance.__version__ + \' installed\')\nexcept Exception:\n print(\'YFINANCE_NOT_INSTALLED\')')"`

If YFINANCE_NOT_INSTALLED, install it:

python
import subprocess, syssubprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance"])

If already installed, skip to the next step.


Step 2: Identify the Ticker and Gather Data

Extract the ticker from the user's request. Fetch all relevant post-earnings data in one script.

python
import yfinance as yfimport pandas as pd
ticker = yf.Ticker("AAPL")  # replace with actual ticker
# --- Earnings results ---earnings_dates = ticker.get_earnings_dates(limit=12)  # report timestamps, newest firstearnings_hist = ticker.earnings_history               # last 4 quarters, indexed by fiscal quarter-end, oldest first
# --- Financial statements (about five quarters, newest first) ---quarterly_income = ticker.quarterly_income_stmtquarterly_cashflow = ticker.quarterly_cashflowquarterly_balance = ticker.quarterly_balance_sheet
# --- Context ---info = ticker.infonews = ticker.newsrecommendations = ticker.recommendations

What to extract

Data SourceKey FieldsPurpose
get_earnings_dates()Earnings Date, EPS Estimate, Reported EPS, Surprise(%)Which report, when, and the beat/miss
earnings_historyepsEstimate, epsActual, epsDifference, surprisePercentLast four quarters' results by fiscal quarter
quarterly_income_stmtTotalRevenue, GrossProfit, OperatingIncome, NetIncome, BasicEPSActual financials
history()Daily closes around each reportStock price reaction
infocurrentPrice, marketCap, forwardPECurrent context
newsRecent headlinesEarnings-related news

Step 3: Find the Report and Measure the Reaction

earnings_history is indexed by fiscal quarter-end, not by announcement date, so take report timing from get_earnings_dates(): the most recent report is the newest row with a Reported EPS. Its timestamp (US Eastern) sets the reaction window: at or after 16:00 means the company reported after the close; anything earlier means before the open or, occasionally, during the session. If the user asked about a specific quarter, use that row instead.

python
def earnings_reaction(ticker, report_ts):    """% move from the last close before the report to the first close after it."""    daily = ticker.history(start=(report_ts - pd.Timedelta(days=10)).date(),                           end=(report_ts + pd.Timedelta(days=10)).date())    closes = daily["Close"]    days = closes.index.date    d = report_ts.date()    if report_ts.hour >= 16:  # reported after the close: report-day close -> next close        pre, post = closes[days <= d], closes[days > d]    else:                     # before the open or intraday: prior close -> report-day close        pre, post = closes[days < d], closes[days >= d]    if pre.empty or post.empty:        return None           # the reaction session hasn't closed yet    return (post.iloc[0] / pre.iloc[-1] - 1) * 100
reported = earnings_dates[earnings_dates["Reported EPS"].notna()]latest_ts = reported.index[0]reaction_pct = earnings_reaction(ticker, latest_ts)
# Typical earnings-day move over the prior four reportsprior_moves = [earnings_reaction(ticker, ts) for ts in reported.index[1:5]]avg_abs_move = pd.Series([abs(m) for m in prior_moves if m is not None]).mean()

If reaction_pct is None, the report came after the most recent close; say the regular-session reaction is still pending (an intraday history(..., prepost=True) call shows the after-hours move if the user wants it).


Step 4: Build the Earnings Recap

Cover these areas, leading with the result:

  1. Headline result — EPS actual vs estimate with the surprise %, revenue with year-over-year growth, and the stock's reaction.
  2. Estimates vs actuals — EPS estimate, actual, and surprise ($ and %) for the quarter in question.
  3. Quarterly trends — revenue, gross margin, operating margin, and EPS for the recent quarters, with margins computed from the statements (gross profit / revenue, operating income / revenue). yfinance usually returns about five quarters, so year-over-year growth is available for the latest quarter only (column 0 vs column 4); show sequential change for the others rather than inventing a comparison.
  4. Price reaction — the move in the reaction session, how it compares with the stock's average absolute earnings move over the prior four reports, and whether the stock has since held, given back, or extended the move.
  5. What changed — margin direction vs the prior quarter, any shift in the revenue growth trajectory, how this surprise compares with the company's usual pattern, and current analyst sentiment if available.

Step 5: Respond to the User

Open with the headline — which quarter, when it was reported, the beat or miss, revenue growth, and the reaction — then the supporting tables. Say what matters: whether this was a meaningful beat or a low bar cleared, and whether the trend is improving or deteriorating. Keep it factual and leave out investment recommendations.

Include the caveats that apply: Yahoo Finance data doesn't capture everything from the call (guidance, segment detail), revenue is compared year over year from the statements rather than against a revenue consensus, the price reaction can reflect a broader market move that day, and this is not financial advice.


Reference Files

  • references/api_reference.md — Detailed yfinance API reference for earnings history and financial statement methods

Read the reference file when you need exact method signatures or to handle edge cases in the financial data.

來源與署名

來源:himself65/finance-skills位於plugins/market-analysis/skills/earnings-recap提交01fc7b4

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架

更多來自 himself65/finance-skills 的技能

Yfinance Data

himself65

透過 yfinance Python 函式庫從 Yahoo Finance 取得股票與市場資料並加以呈現。

Data & Analytics3.3K3 天前更新

Stock Liquidity

himself65

Analyze how liquid a stock is using Yahoo Finance data (yfinance): bid-ask spreads, volume and dollar volume (ADTV), top-of-book and options depth, square-root market impact and slippage estimates, turnover ratio, and Amihud illiquidity, rolled into a liquidity grade. Use this skill whenever the user asks about liquidity or trading costs — how easily a position can be entered or exited, what a large order would do to the price, spread or execution-cost estimates, order book depth, volume patterns, or liquidity comparisons — especially for small caps, penny stocks, and thinly traded names.

待分類3.3K3 天前更新

Stock Correlation

himself65

以 Yahoo Finance 價格歷史分析股票連動,找出相關個股、貝他、聚類與滾動相關性。

Data & Analytics3.3K3 天前更新

Sepa Strategy

himself65

以 Mark Minervini 的 SEPA 方法分析股票:階段分析、趨勢範本、型態、進場點與部位控管。

Business & Finance3.3K3 天前更新

Saas Valuation Compression

himself65

分析未上市 SaaS 公司各輪募資的 ARR 估值倍數變化,並將變化歸因於總經、成長與敘事因素。

Business & Finance3.3K3 天前更新

Yc Reader

himself65

Look up Y Combinator companies and batches from the public yc-oss API, a static JSON dataset refreshed daily: company profiles, batch rosters (e.g. W25, S24), companies by industry or tag, top companies, who is hiring, founder-diversity lists, and overall YC stats. Use this skill whenever the user asks about YC-backed startups, a YC batch, YC companies in a sector or tag or that are hiring, the Y Combinator portfolio, or startup and venture research that draws on YC data. Read-only.

待分類3.3K3 天前更新