Earnings Preview

作者 himself6501fc7b4b34ae无许可证3.3K 个星标收录于 2026年10月8日更新于 2026年10月8日仓库3天前更新

Build a pre-earnings briefing for a stock from Yahoo Finance data (yfinance): the upcoming report date and timing, consensus EPS and revenue estimates with their range, the beat/miss track record, analyst ratings and price targets, and what to watch in the print. Use this skill whenever the user is preparing for an upcoming earnings report or asks what the street expects — consensus or whisper numbers, EPS expectations, whether a company will beat, an earnings setup, or an earnings-season preview — and whenever a ticker comes up in the context of upcoming earnings, even without the word "preview". For results that are already out, use earnings-recap.

AI 生成的概览

通过 yfinance 获取 Yahoo Finance 数据,为股票生成财报发布前的简报。

功能
该技能通过 yfinance 库获取指定股票代码的 Yahoo Finance 数据,并整理成财报发布前的简报。内容涵盖即将发布的财报日期与时间、市场共识每股收益与营收预期及其区间、近期超预期或不及预期的记录、分析师评级与目标价,以及本次财报需要关注的重点。产出为带表格的结构化文字简报,并附有仅供研究与教育用途、不构成投资建议的说明。
适用场景
当用户准备迎接即将发布的财报,或询问市场预期时使用,包括共识或耳语数字、每股收益预期、公司能否超预期、财报布局或财报季前瞻。当股票代码在即将发布财报的语境中被提及时同样适用。对于已经公布的结果,该技能会引导用户改用财报回顾。
运行要求
需要 Python 及 yfinance 包(缺失时技能会通过 pip 安装),并需要访问 Yahoo Finance 数据的网络连接。该技能不附带脚本,仅包含说明文档和一份关于 yfinance 财报与预期方法的参考文件。

Earnings Preview Skill

Generates a pre-earnings briefing using Yahoo Finance data via yfinance. Pulls together upcoming earnings date, consensus estimates, historical accuracy, analyst sentiment, and key financial context — everything you need before an earnings call.

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 All Data

Extract the ticker symbol from the user's request. If they mention a company name without a ticker, look it up. Then fetch all relevant data in one script to minimize API calls.

python
import yfinance as yf
ticker = yf.Ticker("AAPL")  # replace with actual ticker
# --- Core data ---info = ticker.infocalendar = ticker.calendarearnings_dates = ticker.get_earnings_dates(limit=8)  # report timestamps; the upcoming one has no Reported EPS yethist = ticker.history(period="1mo")                  # recent price performance
# --- Estimates ---earnings_est = ticker.earnings_estimaterevenue_est = ticker.revenue_estimate
# --- Historical track record ---earnings_hist = ticker.earnings_history
# --- Analyst sentiment ---price_targets = ticker.analyst_price_targetsrecommendations = ticker.recommendations
# --- Recent financials for context ---quarterly_income = ticker.quarterly_income_stmtquarterly_cashflow = ticker.quarterly_cashflow

What to extract from each source

Data SourceKey FieldsPurpose
calendarEarnings Date, Ex-Dividend DateWhen earnings are and key dates
get_earnings_dates()Earnings Date (tz-aware timestamp), EPS Estimate, Reported EPSReport timing: the upcoming row has no Reported EPS; a time at or after 16:00 ET means after the close, earlier times mean before the open
earnings_estimateavg, low, high, numberOfAnalysts, yearAgoEps, growth (for 0q, +1q, 0y, +1y)Consensus EPS expectations
revenue_estimateavg, low, high, numberOfAnalysts, yearAgoRevenue, growthRevenue expectations
earnings_historyepsEstimate, epsActual, epsDifference, surprisePercentBeat/miss track record (indexed by fiscal quarter-end, oldest first)
analyst_price_targetscurrent, low, high, mean, medianStreet price targets
recommendationsBuy/Hold/Sell countsSentiment distribution
quarterly_income_stmtTotalRevenue, NetIncome, BasicEPSRecent trajectory

Step 3: Build the Earnings Preview

The briefing should let the user see the setup at a glance. Cover these five areas; if the data for one is missing, say so in a line rather than dropping it.

  1. Date and context — company, ticker, sector and industry; the report date and whether it lands before the open or after the close; current price with 1-week and 1-month performance; market cap.
  2. Consensus estimates — a table of this quarter's EPS and revenue consensus with low, high, analyst count, year-ago value, and expected growth. A high/low spread wider than about 20% of consensus signals unusual uncertainty; say so when you see it.
  3. Beat/miss track record — the last four quarters of estimated vs actual EPS with surprise %, summarized as a beat count and average surprise.
  4. Analyst sentiment — the rating distribution (strong buy through strong sell) and the price-target range (low, mean, median, high), with the implied upside or downside from the mean target.
  5. What to watch — the few things the market will focus on in this print, chosen for this company and sector: revenue growth accelerating or decelerating, margins expanding or compressing, line items that moved sharply quarter over quarter, and segment trends where the data has them. This is the judgment part of the briefing.

Step 4: Respond to the User

Open with the headline — the report date and a one-line read of the setup — then the five areas above, using tables where they help. Close with a short read of the overall setup drawn from the estimates, track record, and sentiment, framed as what the street expects rather than a recommendation.

Include the caveats that apply: estimates can change until the report date, past beats don't guarantee future ones, Yahoo Finance consensus can lag real-time providers by a few hours, and this is not financial advice.


Reference Files

  • references/api_reference.md — Detailed yfinance API reference for earnings and estimate methods

Read the reference file when you need exact method signatures or edge case handling.

来源与署名

来源:himself65/finance-skills位于plugins/market-analysis/skills/earnings-preview提交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天前更新