Skip to content

himself65/finance-skills / plugins/market-analysis/skills/earnings-preview

earnings-preview

Verified

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.

FileKindSize
README.mdmarkdown1.1 KB
SKILL.mdskill md5.9 KB
references/api_reference.mdmarkdown4.7 KB

references/api_reference.md

View on GitHub
# Earnings Preview — yfinance API Reference

Detailed reference for the yfinance methods used by the earnings-preview skill.

---

## Calendar

```python
ticker.calendar
```

Returns a dictionary with upcoming events:
- `Earnings Date` — list of datetime objects (usually a range like [start, end])
- `Ex-Dividend Date` — next ex-dividend date
- `Dividend 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

```python
ticker.earnings_estimate
```

Returns a DataFrame indexed by period:
- `0q` — current quarter
- `+1q` — next quarter
- `0y` — current year
- `+1y` — next year

Columns:
- `numberOfAnalysts` — number of analysts covering
- `avg` — consensus average EPS
- `low` — lowest estimate
- `high` — highest estimate
- `yearAgoEps` — EPS from the same period last year
- `growth` — expected growth rate (decimal, e.g., 0.127 = 12.7%)

---

## Revenue Estimate

```python
ticker.revenue_estimate
```

Same 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

```python
ticker.earnings_history
```

Returns a DataFrame with the last 4 quarters of actual vs estimated earnings:

Columns:
- `epsEstimate` — consensus EPS estimate at the time
- `epsActual` — reported EPS
- `epsDifference` — actual minus estimate
- `surprisePercent` — surprise as a percentage (decimal)

Index (`quarter`) is the fiscal quarter-end date, oldest first — not the announcement date. Use `ticker.get_earnings_dates()` for report timestamps.

**Note**: `surprisePercent` is already in decimal form (0.037 = 3.7%). Multiply by 100 for display.

---

## Earnings Dates

```python
ticker.get_earnings_dates(limit=8)
```

Returns a DataFrame indexed by `Earnings Date` — tz-aware announcement timestamps (America/New_York), newest first, including the next scheduled report.

Columns: `EPS Estimate`, `Reported EPS`, `Surprise(%)` (already in percent, e.g. 6.74).

- The upcoming report is the row with no `Reported EPS`.
- The time of day (US Eastern) gives the timing: at or after 16:00 means after the close; earlier times mean before the open, or occasionally during the session.

---

## Analyst Price Targets

```python
ticker.analyst_price_targets
```

Returns a dictionary:
- `current` — current price
- `low` — lowest analyst target
- `high` — highest analyst target
- `mean` — average target
- `median` — median target

---

## Recommendations

```python
ticker.recommendations
```

Returns 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

```python
ticker.quarterly_income_stmt   # Income statement
ticker.quarterly_balance_sheet  # Balance sheet
ticker.quarterly_cashflow       # Cash flow
```

Each 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 Revenue`
- `Gross Profit`
- `Operating Income`
- `Net Income`
- `Basic EPS` / `Diluted EPS`
- `EBITDA`

**Tip**: Compare the last 2-4 quarters to identify trends in revenue growth, margin expansion/compression, and EPS trajectory.

---

## Company Info

```python
ticker.info
```

Key fields for context:
- `shortName` — company name
- `sector`, `industry` — classification
- `marketCap` — market capitalization
- `currentPrice` — current stock price
- `previousClose` — last closing price
- `trailingPE`, `forwardPE` — P/E ratios
- `fiftyTwoWeekHigh`, `fiftyTwoWeekLow` — 52-week range

---

## Historical Prices (for recent performance)

```python
# 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:

```python
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
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall