yfinance-data

Fetch stock prices, financial statements, options chains, and analyst data via the yfinance Python library.

3.3k|382|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/himself65/finance-skills --skill yfinance-data-himself65
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: yfinance-data
Source: https://github.com/himself65/finance-skills/tree/main/plugins/market-analysis/skills/yfinance-data
Command: npx skills add https://github.com/himself65/finance-skills --skill yfinance-data-himself65

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires yfinance, and includes references (resource) components.

What problem does it solve? Manually looking up stock quotes, financial statements, options chains, and analyst estimates across Yahoo Finance pages is slow and error-prone. This Skill retrieves that market data programmatically through the yfinance Python library so you get structured numbers directly in your conversation. ## Core Features & Use Cases - Market & Quote Data: Pull current prices, historical OHLCV bars, and multi-ticker comparisons with configurable periods and intervals. - Fundamentals & Corporate Actions: Access income statements, balance sheets, cash flow (annual and quarterly), dividends, and stock splits. - Options, Analysts & Ownership: Retrieve full options chains, earnings history, analyst price targets, recommendations, institutional holders, and insider transactions. - Screening & Sectors: Filter stocks with yf.screen() and yf.EquityQuery, and explore sector and industry data. - Use Case: Ask for a comparison of AAPL, MSFT, and GOOGL revenue over the last four quarters, and the Skill downloads the data with yf.download(), formats the income statements, and highlights notable trends. ## Quick Start Ask the agent to get Apple's current stock price, recent earnings history, and analyst price targets using yfinance.

Frequently Asked Questions about yfinance-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get stock price data with yfinance in Python?▼

Create a Ticker object with yf.Ticker("AAPL") and call ticker.history(period="1mo") for OHLCV data, or use ticker.info and ticker.fast_info for current quotes. For multiple tickers, yf.download() fetches data in parallel with multi-threading.

How to download data for multiple stocks at once with yfinance?▼

Use yf.download() with a space-separated ticker string like "AAPL MSFT GOOGL", a date range, and group_by="ticker". It downloads multi-threaded and returns a DataFrame where each ticker's columns are accessible by symbol.

Does yfinance support options chain data?▼

Yes, yfinance exposes options data through ticker.options to list expiration dates and ticker.option_chain(date) to retrieve calls and puts as DataFrames. Columns include strike, bid, ask, volume, openInterest, and impliedVolatility.

Why does yfinance return an empty DataFrame?▼

Empty results usually mean an invalid or delisted ticker, a date range outside available data, or rate limiting from Yahoo Finance. Wrap calls in try/except, check hist.empty, and add delays between requests when fetching many tickers.

How far back does yfinance intraday data go?▼

Intraday history is limited: 1-minute bars cover roughly the last 7 days, 2m to 30m intervals about 60 days, and 60m or 1h intervals about 730 days. For longer ranges, use daily, weekly, or monthly intervals.

Why do I get a timezone comparison error with yfinance data?▼

yfinance returns timezone-aware datetime indices, so comparing with a tz-naive pd.Timestamp raises a TypeError. Either build the comparison timestamp with tz="America/New_York" or strip timezones using index.tz_localize(None).