yfinance-data
快速接入海量免费市场数据,适合分析与回测
依赖第三方库和网络访问,需注意数据准确性与外部权限
通过 yfinance 获取股票历史数据、财报与期权链
用 Python 的 yfinance 库去抓股票的历史行情、财报、期权链、股息和机构持股等市场数据。任何提到股票代码、价格、财报、期权或想下载行情数据时都可以用。数据来自 Yahoo Finance(通过 yfinance),适合做研究和分析,而不是交易建议。
▸ 展开 SKILL.md 英文原文
Fetch financial and market data using the yfinance Python library. Use this skill whenever the user asks for stock prices, historical data, financial statements, options chains, dividends, earnings, analyst recommendations, or any market data. Triggers include: any mention of stock price, ticker symbol (AAPL, MSFT, TSLA, etc.), "get me the financials", "show earnings", "what's the price of", "download stock data", "options chain", "dividend history", "balance sheet", "income statement", "cash flow", "analyst targets", "institutional holders", "compare stocks", "screen for stocks", or any request involving Yahoo Finance data. Always use this skill even if the user only provides a ticker — infer intent from context.
帮我安装这个 skill:https://raw.githubusercontent.com/himself65/finance-skills/main/plugins/market-analysis/skills/yfinance-data/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/himself65/finance-skills/main/plugins/market-analysis/skills/yfinance-data/SKILL.md"# yfinance Data Skill
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 "import yfinance; print('yfinance ' + yfinance.__version__ + ' installed')" 2>/dev/null || echo "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 install