estimate-analysis

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Estimate Analysis Skill

预期分析技能

Deep-dives into analyst estimates and revision trends using Yahoo Finance data via yfinance. Covers EPS and revenue estimate distributions, revision momentum, growth projections, and multi-period comparisons — the full picture of where the street thinks a company is heading.
Important: Data is for research and educational purposes only. Not financial advice. yfinance is not affiliated with Yahoo, Inc.

通过yfinance调用Yahoo Finance数据,深入分析分析师预期及修正趋势。涵盖EPS和营收预期分布、修正动能、增长预测以及多周期对比,全面呈现华尔街对公司发展走势的判断。
重要提示:数据仅用于研究和教育目的,不构成投资建议。yfinance与Yahoo, Inc.无关联。

Step 1: Ensure yfinance Is Available

步骤1:确保yfinance可用

Current environment status:
!`python3 -c "import yfinance; print('yfinance ' + yfinance.__version__ + ' installed')" 2>/dev/null || echo "YFINANCE_NOT_INSTALLED"`
If
YFINANCE_NOT_INSTALLED
, install it:
python
import subprocess, sys
subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance"])
If already installed, skip to the next step.

当前环境状态:
!`python3 -c "import yfinance; print('yfinance ' + yfinance.__version__ + ' installed')" 2>/dev/null || echo "YFINANCE_NOT_INSTALLED"`
如果返回
YFINANCE_NOT_INSTALLED
,请安装:
python
import subprocess, sys
subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance"])
如果已安装,直接跳到下一步。

Step 2: Identify the Ticker and Gather Estimate Data

步骤2:识别股票代码并收集预期数据

Extract the ticker from the user's request. Fetch all estimate-related data in one script.
python
import yfinance as yf
import pandas as pd

ticker = yf.Ticker("AAPL")  # replace with actual ticker
从用户请求中提取股票代码,用一段脚本拉取所有和预期相关的数据。
python
import yfinance as yf
import pandas as pd

ticker = yf.Ticker("AAPL")  # 替换为实际股票代码

--- Estimate data ---

--- 预期数据 ---

earnings_est = ticker.earnings_estimate # EPS estimates by period revenue_est = ticker.revenue_estimate # Revenue estimates by period eps_trend = ticker.eps_trend # EPS estimate changes over time eps_revisions = ticker.eps_revisions # Up/down revision counts growth_est = ticker.growth_estimates # Growth rate estimates
earnings_est = ticker.earnings_estimate # 各周期EPS预期 revenue_est = ticker.revenue_estimate # 各周期营收预期 eps_trend = ticker.eps_trend # EPS预期随时间的变化 eps_revisions = ticker.eps_revisions # 上调/下调预期的数量 growth_est = ticker.growth_estimates # 增长率预期

--- Historical context ---

--- 历史背景数据 ---

earnings_hist = ticker.earnings_history # Track record info = ticker.info # Company basics quarterly_income = ticker.quarterly_income_stmt # Recent actuals
undefined
earnings_hist = ticker.earnings_history # 历史业绩记录 info = ticker.info # 公司基础信息 quarterly_income = ticker.quarterly_income_stmt # 近期实际业绩
undefined

What each data source provides

各数据源的作用

Data SourceWhat It ShowsWhy It Matters
earnings_estimate
Current EPS consensus by period (0q, +1q, 0y, +1y)The estimate levels — what analysts expect
revenue_estimate
Current revenue consensus by periodTop-line expectations
eps_trend
How the EPS estimate has changed (7d, 30d, 60d, 90d ago)Revision direction — rising or falling expectations
eps_revisions
Count of upward vs downward revisions (7d, 30d)Revision breadth — are most analysts raising or cutting?
growth_estimates
Growth rate estimates vs peers and sectorRelative positioning
earnings_history
Actual vs estimated for last 4 quartersCalibration — how good are these estimates historically?

数据源展示内容价值
earnings_estimate
各周期(当季、下一季、当年、下一年)当前EPS共识预期预期水平——分析师的普遍预测值
revenue_estimate
各周期当前营收共识预期营收端预期
eps_trend
EPS预期的变化情况(7天前、30天前、60天前、90天前)修正方向——预期是上升还是下降
eps_revisions
上调vs下调预期的数量(7天、30天维度)修正广度——大多数分析师是上调还是下调预期?
growth_estimates
与同行及行业对比的增长率预期相对定位
earnings_history
过去4个季度实际业绩vs预期校准参考——历史上这些预期的准确度如何?

Step 3: Route Based on User Intent

步骤3:根据用户意图调整输出

The user might want different levels of analysis. Route accordingly:
User RequestFocus AreaKey Sections
General estimate analysisFull analysisAll sections
"How have estimates changed"Revision trendsEPS Trend + Revisions
"What are analysts expecting"Current consensusEstimate overview
"Growth estimates"Growth projectionsGrowth Estimates
"Bull vs bear case"Estimate rangeHigh/low spread analysis
Compare estimates across periodsMulti-periodPeriod comparison table
When in doubt, provide the full analysis — more context is better.

用户可能需要不同深度的分析,对应调整输出内容:
用户请求聚焦领域核心输出模块
通用预期分析全量分析所有模块
"预期发生了什么变化"修正趋势EPS趋势+修正数据
"分析师的预期是什么"当前共识预期概览
"增长预期"增长预测增长预期模块
"多空情况对比"预期区间高低值价差分析
跨周期对比预期多周期对比周期对比表格
如果无法确定需求,优先提供全量分析——更多背景信息总是更好的。

Step 4: Build the Estimate Analysis

步骤4:生成预期分析内容

Section 1: Estimate Overview

模块1:预期概览

Present the current consensus for all available periods from
earnings_estimate
and
revenue_estimate
:
EPS Estimates:
PeriodConsensusLowHighRange Width# AnalystsYoY Growth
Current Qtr (0q)$1.42$1.35$1.50$0.15 (10.6%)28+12.7%
Next Qtr (+1q)$1.58$1.48$1.68$0.20 (12.7%)25+8.3%
Current Year (0y)$6.70$6.50$6.95$0.45 (6.7%)30+10.2%
Next Year (+1y)$7.45$7.10$7.85$0.75 (10.1%)28+11.2%
Revenue Estimates:
PeriodConsensusLowHigh# AnalystsYoY Growth
Current Qtr$94.3B$92.1B$96.8B25+5.4%
Next Qtr$102.1B$99.5B$105.0B22+6.1%
Calculate and flag:
  • Range width as % of consensus — wide ranges (>15%) signal high uncertainty
  • Analyst coverage — fewer than 5 analysts means thin coverage, note this
  • Growth trajectory — is growth accelerating or decelerating across periods?
基于
earnings_estimate
revenue_estimate
的数据,展示所有可用周期的当前共识预期:
EPS预期:
周期共识预期最低预期最高预期区间宽度分析师数量同比增长率
当季 (0q)$1.42$1.35$1.50$0.15 (10.6%)28+12.7%
下一季 (+1q)$1.58$1.48$1.68$0.20 (12.7%)25+8.3%
当年 (0y)$6.70$6.50$6.95$0.45 (6.7%)30+10.2%
下一年 (+1y)$7.45$7.10$7.85$0.75 (10.1%)28+11.2%
营收预期:
周期共识预期最低预期最高预期分析师数量同比增长率
当季$94.3B$92.1B$96.8B25+5.4%
下一季$102.1B$99.5B$105.0B22+6.1%
计算并标注以下内容:
  • 区间宽度占共识预期的百分比——宽区间(>15%)代表不确定性高
  • 分析师覆盖度——少于5位分析师覆盖意味着数据可信度低,需要特别标注
  • 增长轨迹——跨周期来看增长是在加速还是减速?

Section 2: Revision Trends (EPS Trend)

模块2:修正趋势(EPS趋势)

This is often the most actionable section. From
eps_trend
, show how estimates have moved:
PeriodCurrent7 Days Ago30 Days Ago60 Days Ago90 Days Ago
Current Qtr$1.42$1.41$1.40$1.38$1.35
Next Qtr$1.58$1.57$1.56$1.55$1.54
Current Year$6.70$6.68$6.65$6.58$6.50
Next Year$7.45$7.43$7.40$7.35$7.28
Summarize the trend: "Current quarter EPS estimates have risen 5.2% over the last 90 days, with most of the increase in the last 30 days — accelerating upward revision momentum."
Key interpretation:
  • Rising estimates ahead of earnings = positive setup (the bar is rising)
  • Falling estimates = analysts cutting numbers, often a negative signal
  • Flat estimates = no new information being priced in
  • Recent acceleration/deceleration matters more than the total move
这通常是最具参考性的模块。基于
eps_trend
展示预期的变化情况:
周期当前预期7天前30天前60天前90天前
当季$1.42$1.41$1.40$1.38$1.35
下一季$1.58$1.57$1.56$1.55$1.54
当年$6.70$6.68$6.65$6.58$6.50
下一年$7.45$7.43$7.40$7.35$7.28
总结趋势:"当季EPS预期在过去90天累计上涨5.2%,大部分涨幅出现在最近30天——上修动能正在加速。"
核心解读:
  • 业绩披露前预期上升=正面信号(预期门槛在提高)
  • 预期下降=分析师正在下调盈利预测,通常是负面信号
  • 预期持平=没有新信息被定价
  • 近期的加速/减速变化比整体变动幅度更重要

Section 3: Revision Breadth (EPS Revisions)

模块3:修正广度(EPS修正)

From
eps_revisions
, show the up vs. down count:
PeriodUp (last 7d)Down (last 7d)Up (last 30d)Down (last 30d)
Current Qtr51123
Next Qtr3285
Calculate a revision ratio: Up / (Up + Down). Ratios above 0.7 are strongly bullish; below 0.3 are bearish.
基于
eps_revisions
展示上调和下调预期的数量:
周期近7天上调近7天下调近30天上调近30天下调
当季51123
下一季3285
计算修正比率:上调数量/(上调+下调数量)。比率高于0.7代表明显看多,低于0.3代表明显看空。

Section 4: Growth Estimates

模块4:增长预期

From
growth_estimates
, compare the company's expected growth to benchmarks:
EntityCurrent QtrNext QtrCurrent YearNext YearPast 5Y Annual
AAPL+12.7%+8.3%+10.2%+11.2%+14.5%
Industry+9.1%+7.0%+8.5%+9.0%
Sector+11.3%+8.8%+10.0%+10.5%
S&P 500+7.5%+6.2%+8.0%+8.5%
Highlight whether the company is expected to grow faster or slower than its peers.
基于
growth_estimates
对比公司预期增速和基准水平:
主体当季下一季当年下一年过去5年年度增速
AAPL+12.7%+8.3%+10.2%+11.2%+14.5%
所属行业+9.1%+7.0%+8.5%+9.0%
所属板块+11.3%+8.8%+10.0%+10.5%
标普500+7.5%+6.2%+8.0%+8.5%
标注公司预期增速是高于还是低于同行水平。

Section 5: Historical Estimate Accuracy

模块5:历史预期准确率

From
earnings_history
, assess how reliable estimates have been:
QuarterEstimateActualSurprise %Direction
Q3 2024$1.35$1.40+3.7%Beat
Q2 2024$1.30$1.33+2.3%Beat
Q1 2024$1.52$1.53+0.7%Beat
Q4 2023$2.10$2.18+3.8%Beat
Calculate:
  • Beat rate: X of 4 quarters
  • Average surprise: magnitude and direction
  • Trend in surprise: Are beats getting bigger or smaller? A shrinking surprise with rising estimates could mean the bar is catching up to reality.

基于
earnings_history
评估预期的可靠性:
季度预期值实际值超预期幅度结果
2024年第三季度$1.35$1.40+3.7%超预期
2024年第二季度$1.30$1.33+2.3%超预期
2024年第一季度$1.52$1.53+0.7%超预期
2023年第四季度$2.10$2.18+3.8%超预期
计算:
  • 超预期率:4个季度中有X个季度超预期
  • 平均超预期幅度:数值大小和方向
  • 超预期趋势:超预期幅度是在扩大还是缩小?如果预期上升的同时超预期幅度缩小,可能意味着预期正在接近实际水平。

Step 5: Synthesize and Respond

步骤5:整合输出分析结果

Present the analysis with clear structure:
  1. Lead with the key insight: "AAPL estimates are trending higher across all periods, with positive revision breadth (80% of recent revisions are upward)."
  2. Show the tables for each section the user cares about
  3. Provide interpretive context:
    • Is the revision trend confirming or contradicting the stock's recent price action?
    • How does the growth outlook compare to what's priced into the current P/E?
    • What's the relationship between estimate accuracy history and current estimate levels?
  4. Flag risks and nuances:
    • Estimates cluster around consensus — the "real" distribution of outcomes is wider than low/high suggests
    • Revision momentum can reverse quickly on a single data point (guidance change, macro event)
    • Yahoo Finance estimates may lag behind real-time consensus providers by hours or days
    • Growth estimates for out-years (+1y) are inherently less reliable
结构清晰地展示分析内容:
  1. 开篇点明核心结论:"AAPL所有周期的预期都在走高,修正广度为正(近期80%的预期修正为上调)。"
  2. 展示用户关心的各模块表格
  3. 提供解读背景
    • 修正趋势和股票近期价格走势是一致还是背离?
    • 增长前景和当前市盈率所定价的预期相比如何?
    • 历史预期准确率和当前预期水平有什么关联?
  4. 标注风险和细节
    • 预期大多围绕共识值聚集——实际结果的分布范围比高低预期区间更广
    • 单个数据点(指引变化、宏观事件)可能快速逆转修正动能
    • Yahoo Finance的预期可能比实时共识数据滞后数小时到数天
    • 远期(下一年)的增长预期本身可靠性更低

Caveats to always include

必须包含的免责声明

  • Analyst estimates reflect a consensus view, not certainty
  • Estimate revisions are a signal but not a guarantee of future performance
  • This is not financial advice

  • 分析师预期仅反映共识观点,不代表确定性结论
  • 预期修正只是信号,不保证未来业绩表现
  • 本内容不构成投资建议

Reference Files

参考文件

  • references/api_reference.md
    — Detailed yfinance API reference for all estimate-related methods
Read the reference file when you need exact return formats or edge case handling.
  • references/api_reference.md
    ——所有预期相关方法的详细yfinance API参考
如果需要确切的返回格式或边缘case处理方法,请查阅参考文件。