Earnings Recap Skill

Generate a post-earnings analysis 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-recap.
  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-recap#main ~/.claude/skills/earnings-recap

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

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 Recap Skill

Show the full text190 lines
namedescription
earnings-recap> Generate a post-earnings analysis for any stock using Yahoo Finance data. Use when the user wants to review what happened after earnings, understand beat/miss results, see stock reaction, or get an earnings recap. Triggers: "AAPL earnings recap", "how did TSLA earnings go", "MSFT earnings results", did NVDA beat earnings", "post-earnings analysis", "earnings surprise", what happened with GOOGL earnings", "earnings reaction", stock moved after earnings", "EPS beat or miss", "revenue beat or miss", quarterly results for", "how were earnings", "AMZN reported last night", earnings call recap", or any request about a company's recent earnings outcome. Use this skill when the user references a past earnings event, even if they just say "AAPL reported" or "how did they do".

Earnings Recap Skill

Generates a post-earnings analysis using Yahoo Finance data via yfinance. Covers the actual vs estimated numbers, surprise magnitude, stock price reaction, and financial context — a complete picture of what happened.

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 Data

Extract the ticker from the user's request. Fetch all relevant post-earnings data in one script.

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

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

# --- Earnings result ---
earnings_hist = ticker.earnings_history

# --- Financial statements ---
quarterly_income = ticker.quarterly_income_stmt
quarterly_cashflow = ticker.quarterly_cashflow
quarterly_balance = ticker.quarterly_balance_sheet

# --- Price reaction ---
# Get ~30 days of history to capture the reaction window
hist = ticker.history(period="1mo")

# --- Context ---
info = ticker.info
news = ticker.news
recommendations = ticker.recommendations
What to extract
Data Source Key Fields Purpose
earnings_history epsEstimate, epsActual, epsDifference, surprisePercent Beat/miss result
quarterly_income_stmt TotalRevenue, GrossProfit, OperatingIncome, NetIncome, BasicEPS Actual financials
history() Close prices around earnings date Stock price reaction
info currentPrice, marketCap, forwardPE Current context
news Recent headlines Earnings-related news

Step 3: Determine the Most Recent Earnings

The most recent earnings result is the first row (most recent date) in earnings_history. Use its date to:

  1. Identify the earnings date for the price reaction analysis
  2. Match to the corresponding quarter in the financial statements
  3. Calculate stock price reaction — compare the close before earnings to the next trading day's close (or open, depending on whether earnings were before/after market)
Price reaction calculation
import numpy as np

# Find the earnings date from earnings_history index
earnings_date = earnings_hist.index[0]  # most recent

# Get daily prices around the earnings date
hist_extended = ticker.history(start=earnings_date - timedelta(days=5),
                                end=earnings_date + timedelta(days=5))

# The reaction is typically measured as:
# - Close on the last trading day before earnings -> Close on the first trading day after
# Be careful with before/after market reports
if len(hist_extended) >= 2:
    pre_price = hist_extended['Close'].iloc[0]
    post_price = hist_extended['Close'].iloc[-1]
    reaction_pct = ((post_price - pre_price) / pre_price) * 100

Note: The exact reaction window depends on when the company reported (before market open vs after close). The price data will reflect this — look for the biggest gap between consecutive closes near the earnings date.


Step 4: Build the Earnings Recap

Section 1: Headline Result

Lead with the key numbers:

  • EPS: Actual vs. Estimate, beat/miss by how much, surprise %
  • Revenue: Actual vs. prior year (from quarterly_income_stmt TotalRevenue)
  • Stock reaction: % move on earnings day

Example: "AAPL beat Q3 EPS estimates by 3.7% ($1.40 actual vs $1.35 expected). Revenue grew 5.4% YoY to $94.3B. The stock rose +2.1% on the report."

Section 2: Earnings vs. Estimates Detail
Metric Estimate Actual Surprise
EPS $1.35 $1.40 +$0.05 (+3.7%)

If the user asked about a specific quarter (not the most recent), look further back in earnings_history.

Show the last 4 quarters of key metrics from quarterly_income_stmt:

Quarter Revenue YoY Growth Gross Margin Operating Margin EPS
Q3 2024 $94.3B +5.4% 46.2% 30.1% $1.40
Q2 2024 $85.8B +4.9% 46.0% 29.8% $1.33
Q1 2024 $119.6B +2.1% 45.9% 33.5% $2.18
Q4 2023 $89.5B -0.3% 45.2% 29.2% $1.26

Calculate margins from the raw financials:

  • Gross Margin = GrossProfit / TotalRevenue
  • Operating Margin = OperatingIncome / TotalRevenue
Section 4: Stock Price Reaction
  • The % move on the earnings day/next session
  • How it compares to the stock's average earnings-day move (calculate the average absolute move from the last 4 earnings dates in earnings_history)
  • Where the stock is now relative to the earnings-day move (has it held, given back gains, extended further?)
Section 5: Context & What Changed

Based on the data, note:

  • Whether margins expanded or compressed vs prior quarter
  • Any notable changes in revenue growth trajectory
  • How the beat/miss compares to the stock's historical pattern (from the full earnings_history)
  • Current analyst sentiment from recommendations if available

Step 5: Respond to the User

Present the recap as a clean, structured summary:

  1. Lead with the headline: "AAPL reported Q3 2024 earnings on [date]: Beat EPS by 3.7%, revenue +5.4% YoY."
  2. Show the tables for detail
  3. Highlight what matters: Was this a meaningful beat or a low-bar situation? Is the trend improving or deteriorating?
  4. Keep it factual — present the data, avoid making investment recommendations
Caveats to include
  • Yahoo Finance data may not include all details from the earnings call (guidance, segment breakdowns)
  • Revenue estimates are harder to compare precisely — yfinance provides YoY comparison from financial statements
  • Price reaction may be influenced by broader market moves on the same day
  • This is not financial advice

Reference Files

  • references/api_reference.md — Detailed yfinance API reference for earnings history and financial statement methods

Read the reference file when you need exact method signatures or to handle edge cases in the financial data.

1---
2name: earnings-recap
3description: >
4 Generate a post-earnings analysis for any stock using Yahoo Finance data.
5 Use when the user wants to review what happened after earnings,
6 understand beat/miss results, see stock reaction, or get an earnings recap.
7 Triggers: "AAPL earnings recap", "how did TSLA earnings go", "MSFT earnings results",
8 "did NVDA beat earnings", "post-earnings analysis", "earnings surprise",
9 "what happened with GOOGL earnings", "earnings reaction",
10 "stock moved after earnings", "EPS beat or miss", "revenue beat or miss",
11 "quarterly results for", "how were earnings", "AMZN reported last night",
12 "earnings call recap", or any request about a company's recent earnings outcome.
13 Use this skill when the user references a past earnings event,
14 even if they just say "AAPL reported" or "how did they do".
15---
16 
17# Earnings Recap Skill
18 
19Generates a post-earnings analysis using Yahoo Finance data via [yfinance](https://github.com/ranaroussi/yfinance). Covers the actual vs estimated numbers, surprise magnitude, stock price reaction, and financial context — a complete picture of what happened.
20 
21**Important**: Data is for research and educational purposes only. Not financial advice. yfinance is not affiliated with Yahoo, Inc.
22 
23---
24 
25## Step 1: Ensure yfinance Is Available
26 
27**Current environment status:**
28 
29```
30!`python3 -c "exec('try:\n import yfinance\n print(\'yfinance \' + yfinance.__version__ + \' installed\')\nexcept Exception:\n print(\'YFINANCE_NOT_INSTALLED\')')"`
31```
32 
33If `YFINANCE_NOT_INSTALLED`, install it:
34 
35```python
36import subprocess, sys
37subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance"])
38```
39 
40If already installed, skip to the next step.
41 
42---
43 
44## Step 2: Identify the Ticker and Gather Data
45 
46Extract the ticker from the user's request. Fetch all relevant post-earnings data in one script.
47 
48```python
49import yfinance as yf
50import pandas as pd
51from datetime import datetime, timedelta
52 
53ticker = yf.Ticker("AAPL") # replace with actual ticker
54 
55# --- Earnings result ---
56earnings_hist = ticker.earnings_history
57 
58# --- Financial statements ---
59quarterly_income = ticker.quarterly_income_stmt
60quarterly_cashflow = ticker.quarterly_cashflow
61quarterly_balance = ticker.quarterly_balance_sheet
62 
63# --- Price reaction ---
64# Get ~30 days of history to capture the reaction window
65hist = ticker.history(period="1mo")
66 
67# --- Context ---
68info = ticker.info
69news = ticker.news
70recommendations = ticker.recommendations
71```
72 
73### What to extract
74 
75| Data Source | Key Fields | Purpose |
76|---|---|---|
77| `earnings_history` | epsEstimate, epsActual, epsDifference, surprisePercent | Beat/miss result |
78| `quarterly_income_stmt` | TotalRevenue, GrossProfit, OperatingIncome, NetIncome, BasicEPS | Actual financials |
79| `history()` | Close prices around earnings date | Stock price reaction |
80| `info` | currentPrice, marketCap, forwardPE | Current context |
81| `news` | Recent headlines | Earnings-related news |
82 
83---
84 
85## Step 3: Determine the Most Recent Earnings
86 
87The most recent earnings result is the first row (most recent date) in `earnings_history`. Use its date to:
88 
891. **Identify the earnings date** for the price reaction analysis
902. **Match to the corresponding quarter** in the financial statements
913. **Calculate stock price reaction** — compare the close before earnings to the next trading day's close (or open, depending on whether earnings were before/after market)
92 
93### Price reaction calculation
94 
95```python
96import numpy as np
97 
98# Find the earnings date from earnings_history index
99earnings_date = earnings_hist.index[0] # most recent
100 
101# Get daily prices around the earnings date
102hist_extended = ticker.history(start=earnings_date - timedelta(days=5),
103 end=earnings_date + timedelta(days=5))
104 
105# The reaction is typically measured as:
106# - Close on the last trading day before earnings -> Close on the first trading day after
107# Be careful with before/after market reports
108if len(hist_extended) >= 2:
109 pre_price = hist_extended['Close'].iloc[0]
110 post_price = hist_extended['Close'].iloc[-1]
111 reaction_pct = ((post_price - pre_price) / pre_price) * 100
112```
113 
114**Note**: The exact reaction window depends on when the company reported (before market open vs after close). The price data will reflect this — look for the biggest gap between consecutive closes near the earnings date.
115 
116---
117 
118## Step 4: Build the Earnings Recap
119 
120### Section 1: Headline Result
121 
122Lead with the key numbers:
123- **EPS**: Actual vs. Estimate, beat/miss by how much, surprise %
124- **Revenue**: Actual vs. prior year (from quarterly_income_stmt TotalRevenue)
125- **Stock reaction**: % move on earnings day
126 
127Example: "AAPL beat Q3 EPS estimates by 3.7% ($1.40 actual vs $1.35 expected). Revenue grew 5.4% YoY to $94.3B. The stock rose +2.1% on the report."
128 
129### Section 2: Earnings vs. Estimates Detail
130 
131| Metric | Estimate | Actual | Surprise |
132|---|---|---|---|
133| EPS | $1.35 | $1.40 | +$0.05 (+3.7%) |
134 
135If the user asked about a specific quarter (not the most recent), look further back in `earnings_history`.
136 
137### Section 3: Quarterly Financial Trends
138 
139Show the last 4 quarters of key metrics from `quarterly_income_stmt`:
140 
141| Quarter | Revenue | YoY Growth | Gross Margin | Operating Margin | EPS |
142|---|---|---|---|---|---|
143| Q3 2024 | $94.3B | +5.4% | 46.2% | 30.1% | $1.40 |
144| Q2 2024 | $85.8B | +4.9% | 46.0% | 29.8% | $1.33 |
145| Q1 2024 | $119.6B | +2.1% | 45.9% | 33.5% | $2.18 |
146| Q4 2023 | $89.5B | -0.3% | 45.2% | 29.2% | $1.26 |
147 
148Calculate margins from the raw financials:
149- Gross Margin = GrossProfit / TotalRevenue
150- Operating Margin = OperatingIncome / TotalRevenue
151 
152### Section 4: Stock Price Reaction
153 
154- The % move on the earnings day/next session
155- How it compares to the stock's average earnings-day move (calculate the average absolute move from the last 4 earnings dates in `earnings_history`)
156- Where the stock is now relative to the earnings-day move (has it held, given back gains, extended further?)
157 
158### Section 5: Context & What Changed
159 
160Based on the data, note:
161- Whether margins expanded or compressed vs prior quarter
162- Any notable changes in revenue growth trajectory
163- How the beat/miss compares to the stock's historical pattern (from the full `earnings_history`)
164- Current analyst sentiment from `recommendations` if available
165 
166---
167 
168## Step 5: Respond to the User
169 
170Present the recap as a clean, structured summary:
171 
1721. **Lead with the headline**: "AAPL reported Q3 2024 earnings on [date]: Beat EPS by 3.7%, revenue +5.4% YoY."
1732. **Show the tables** for detail
1743. **Highlight what matters**: Was this a meaningful beat or a low-bar situation? Is the trend improving or deteriorating?
1754. **Keep it factual** — present the data, avoid making investment recommendations
176 
177### Caveats to include
178- Yahoo Finance data may not include all details from the earnings call (guidance, segment breakdowns)
179- Revenue estimates are harder to compare precisely — yfinance provides YoY comparison from financial statements
180- Price reaction may be influenced by broader market moves on the same day
181- This is not financial advice
182 
183---
184 
185## Reference Files
186 
187- `references/api_reference.md` — Detailed yfinance API reference for earnings history and financial statement methods
188 
189Read the reference file when you need exact method signatures or to handle edge cases in the financial data.
190 

Discussion