Установка
SKILL.md
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 "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 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:
- Identify the earnings date for the price reaction analysis
- Match to the corresponding quarter in the financial statements
- 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.
Section 3: Quarterly Financial Trends
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
recommendationsif available
Step 5: Respond to the User
Present the recap as a clean, structured summary:
- Lead with the headline: "AAPL reported Q3 2024 earnings on [date]: Beat EPS by 3.7%, revenue +5.4% YoY."
- Show the tables for detail
- Highlight what matters: Was this a meaningful beat or a low-bar situation? Is the trend improving or deteriorating?
- 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.
Вставить в README
Ссылка на карточку для вашего README — без картинок и счётчиков.
[DarkPlay: earnings-recap](https://darkplay.ru/ai/skills/himself65-finance-skills-earnings-recap)
Из того же репозитория
Похожие скиллы и другие разделы каталога
Самые востребованные скиллов раздела по установкам и звёздам.
find-skillsvercel-labs · Помогает находить и устанавливать навыки агентов по запросам вроде «как сделать X»…
grill-memattpocock · Настойчивое интервью для доработки плана или дизайна.
hyperframesheygen-com · Обязательная точка входа для любых задач по видео, анимации и motion-графике в…
hyperframes-cliheygen-com · Цикл разработки HyperFrames CLI: init, add, render, preview, publish и другие команды.
agent-browservercel-labs · CLI для автоматизации браузера для ИИ-агентов: навигация по страницам, заполнение форм…
media-useheygen-com · Agent Media OS: единый навык для медиа в HyperFrames — BGM, SFX, изображения, голос, LUT.
hyperframes-registryheygen-com · Установка и подключение блоков реестра в композиции HyperFrames через add и catalog.
grill-with-docsmattpocock · Настойчивое интервью для доработки плана или дизайна, попутно создающее документацию (ADR…
improve-codebase-architecturemattpocock · Поиск в кодовой базе возможностей для углубления, визуальный HTML-отчёт о них и детальный…
tddmattpocock · Разработка через тестирование (TDD): red-green-refactor и интеграционные тесты.Соседние разделы каталога: возможно, нужный инструмент живёт там.
claude-md-managementanthropics · Инструменты для поддержки и улучшения файлов CLAUDE.md: проверка качества, фиксация…
earnings-revieweranthropics · От звонка по итогам квартала и отчётности к обновлению модели и черновику заметки
equity-researchanthropics · Инструменты для анализа акций: анализ отчётности, отчёты о начале покрытия и…
sp-globalanthropics · S&P Global — навыки работы с финансовыми данными и аналитикой: справки по компаниям…
sp-globalanthropics · S&P Global — навыки работы с финансовыми данными и аналитикой, включая профили компаний…
self-improving-agentalirezarezvani · Управление авто-памятью: продвижение знаний в CLAUDE.md и правила, извлечение паттернов в…
skillopt-sleepalirezarezvani · Ночная офлайн-самоэволюция агента: сбор сессий, поиск повторяющихся задач, консолидация в…
compound-engineeringeveryinc · Брейншторм, планирование, отладка, ревью и накопление знаний с ИИ-агентами.
agent-archiveanthropics · Agent Archive подключает Claude к базе знаний сообщества об эксплуатации агентов…
analyst-never-sleepanthropics · Персональный аналитик, который работает круглосуточно. Для фундаментальных инвесторов: к…Лучшие ИИ-инструменты для генерации видео
Подборка нейросетей для генерации и монтажа видео. Инструменты, которые превращают текст в готовые ролики, экономят часы на съемках и постпродакшне. Подходит для SMM-специалистов,
VEED.IOVeed
MootionMootion
Sora (OpenAI)OpenAI
viralpulse.appViralpulse
Viral Maker AIViral-makerЛучшие ИИ-инструменты для генерации текста и копирайтинга
Подборка нейросетей для генерации текстов и копирайтинга. Сервисы, которые помогают создавать статьи, посты и рекламные объявления с нуля или по черновику, экономя часы рутинной ра
NeuroscribeNeuroscribe
GoGPTGogpt
НейроТекстерNeuro-texter
ChatGPTOpenAI
Cosmo ScribeCosmoscribe
Memo HelperCopilot33
LibraChatLibrachatЛучшие ИИ-инструменты для генерации изображений
Подборка нейросетей для генерации изображений от фотореализма до концепт-арта. Сервисы, которые экономят часы ручной работы, создавая визуал для блогов, рекламы и дизайна за минуты
MagviMagvi
DALL-E 3OpenAI
SupaLabSupalab
Freestyling.aiFreestyling
ArtGeneration.meArtgeneration
BigjpgBigjpg
Художник от VKVK
Avato AI12ai
Virton AIVirton