| "P/E", "P/B", "PEG" | info | valuation section |
| "P/E trend", "is X's P/E near its 1y high or low", "how has EV/EBITDA shifted over the last year", "valuation cheaper than 5 quarters ago" | valuation | Yahoo's key-statistics historical table — current + last 5 quarter-end snapshots × 9 metrics. Field names match info.valuation.* for clean interop; precision is ~3 sig figs (HTML-scraped display strings) so use info for exact current values, valuation for the trend |
| "compare P/E ranges across tickers", "rank by current vs 1y-low P/E", "which of these is near its valuation peak" | valuation --summary | flat per-ticker: current_* + min_* + max_* for trailing/forward P/E, P/B, EV/EBITDA across the window |
| "what does X do", "sector", "industry" | info | profile section |
| "profit margin", "ROE", "revenue growth", "EPS" | info | fundamentals section |
| "dividend yield", "payout ratio", "ex-div date" | info | dividend section (mind the unit caveat) |
| "analyst target price", "buy/sell rating" | info | analyst section |
| "ETF expense ratio", "AUM", "fund category" | info | fund section (ETFs / mutual funds only) |
| "compare 3+ tickers", "peer screen", "rank by P/E / yield" | info --summary | flat per-ticker dict (~10× smaller than default) for table rendering |
| "when does X report next", "next earnings date" | earnings --summary | next_date is the upcoming-quarter datetime (preserves AMC/BMO timing) |
| "did X beat last quarter", "earnings surprise" | earnings --summary | last_surprise_pct (percent; positive = beat) |
| "X's earnings history", "EPS trend over last N quarters" | earnings --past-only | full reported quarters with estimate/actual/surprise |
| "which of these consistently beats" | earnings --summary | beat_rate_last_4 across multiple tickers |
| "consensus EPS / revenue forecast", "next quarter estimate", "analyst high / low / # analysts", "FY consensus", "estimate revisions / trend", "stock vs market growth", "long-term growth (LTG)" | earnings --estimates | full analyst panel: consensus avg/low/high, 90-day estimate trend, 7d/30d revision counts, broad-market benchmark, LTG. Per-period rows for 0q / +1q / 0y / +1y. ADRs split EPS (USD) and revenue (home ccy) into separate currency fields. See references/earnings.md. |
| "recent IPO with no past reports", "ticker hasn't reported earnings yet" | earnings --estimates | IPO fall-through. The same flag also rescues IPOs from the default not_found: when the calendar scrape returns empty but the analyst panel has data, the response is success with earnings_dates: [], timezone: null, and a coverage_note explaining the empty calendar. Default earnings (without --estimates) returns error_kind: not_found with a hint pointing at this flag. |
| "what's the analyst rating / price target on X" | info (analyst section) | info.analyst.target_mean_price, recommendation_key — static current consensus. For time series of how consensus has shifted, or per-event grade changes, see analyst below |
| "has consensus shifted on X", "any rating upgrades / downgrades recently", "who upgraded / downgraded X", "did Morgan Stanley raise their target", "consensus drift over last 3 months" | analyst | recommendations time series (0m / -1m / -2m / -3m bucket counts) + per-event grade-change feed (upgrades_downgrades) with embedded price-target moves (Raises / Lowers). 977+ rows for major US large-caps going back to ~2012 — use --limit or --summary. Complements info.analyst (static snapshot) and earnings --estimates (EPS forecasts). |
| "compare analyst sentiment across tickers", "rank by % buy / consensus score", "net upgrades last 90d" | analyst --summary | flat per-ticker dict: total_analysts_current, buy_pct_current / buy_pct_change, consensus_score_current (1=strong_buy ... 5=strong_sell — comparable to info.recommendation_mean), 90-day rollups (upgrades_last_90d, target_raises_last_90d), latest event |
| "income statement", "balance sheet", "cash flow", "revenue/FCF trend over N years" | financials | per-statement period lists; scope with --statement income|balance|cashflow |
| "latest quarter", "QoQ revenue", "TTM trailing twelve months" | financials --period quarterly|ttm | ~5–7 most-recent quarters; ttm = 1-row rollup (income + cashflow only) |
| "compare 3+ tickers' revenue / FCF / margins / growth" | financials --summary | flat per-ticker dict + period-over-period growth (*_growth_yoy) |
| "what's the latest news on X", "recent headlines", "what's driving X today" | news | up to ~10 articles per ticker; works for all quote types; use --limit to tighten |
| "latest 10-K / 10-Q / 8-K of X", "recent SEC filings", "any 8-Ks lately" | sec_filings --type 10-K --limit 1 (or --type 8-K --limit 5, etc.) | up to ~75–120 filings ~4 years back (row-bounded, not time-bounded); --type is case-insensitive; use --limit to cap |
| "ADR annual report", "Toyota 20-F", "foreign-issuer interim filings" | sec_filings --type 20-F,6-K | ADRs file 6-K + 20-F (not 10-Q/10-K); non-US primary listings (BMW.DE, 0700.HK) return empty (not SEC-registered) |
| "filings since 2024", "8-Ks in last 30 days", "what's filed lately" | sec_filings --since YYYY-MM-DD or --days N | date floor on filings; combine with --type for "8-Ks last 30d" type questions; mutually exclusive flags (--since is ISO date, --days is rolling-N convenience) |
| "compare filing activity across tickers", "rank by recent 8-Ks", "who's most active in SEC filings" | sec_filings --summary | flat per-ticker dict: total_filings, latest_*_date per headline type (10-K / 10-Q / 8-K / 20-F / 6-K / proxy), filings_last_90d recency count |
| "who owns X", "top institutional holders", "% insider / institution ownership" | holders | rollup pcts + top-10 institutional + top-10 mutualfund holders, one Yahoo call total |
| "compare ownership concentration across tickers", "top-5 institutional %" | holders --summary | flat per-ticker dict + top5_institutions_pct concentration signal |
| "top mutual-fund holders of X", "which Vanguard / iShares funds hold X" | holders | mutualfund section. Mostly broad index trackers; specialist active funds rarely surface |
| "is the CEO buying / selling", "did insiders buy this dip", "Form 4 activity", "current insider holdings", "how many shares does the CEO own" | insiders | three sections in one HTTP: 6-month buy/sell rollup (purchases_summary, all pct_* are FRACTIONS), per-event Form 4 transactions (transactions, last ~24 months, name / position / shares / value / date), current roster (roster, with direct + indirect holdings — sort by shares_owned_directly desc to rank) |
| "net insider buying across tickers", "rank by insider sentiment", "who's the largest insider holder" | insiders --summary | flat per-ticker peer compare: net_shares_purchased / pct_net_shares_purchased, latest_transaction_date (recency), top_insider_by_direct_shares + top_insider_direct_shares |
| "AAPL options chain", "TSLA puts near-the-money", "NVDA implied vol" | options --moneyness 5 | nearest expiry's calls + puts, strikes within ±5% of spot. Default fetch is 1 HTTP per ticker (cheap) — cost doubles when you pin --expiry |
| "AAPL call options expiring 2026-06-19", "TSLA Jan 2027 puts" | options --expiry YYYY-MM-DD | specific expiry; bad date returns error_kind: not_found with available list to pick from |
| "compare ATM IV across NVDA / AMD / AVGO", "put-call ratio", "options sentiment" | options --summary --moneyness 5 | flat per-ticker dict: ATM call/put IV, total volume, PCR by volume and OI; moneyness_pct echoed for self-describing output |
| "what expirations does X have" | options | the expirations array is always populated on success; default fetch is the nearest expiry |
| "what does SPY hold", "top holdings of QQQ", "what stocks are in VTI" | fund_holdings | top 10 positions with weights — the unique capability vs info (which has no holdings detail). ETF / mutual fund only; equity / index / crypto / FX / future return success-with-note carrying the resolved quote_type. Use --limit N for top-N |
| "what's the expense ratio of X", "AUM of SPY", "category of QQQ" | fund_holdings | operations (expense ratio, turnover, AUM in MILLIONS of fund-reporting currency) + fund_overview (category / family / legal type). info has a leaner fund section nominally covering the same headline fields, but its coverage is patchier — verified 2026-05: info.fund.expense_ratio is null for SPY while fund_holdings.operations.expense_ratio returns 0.000945. Prefer fund_holdings for fund metadata; reach for info only if you already need other info sections. Cross-mode warning: info.fund.total_assets is in WHOLE units, fund_holdings.operations.total_net_assets_millions in MILLIONS — 1e6× scale difference for the same metric (see references/fund_holdings.md "Cross-mode AUM unit drift") |
| "ETF sector breakdown", "asset mix of VFIAX", "stock vs bond %" | fund_holdings | sector_weightings + asset_classes (both fractions). Pure bond funds return sector_weightings: {} — use bond_metrics (duration / maturity) and bond_ratings (per-credit-rating %) instead. info has none of these — fund_holdings is the only path |
| "P/E of SPY's holdings", "fund-level P/E / P/B", "duration of AGG" | fund_holdings | equity_metrics (PE / PB / PS / PCF — inverted from Yahoo's raw 1/ratio encoding, surfaced as conventional ratios) + bond_metrics (duration / maturity in years). NB: this is fund-level aggregation, NOT a single stock's P/E (use info for that) |
| "compare 3 ETFs side by side", "rank ETFs by expense / AUM / concentration" | fund_holdings --summary | flat per-fund dict: expense ratio, AUM, top holding + weight, holdings_concentration (sum of weights across holdings_returned rows — read together; for bond ETFs returning 0–1 rows it's NOT "top-10 concentration"), top sector, P/E, P/B, duration |
| "find me stocks where X", "top gainers / losers today", "undervalued growth stocks", "best ETFs", "screen by P/E + dividend + sector" | screener | only discovery mode — every other mode starts from a known ticker. Two paths: --predefined NAME (19 Yahoo saved screens like day_gainers, undervalued_growth_stocks, top_etfs_us) or --query JSON (custom AND/OR tree). Discovery flags: --list-predefined (catalog with descriptions), --list-fields equity|fund|etf (valid fields for custom queries). Output: default JSON envelope, or --format symbols for xargs-friendly ticker lists, or --full for the raw Yahoo payload (~60-85 fields per quote) |
| "who's reporting earnings this week", "earnings calendar next 14 days", "upcoming earnings, large caps only" | calendars --type earnings | market-wide earnings calendar (default window: today + 7). Defaults to Yahoo's most-active filter (~200 most-active US tickers); pass --no-most-active for the firehose, --market-cap 1e10 for large caps only. Distinct from per-ticker earnings.py (which needs a ticker). One HTTP (or 2 with default filter) |
| "upcoming IPOs", "IPO calendar this month", "what's pricing this week" | calendars --type ipo --days 30 | IPO calendar with filing / pricing / amendment dates (full ISO datetime preserved — Yahoo's 04:00 UTC encoding can be off-by-one in EST winter, so we don't truncate), price range, share count, and action status (Expected / Priced / Postponed / Withdrawn) |
| "stock splits this week", "any reverse splits coming up" | calendars --type splits | Splits calendar (forward and reverse) with derived direction field (forward / reverse / even) — no need to compare ratios manually. Empirically dominated by Korean reverse splits — filter consumer-side if you want US only |
| "economic events this week", "CPI / FOMC / GDP calendar", "macro releases next 7 days" | calendars --type economic | Macro calendar (CPI, FOMC, GDP, jobs, etc.) with consensus / actual / prior + best-effort unit field (percent / index_level / thousands / currency). ~48% of events have real intraday event_time; the rest fall back to midnight UTC (date-of-release). Country code in region |
| "what's happening this week", "all market events", "earnings + IPOs + splits in one query" | calendars --type all | Multi-type fetch in one invocation. Each type is a separate HTTP call; output is a list of envelopes (JSON) or per-record record_class-tagged rows (NDJSON / CSV). Pair with --summary for a digest |
| "who reported last week", "IPOs in the past 30 days", "macro releases I missed" | calendars --past-days N | Retrospective scan: window = (today − N) → today. Mutually exclusive with --start / --end / --days |
| "summary of this week's events", "rollup count of earnings / IPOs / splits" | calendars --summary | Per-type counts and aggregates (count_by_timing, count_by_action, count_forward / count_reverse, count_by_region_top10, ...) instead of full event lists. Pairs with --type all for cross-type peer compare |
| "what industries are in the technology sector", "breakdown of healthcare", "biggest sector by market cap" | sectors <key> | Yahoo's curated sector hierarchy. Default fetch = overview + top_companies (2 HTTP). For sector/industry decomposition pass --section industries (sector-only). Use --list-sectors to discover the 11 canonical keys without a network call |
| "top semiconductor stocks", "leading software companies", "best names in oil-and-gas" | sectors <industry-key> | Industry top_companies (sorted by market weight inside the industry). Auto-detects kind from the key. Use --list-industries [SECTOR] to discover canonical industry keys |
| "best technology ETFs", "top mutual funds for healthcare" | sectors <sector-key> --section top_etfs,top_mutual_funds | Yahoo's curated top-10 lists per sector (sector-only sections; industries return coverage_note). Chain a returned symbol into fund_holdings.py for expense ratio + holdings |
| "top performing semiconductor stocks YTD", "fastest-growing software companies" | sectors <industry-key> --section top_performing_companies,top_growth_companies | Industry-only sections. Note: ytd_return and growth_estimate are MULTIPLES (4.7 = +470%), not fractions — see references/sectors.md units |
| "compare 3 sectors side by side", "rank industries by market weight / company count" | sectors --summary KEY1 KEY2 KEY3 | Flat per-key dict for peer compare. Auto-expands --section to all-applicable for the kind, so the rollup fields (top_company / top_industry / top_etf / top_performer) are populated. Mixed-kind runs work but the JSON shape differs per row |
| "what does the technology sector cover", "description of the energy sector" | sectors <key> --section overview | Yahoo's curated sector / industry description, market cap, market weight (FRACTION), and child counts. Cheapest call (1 HTTP after key validation) |
| "is the market open right now", "US market status", "when does the market open today" | market US --section clock | Live market clock (open / close datetimes + status string). Yahoo quirk: always returns US clock regardless of region arg — for non-US live status, read summary row market_state. 2 HTTP cost (yfinance fetches both sections together) |
| "how is Asia trading today", "what's the macro tape look like", "European indexes overview" | market ASIA (or EUROPE / RATES / COMMODITIES) | Yahoo's curated representative quotes for the region (ASIA = 5 INDEX + 1 CURRENCY pair; EUROPE = 4 mixed; RATES = 1 INDEX ^TYX 30Y yield + 1 FUTURE ZN=F 10Y T-Note; COMMODITIES = 2 FUTURE — Brent + Copper). Each row has change_pct (PERCENT) + market_state |
| "is the region green or red right now", "compare US vs Asia vs Europe today" | market --summary US ASIA EUROPE | Cross-region peer compare: per-market avg/best/worst change_pct across featured quotes + top index. Quick "which region is leading today" digest |
| "what crypto / FX is featured", "today's CURRENCIES snapshot" | market CRYPTOCURRENCIES (or CURRENCIES) | Yahoo's curated featured pair (typically 1 row — SOL-USD / MXN=X rotates). Sparse by design; for the full crypto / FX universe use screener --predefined or chain fast_info over explicit pairs |