首页/金融与投资/earnings-preview
E

earnings-preview

by @himself65v
4.5(50)

盘前财报预览,包含一致预期、盈余历史表现及分析师情绪分析。

earnings-previewfinanceanalysisGitHub
安装方式
npx skills add himself65/finance-skills
compare_arrows

Before / After 效果对比

1
使用前

手动收集数据、整理报表,效率低且容易遗漏关键指标

使用后

一键获取专业分析,数据实时更新,覆盖多维度指标

description SKILL.md


name: earnings-preview description: > Generate a pre-earnings briefing for any stock using Yahoo Finance data. Use this skill whenever the user wants to prepare for an upcoming earnings report, understand what analysts expect, review a company's beat/miss track record, or get a quick overview before an earnings call. Triggers include: "earnings preview for AAPL", "what to expect from TSLA earnings", "MSFT reports next week", "earnings preview", "pre-earnings analysis", "what are analysts expecting for NVDA", "earnings estimates for", "will GOOGL beat earnings", "earnings beat/miss history", "upcoming earnings", "before earnings", "earnings setup", "consensus estimates", "earnings whisper", "EPS expectations", "what's the street expecting", "earnings season preview", any mention of preparing for or previewing an earnings report, or any request to understand expectations ahead of a company's earnings date. Always use this skill when the user mentions a ticker in context of upcoming earnings, even if they don't say "preview" explicitly.

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 "import yfinance; print('yfinance ' + yfinance.__version__ + ' installed')" 2>/dev/null || echo "YFINANCE_NOT_INSTALLED"`

If YFINANCE_NOT_INSTALLED, install it:

import subprocess, sys
subprocess.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.

import yfinance as yf
import pandas as pd
from datetime import datetime

ticker = yf.Ticker("AAPL")  # replace with actual ticker

# --- Core data ---
info = ticker.info
calendar = ticker.calendar

# --- Estimates ---
earnings_est = ticker.earnings_estimate
revenue_est = ticker.revenue_estimate

# --- Historical track record ---
earnings_hist = ticker.earnings_history

# --- Analyst sentiment ---
price_targets = ticker.analyst_price_targets
recommendations = ticker.recommendations

# --- Recent financials for context ---
quarterly_income = ticker.quarterly_income_stmt
quarterly_cashflow = ticker.quarterly_cashflow

What to extract from each source

Data SourceKey FieldsPurpose
calendarEarnings Date, Ex-Dividend DateWhen earnings are and key dates
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
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

Assemble the data into a structured briefing. The goal is to give the user everything they need in one glance.

Section 1: Earnings Date & Key Info

Report the upcoming earnings date from calendar. Include:

  • Company name, ticker, sector, industry
  • Upcoming earnings date (and whether it's before/after market)
  • Current stock price and recent performance (1-week, 1-month)
  • Market cap

Section 2: Consensus Estimates

Present the current quarter estimates from earnings_estimate and revenue_estimate:

MetricConsensusLowHigh# AnalystsYear AgoGrowth
EPS$1.42$1.35$1.5028$1.26+12.7%
Revenue$94.3B$92.1B$96.8B25$89.5B+5.4%

If the estimate range is unusually wide (high/low spread > 20% of consensus), note that as a sign of high uncertainty.

Section 3: Historical Beat/Miss Track Record

From earnings_history, show the last 4 quarters:

QuarterEPS EstEPS ActualSurpriseBeat/Miss
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

Summarize: "AAPL has beaten EPS estimates in 4 of the last 4 quarters by an average of 2.6%."

Section 4: Analyst Sentiment

From `recommendation

forum用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价

统计数据

安装量500
评分4.5 / 5.0
版本
更新日期2026年4月6日
对比案例1 组

用户评分

4.5(50)
5
0%
4
0%
3
0%
2
0%
1
0%

为此 Skill 评分

0.0

兼容平台

🔧Claude Code

时间线

创建2026年4月6日
最后更新2026年4月6日