
Earnings Preview
- 1.7k installs
- 3.1k repo stars
- Updated July 21, 2026
- himself65/finance-skills
earnings-preview is a finance skill for pre-earnings briefs with consensus and key metrics.
About
The earnings-preview skill helps agents prepare pre-earnings briefs summarizing consensus estimates, historical surprise patterns, segment drivers, and metrics investors watch ahead of quarterly reports. It structures previews with revenue and EPS expectations, guidance context, and risk factors that could move the stock on release. Agents gather publicly available analyst consensus and prior quarter comparisons while clearly labeling estimates versus verified actuals. The skill supports finance researchers and content authors producing timely earnings season coverage without inventing unpublished company figures.
- Pre-earnings briefs with consensus revenue and EPS context.
- Historical surprise patterns and segment driver highlights.
- Separates estimates from verified actual reported figures.
- Risk factors and guidance context for release-day moves.
- Supports finance research and earnings season content.
Earnings Preview by the numbers
- 1,700 all-time installs (skills.sh)
- +156 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #85 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
What earnings-preview says it does
earnings preview
npx skills add https://github.com/himself65/finance-skills --skill earnings-previewAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.7k |
|---|---|
| repo stars | ★ 3.1k |
| Security audit | 2 / 3 scanners passed |
| Last updated | July 21, 2026 |
| Repository | himself65/finance-skills ↗ |
What should I watch before this company's earnings report?
Draft earnings preview briefs with consensus estimates and key metrics to watch.
Who is it for?
Finance researchers drafting earnings season preview content.
Skip if: Skip for post-earnings actuals analysis after results are published.
When should I use this skill?
User asks for an earnings preview, consensus, or pre-report briefing.
What you get
Structured preview with estimates, drivers, risks, and historical surprise context.
- pre-earnings briefing report
- consensus EPS and revenue tables
- 4-quarter beat/miss history table
By the numbers
- 935 catalog installs
- 5 briefing sections in each preview report
- Reviews last 4 quarters of EPS beat/miss history
Files
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_cashflowWhat to extract from each source
| Data Source | Key Fields | Purpose |
|---|---|---|
calendar | Earnings Date, Ex-Dividend Date | When earnings are and key dates |
earnings_estimate | avg, low, high, numberOfAnalysts, yearAgoEps, growth (for 0q, +1q, 0y, +1y) | Consensus EPS expectations |
revenue_estimate | avg, low, high, numberOfAnalysts, yearAgoRevenue, growth | Revenue expectations |
earnings_history | epsEstimate, epsActual, epsDifference, surprisePercent | Beat/miss track record |
analyst_price_targets | current, low, high, mean, median | Street price targets |
recommendations | Buy/Hold/Sell counts | Sentiment distribution |
quarterly_income_stmt | TotalRevenue, NetIncome, BasicEPS | Recent 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:
| Metric | Consensus | Low | High | # Analysts | Year Ago | Growth |
|---|---|---|---|---|---|---|
| EPS | $1.42 | $1.35 | $1.50 | 28 | $1.26 | +12.7% |
| Revenue | $94.3B | $92.1B | $96.8B | 25 | $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:
| Quarter | EPS Est | EPS Actual | Surprise | Beat/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 recommendations and analyst_price_targets:
- Current recommendation distribution (Strong Buy / Buy / Hold / Sell / Strong Sell)
- Price target range: low, mean, median, high vs. current price
- Implied upside/downside from mean target
Section 5: Key Metrics to Watch
Based on the quarterly financials, highlight 3-5 things the market will focus on:
- Revenue growth trend (accelerating or decelerating?)
- Margin trajectory (expanding or compressing?)
- Any notable line items that changed significantly quarter-over-quarter
- Segment breakdowns if available in the data
This section requires judgment — think about what matters for this specific company/sector.
---
Step 4: Respond to the User
Present the preview as a clean, structured briefing:
1. Lead with the headline: "AAPL reports earnings on [date]. Here's what to expect." 2. Show all 5 sections with clear headers and tables 3. End with a brief summary: 2-3 sentences capturing the overall setup (bullish/bearish lean based on estimates, track record, and sentiment — frame as "the street expects" not personal recommendation)
Caveats to include
- Estimates can change up until the report date
- Historical beats don't guarantee future beats
- Yahoo Finance data may lag real-time consensus by a few hours
- 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.
Earnings Preview
Generate a pre-earnings briefing for any stock using Yahoo Finance data.
What it does
- Shows upcoming earnings date and key dates
- Presents consensus EPS and revenue estimates with analyst count and range
- Reviews the company's historical beat/miss track record (last 4 quarters)
- Summarizes analyst sentiment (buy/hold/sell distribution, price targets)
- Highlights key metrics to watch based on recent quarterly trends
Triggers
earnings preview for AAPL, what to expect from TSLA earnings, MSFT reports next week, pre-earnings analysis, what are analysts expecting, will GOOGL beat earnings, earnings beat/miss history, upcoming earnings, consensus estimates, EPS expectations, what's the street expecting, earnings season preview
Prerequisites
- Python 3.8+
yfinance(auto-installed if missing)
Platform
All platforms (Claude Code, Claude.ai, other agents)
Setup
No setup required — yfinance pulls data from Yahoo Finance without authentication.
Reference Files
references/api_reference.md— yfinance API reference for earnings and estimate methods
Earnings Preview — yfinance API Reference
Detailed reference for the yfinance methods used by the earnings-preview skill.
---
Calendar
ticker.calendarReturns a dictionary with upcoming events:
Earnings Date— list of datetime objects (usually a range like [start, end])Ex-Dividend Date— next ex-dividend dateDividend Date— next dividend payment date
Edge cases:
- Some tickers return an empty dict if no upcoming events are scheduled
- Earnings dates may show as a 2-day range (the company hasn't specified exact date/time)
---
Earnings Estimate
ticker.earnings_estimateReturns a DataFrame indexed by period:
0q— current quarter+1q— next quarter0y— current year+1y— next year
Columns:
numberOfAnalysts— number of analysts coveringavg— consensus average EPSlow— lowest estimatehigh— highest estimateyearAgoEps— EPS from the same period last yeargrowth— expected growth rate (decimal, e.g., 0.127 = 12.7%)
---
Revenue Estimate
ticker.revenue_estimateSame structure as earnings_estimate but for revenue:
numberOfAnalysts,avg,low,high,yearAgoRevenue,growth
Note: Revenue figures are in raw numbers (not millions/billions). Format appropriately for display.
---
Earnings History
ticker.earnings_historyReturns a DataFrame with the last 4 quarters of actual vs estimated earnings:
Columns:
epsEstimate— consensus EPS estimate at the timeepsActual— reported EPSepsDifference— actual minus estimatesurprisePercent— surprise as a percentage (decimal)
Index is datetime of each earnings report.
Note: surprisePercent is already in decimal form (0.037 = 3.7%). Multiply by 100 for display.
---
Analyst Price Targets
ticker.analyst_price_targetsReturns a dictionary:
current— current pricelow— lowest analyst targethigh— highest analyst targetmean— average targetmedian— median target
---
Recommendations
ticker.recommendationsReturns a DataFrame with recommendation counts by period. Columns typically:
strongBuy,buy,hold,sell,strongSell- Index represents the period
Use the most recent row for current analyst sentiment distribution.
---
Quarterly Financial Statements
ticker.quarterly_income_stmt # Income statement
ticker.quarterly_balance_sheet # Balance sheet
ticker.quarterly_cashflow # Cash flowEach returns a DataFrame with financial line items as rows and quarter dates as columns (most recent first).
Key income statement rows for earnings preview:
Total RevenueGross ProfitOperating IncomeNet IncomeBasic EPS/Diluted EPSEBITDA
Tip: Compare the last 2-4 quarters to identify trends in revenue growth, margin expansion/compression, and EPS trajectory.
---
Company Info
ticker.infoKey fields for context:
shortName— company namesector,industry— classificationmarketCap— market capitalizationcurrentPrice— current stock pricepreviousClose— last closing pricetrailingPE,forwardPE— P/E ratiosfiftyTwoWeekHigh,fiftyTwoWeekLow— 52-week range
---
Historical Prices (for recent performance)
# 1-month performance
hist = ticker.history(period="1mo")
# 1-week performance
hist = ticker.history(period="5d")Use to calculate % change for recent performance context.
---
Error Handling
Always wrap data fetches in try/except:
try:
data = ticker.earnings_estimate
if data is None or (hasattr(data, 'empty') and data.empty):
print("No earnings estimate data available")
except Exception as e:
print(f"Error: {e}")Common issues:
- No calendar data: Company hasn't announced next earnings date
- Empty estimates: Ticker may not have analyst coverage (small caps, foreign stocks)
- Stale data: Yahoo Finance estimates may not update in real-time; note this to the user
Related skills
How it compares
Pick earnings-preview over generic yfinance-data queries when you need a full pre-report briefing with consensus tables, 4-quarter beat/miss history, and analyst sentiment in one pass.
FAQ
Does it invent company figures?
No; estimates are labeled and actuals require verified published sources.
What metrics are covered?
Revenue, EPS consensus, guidance context, and segment drivers.
When should I use it?
Before quarterly earnings releases for preview briefs and watchlists.
Is Earnings Preview safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.