跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

earnings-preview

Build a pre-earnings briefing for a stock from Yahoo Finance data (yfinance): the upcoming report date and timing, consensus EPS and revenue estimates with their range, the beat/miss track record, analyst ratings and price targets, and what to watch in the print. Use this skill whenever the user is preparing for an upcoming earnings report or asks what the street expects — consensus or whisper numbers, EPS expectations, whether a company will beat, an earnings setup, or an earnings-season preview — and whenever a ticker comes up in the context of upcoming earnings, even without the word "preview". For results that are already out, use earnings-recap.

AI 与智能体3.4kplugins/market-analysis/skills/earnings-preview/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/himself65/finance-skills/earnings-preview/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

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

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

# --- Core data ---
info = ticker.info
calendar = ticker.calendar
earnings_dates = ticker.get_earnings_dates(limit=8)  # report timestamps; the upcoming one has no Reported EPS yet
hist = ticker.history(period="1mo")                  # recent price performance

# --- 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
get_earnings_dates()Earnings Date (tz-aware timestamp), EPS Estimate, Reported EPSReport timing: the upcoming row has no Reported EPS; a time at or after 16:00 ET means after the close, earlier times mean before the open
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 (indexed by fiscal quarter-end, oldest first)
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

The briefing should let the user see the setup at a glance. Cover these five areas; if the data for one is missing, say so in a line rather than dropping it.

  1. Date and context — company, ticker, sector and industry; the report date and whether it lands before the open or after the close; current price with 1-week and 1-month performance; market cap.
  2. Consensus estimates — a table of this quarter's EPS and revenue consensus with low, high, analyst count, year-ago value, and expected growth. A high/low spread wider than about 20% of consensus signals unusual uncertainty; say so when you see it.
  3. Beat/miss track record — the last four quarters of estimated vs actual EPS with surprise %, summarized as a beat count and average surprise.
  4. Analyst sentiment — the rating distribution (strong buy through strong sell) and the price-target range (low, mean, median, high), with the implied upside or downside from the mean target.
  5. What to watch — the few things the market will focus on in this print, chosen for this company and sector: revenue growth accelerating or decelerating, margins expanding or compressing, line items that moved sharply quarter over quarter, and segment trends where the data has them. This is the judgment part of the briefing.

Step 4: Respond to the User

Open with the headline — the report date and a one-line read of the setup — then the five areas above, using tables where they help. Close with a short read of the overall setup drawn from the estimates, track record, and sentiment, framed as what the street expects rather than a recommendation.

Include the caveats that apply: estimates can change until the report date, past beats don't guarantee future ones, Yahoo Finance consensus can lag real-time providers by a few hours, and 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.

相似的 Skill

brand-guidelines
anthropics/skills180k

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

AI 与智能体

internal-comms
anthropics/skills180k

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

AI 与智能体

template-skill
anthropics/skills180k

template-skill

Replace with description of the skill and when Claude should use it.

AI 与智能体

mcp-builder
anthropics/skills180k

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

AI 与智能体

algorithmic-art
anthropics/skills180k

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

AI 与智能体

academy-guide
anthropics/skills180k

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

AI 与智能体