yfinance

Fetch global market data from Yahoo Finance without an API key.

6.1k|1.2k|Updated Jun 9, 2022
One-click install
npx skills add https://github.com/charliedream1/ai_quant_trade --skill yfinance-charliedream1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: yfinance
Source: https://github.com/charliedream1/ai_quant_trade/tree/main/a_%E5%85%A8%E7%BD%91%E4%BC%98%E7%A7%80%E8%B5%84%E6%BA%90/10_%E5%A4%A7%E6%A8%A1%E5%9E%8B/07_skill%E5%8C%85/vibe_trading_skills/yfinance
Command: npx skills add https://github.com/charliedream1/ai_quant_trade --skill yfinance-charliedream1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Yahoo Finance data access often requires paid APIs or manual scraping; yfinance provides a free, open-source wrapper to retrieve OHLCV, financials, insider transactions, and institutional holdings for US stocks, HK stocks, ETFs, and indices.

Core Features & Use Cases

  • OHLCV and historical price data for multiple markets
  • Fundamental data: company info, financials, dividends, actions
  • Insider and institutional data: insider transactions, major holders, institutional holdings
  • Batch downloads and easy Pandas integration: suited for backtesting, research, and portfolio analysis

Quick Start

Install yfinance and pandas, then download historical data for a ticker to verify results.

Frequently Asked Questions about yfinance

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

FAQPage Schema
How do I fetch Yahoo Finance market data in Python without an API key?

You can fetch Yahoo Finance market data in Python without an API key by using yfinance. It provides a free, open-source wrapper to download OHLCV historical prices, financials, and institutional holdings for US stocks, HK stocks, ETFs, and indices.

Can I batch download historical OHLCV data for multiple tickers into Pandas?

Yes, you can batch download historical OHLCV data for multiple tickers into Pandas using yfinance. It enables seamless Pandas integration and handles ticker format handling for backtesting and research workflows.

Does yfinance provide fundamental data like insider transactions and institutional holdings?

Yes, yfinance provides fundamental data including insider transactions, major holders, and institutional holdings. It also retrieves company info, financials, dividends, and stock actions for comprehensive research.

What is the best free way to get global stock data for backtesting?

The best free way to get global stock data for backtesting is using yfinance. It supplies OHLCV data, financials, and institutional holdings for US stocks, HK stocks, and indices without requiring an API key.

Are there limitations to fetching market data from Yahoo Finance with Python?

While yfinance offers free global market data, limitations include potential rate limiting or data unavailability since it scrapes Yahoo Finance without an official API key. It may not suit high-frequency or real-time trading applications.