Earnings Preview Skill

Generate a pre-earnings briefing for any stock using Yahoo Finance data.

How to use it

Claude Code
  1. Run the line below. It pulls the whole folder into ~/.claude/skills/earnings-preview.
  2. Describe your job in plain words. Claude Code follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit himself65/finance-skills/plugins/market-analysis/skills/earnings-preview#main ~/.claude/skills/earnings-preview

For one project only, change the path to .claude/skills/earnings-preview.

Claude (web or desktop app)
  1. On this page open ⋯ → Download .md.
  2. Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
  3. Pick the file and Save. Claude shows the name and description and runs a security scan.
  4. Check the skill is switched on.
  5. Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
  1. ChatGPT: make a Project and paste it into Instructions.
  2. Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
  • Check which app you pasted it into — the steps above name the right one.
  • Some skills need the paid tier of Claude or ChatGPT.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Source of Earnings Preview Skill

Show the full text170 lines
namedescription
earnings-preview> 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 "exec('try:\n import yfinance\n print(\'yfinance \' + yfinance.__version__ + \' installed\')\nexcept Exception:\n print(\'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 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.

1---
2name: earnings-preview
3description: >
4 Generate a pre-earnings briefing for any stock using Yahoo Finance data.
5 Use this skill whenever the user wants to prepare for an upcoming earnings report,
6 understand what analysts expect, review a company's beat/miss track record,
7 or get a quick overview before an earnings call.
8 Triggers include: "earnings preview for AAPL", "what to expect from TSLA earnings",
9 "MSFT reports next week", "earnings preview", "pre-earnings analysis",
10 "what are analysts expecting for NVDA", "earnings estimates for",
11 "will GOOGL beat earnings", "earnings beat/miss history",
12 "upcoming earnings", "before earnings", "earnings setup",
13 "consensus estimates", "earnings whisper", "EPS expectations",
14 "what's the street expecting", "earnings season preview",
15 any mention of preparing for or previewing an earnings report,
16 or any request to understand expectations ahead of a company's earnings date.
17 Always use this skill when the user mentions a ticker in context of upcoming earnings,
18 even if they don't say "preview" explicitly.
19---
20 
21# Earnings Preview Skill
22 
23Generates a pre-earnings briefing using Yahoo Finance data via [yfinance](https://github.com/ranaroussi/yfinance). Pulls together upcoming earnings date, consensus estimates, historical accuracy, analyst sentiment, and key financial context — everything you need before an earnings call.
24 
25**Important**: Data is for research and educational purposes only. Not financial advice. yfinance is not affiliated with Yahoo, Inc.
26 
27---
28 
29## Step 1: Ensure yfinance Is Available
30 
31**Current environment status:**
32 
33```
34!`python3 -c "exec('try:\n import yfinance\n print(\'yfinance \' + yfinance.__version__ + \' installed\')\nexcept Exception:\n print(\'YFINANCE_NOT_INSTALLED\')')"`
35```
36 
37If `YFINANCE_NOT_INSTALLED`, install it:
38 
39```python
40import subprocess, sys
41subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance"])
42```
43 
44If already installed, skip to the next step.
45 
46---
47 
48## Step 2: Identify the Ticker and Gather All Data
49 
50Extract 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.
51 
52```python
53import yfinance as yf
54import pandas as pd
55from datetime import datetime
56 
57ticker = yf.Ticker("AAPL") # replace with actual ticker
58 
59# --- Core data ---
60info = ticker.info
61calendar = ticker.calendar
62 
63# --- Estimates ---
64earnings_est = ticker.earnings_estimate
65revenue_est = ticker.revenue_estimate
66 
67# --- Historical track record ---
68earnings_hist = ticker.earnings_history
69 
70# --- Analyst sentiment ---
71price_targets = ticker.analyst_price_targets
72recommendations = ticker.recommendations
73 
74# --- Recent financials for context ---
75quarterly_income = ticker.quarterly_income_stmt
76quarterly_cashflow = ticker.quarterly_cashflow
77```
78 
79### What to extract from each source
80 
81| Data Source | Key Fields | Purpose |
82|---|---|---|
83| `calendar` | Earnings Date, Ex-Dividend Date | When earnings are and key dates |
84| `earnings_estimate` | avg, low, high, numberOfAnalysts, yearAgoEps, growth (for 0q, +1q, 0y, +1y) | Consensus EPS expectations |
85| `revenue_estimate` | avg, low, high, numberOfAnalysts, yearAgoRevenue, growth | Revenue expectations |
86| `earnings_history` | epsEstimate, epsActual, epsDifference, surprisePercent | Beat/miss track record |
87| `analyst_price_targets` | current, low, high, mean, median | Street price targets |
88| `recommendations` | Buy/Hold/Sell counts | Sentiment distribution |
89| `quarterly_income_stmt` | TotalRevenue, NetIncome, BasicEPS | Recent trajectory |
90 
91---
92 
93## Step 3: Build the Earnings Preview
94 
95Assemble the data into a structured briefing. The goal is to give the user everything they need in one glance.
96 
97### Section 1: Earnings Date & Key Info
98 
99Report the upcoming earnings date from `calendar`. Include:
100- Company name, ticker, sector, industry
101- Upcoming earnings date (and whether it's before/after market)
102- Current stock price and recent performance (1-week, 1-month)
103- Market cap
104 
105### Section 2: Consensus Estimates
106 
107Present the current quarter estimates from `earnings_estimate` and `revenue_estimate`:
108 
109| Metric | Consensus | Low | High | # Analysts | Year Ago | Growth |
110|---|---|---|---|---|---|---|
111| EPS | $1.42 | $1.35 | $1.50 | 28 | $1.26 | +12.7% |
112| Revenue | $94.3B | $92.1B | $96.8B | 25 | $89.5B | +5.4% |
113 
114If the estimate range is unusually wide (high/low spread > 20% of consensus), note that as a sign of high uncertainty.
115 
116### Section 3: Historical Beat/Miss Track Record
117 
118From `earnings_history`, show the last 4 quarters:
119 
120| Quarter | EPS Est | EPS Actual | Surprise | Beat/Miss |
121|---|---|---|---|---|
122| Q3 2024 | $1.35 | $1.40 | +3.7% | Beat |
123| Q2 2024 | $1.30 | $1.33 | +2.3% | Beat |
124| Q1 2024 | $1.52 | $1.53 | +0.7% | Beat |
125| Q4 2023 | $2.10 | $2.18 | +3.8% | Beat |
126 
127Summarize: "AAPL has beaten EPS estimates in 4 of the last 4 quarters by an average of 2.6%."
128 
129### Section 4: Analyst Sentiment
130 
131From `recommendations` and `analyst_price_targets`:
132 
133- Current recommendation distribution (Strong Buy / Buy / Hold / Sell / Strong Sell)
134- Price target range: low, mean, median, high vs. current price
135- Implied upside/downside from mean target
136 
137### Section 5: Key Metrics to Watch
138 
139Based on the quarterly financials, highlight 3-5 things the market will focus on:
140- Revenue growth trend (accelerating or decelerating?)
141- Margin trajectory (expanding or compressing?)
142- Any notable line items that changed significantly quarter-over-quarter
143- Segment breakdowns if available in the data
144 
145This section requires judgment — think about what matters for this specific company/sector.
146 
147---
148 
149## Step 4: Respond to the User
150 
151Present the preview as a clean, structured briefing:
152 
1531. **Lead with the headline**: "AAPL reports earnings on [date]. Here's what to expect."
1542. **Show all 5 sections** with clear headers and tables
1553. **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)
156 
157### Caveats to include
158- Estimates can change up until the report date
159- Historical beats don't guarantee future beats
160- Yahoo Finance data may lag real-time consensus by a few hours
161- This is not financial advice
162 
163---
164 
165## Reference Files
166 
167- `references/api_reference.md` — Detailed yfinance API reference for earnings and estimate methods
168 
169Read the reference file when you need exact method signatures or edge case handling.
170 

Discussion

Alternatives

Also in Reports & dashboardsSee all 47 in Data & analytics →