# Yfinance Data

Fetch financial and market data with the yfinance Python library (Yahoo Finance).

- Repository: https://github.com/himself65/finance-skills (3487 stars)
- Category: Business
- License: MIT
- Last updated: 2026-10-25
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add himself65/finance-skills --skill yfinance-data -g -a claude-code -y`
Codex: `npx skills add himself65/finance-skills --skill yfinance-data -g -a codex -y`
Cursor: `npx skills add himself65/finance-skills --skill yfinance-data -g -a cursor -y`
Gemini CLI: `npx skills add himself65/finance-skills --skill yfinance-data -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add himself65/finance-skills`

## Description

Fetch financial and market data with the yfinance Python library (Yahoo Finance). Use this skill whenever the user wants stock data: current quotes and price history, financial statements (income statement, balance sheet, cash flow), options chains, dividends and splits, earnings and analyst estimates, price targets and ratings, institutional and insider holdings, news, multi-ticker comparisons, stock screens, or sector and industry data. Use it even when the user gives only a ticker symbol (AAPL, MSFT, TSLA) and the intent has to be inferred. For earnings previews or recaps, estimate revisions, valuation, correlation, liquidity, or ETF premium analysis, prefer the dedicated skill.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# yfinance Data Skill

If your host has not already executed the shell probes below (for example, in Codex), run the commands inside the `!` wrappers with its shell tool before choosing a setup path. Use the actual output; if shell access is unavailable, report that limitation.

Fetches financial and market data from Yahoo Finance using the [yfinance](https://github.com/ranaroussi/yfinance) Python library.

**Important**: yfinance is not affiliated with Yahoo, Inc. Data is for research and educational purposes.

---

## 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 before running any code:

```python
import subprocess, sys
subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance"])
```

If yfinance is already installed, skip the install step and proceed directly.

---

## Step 2: Identify What the User Needs

Match the user's request to one or more data categories below, then use the corresponding code from `references/api_reference.md`.

The rest: https://github.com/himself65/finance-skills/blob/HEAD/plugins/market-analysis/skills/yfinance-data/SKILL.md
