Skip to content

Guide · Agent skill

How to use the Yahoo Finance Market Data agent skill (yfinance)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The yfinance skill teaches an AI agent how to pull market data for US, Hong Kong and Canadian stocks, ETFs and indices from Yahoo Finance. It is aimed at analysts, students and developers who want free historical prices, company fundamentals or option chains without an API key. By the end of this guide you will know how to install the skill, ask for data in plain language, and understand the limits of unofficial Yahoo data.

Yahoo Finance Market DataHKUDS/Vibe-Trading · MIT

Quick start

  1. 1Download and unzip. Download the skill ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder.
  2. 2Or upload in the Claude apps. In the Claude apps, open Settings, go to Capabilities, then Skills, and upload the skill.
  3. 3Install Python dependencies. Make sure Python has the yfinance package, or use the Vibe-Trading backtest loaders, and the requests library if you use the direct Yahoo client.
  4. 4Use project ticker format. Write tickers as AAPL.US, 700.HK or TD.TO so the skill can convert them correctly.
  5. 5Ask for the data. Describe the ticker, date range and data type in plain language, for example daily prices or company info.
  6. 6Check the output. Compare key figures with an authoritative source before relying on them for decisions.

What does the yfinance skill make the agent do?

An agent skill is a folder of instructions and reference files that an AI agent loads when a task matches it. This skill, named yfinance, tells the agent how to fetch market data from Yahoo Finance for US, HK and Canadian tickers. It covers historical OHLCV bars (open, high, low, close, volume), company information, financial statements, dividends and splits, institutional and insider holders, indices, ETFs and FX rates.

The skill also teaches the agent the project's ticker format. For example, AAPL.US is converted to AAPL and 700.HK is converted to 0700.HK before the request goes to Yahoo. The data itself needs no API key or account.

How do you install the yfinance skill?

Download the ZIP file for the skill from this page and unzip it. You can then place the folder in one of two locations: ~/.claude/skills/ to make it available to you across projects, or a project's .claude/skills/ folder to limit it to that project.

If you use the Claude apps instead, open Settings, go to Capabilities, and upload the skill under Skills.

  • Personal install: unzip into ~/.claude/skills/
  • Project install: unzip into the project's .claude/skills/
  • Claude apps: Settings → Capabilities → Skills, then upload the skill

What do you need before it works?

The skill needs Python with the yfinance package, or the Vibe-Trading project's backtest loaders. The direct Yahoo client uses the requests library instead, and does not need yfinance installed. Your machine also needs internet access to Yahoo Finance endpoints.

The skill runs scripts and uses the network, so make sure you are comfortable with both before enabling it.

  • Python with the yfinance package, or the Vibe-Trading backtest loaders
  • requests library for the direct Yahoo client
  • Internet access to Yahoo Finance endpoints

How do you trigger the skill with natural requests?

Ask for market data in plain language and name the ticker and the period. The agent matches the request to the skill and uses its instructions. Tickers in the project format, such as AAPL.US, 700.HK or TD.TO, are the safest choice.

For OHLCV bars, the source describes a preferred get_market_data tool when it is available. The skill recommends it over raw yfinance calls for price bars, and uses direct yfinance calls mainly for company info, financial statements, options, holders and insider transactions.

  • Get daily prices for AAPL.US and MSFT.US from 2025-01-01 to 2026-01-01
  • Show the company info and PE ratio for 700.HK
  • Pull the quarterly income statement for TD.TO
  • List the nearest option chain for SPY.US

What does the ticker conversion look like?

The project uses a unified ticker format and the DataLoader converts it to Yahoo's format. US stocks drop the .US suffix, HK stocks keep .HK and are padded to four digits, and Canadian tickers keep .TO or .V unchanged.

  • AAPL.US → AAPL (US stock)
  • SPY.US → SPY (US ETF)
  • 700.HK → 0700.HK (HK stock)
  • 9988.HK → 9988.HK (HK stock)
  • TD.TO → TD.TO (Toronto Stock Exchange)
  • PNG.V → PNG.V (TSX Venture)

What does an OHLCV request look like?

The preferred tool call takes a list of codes, a date range, a source and an interval. The source gives this example:

  • Supported daily and longer intervals: 1d, 5d, 1wk, 1mo, 3mo
  • Hourly data: 1h, up to 730 days of history
  • Minute data: 1m up to 7 days; 2m to 90m up to 60 days
{"codes": ["AAPL.US", "700.HK", "TD.TO", "PNG.V"], "start_date": "2025-01-01", "end_date": "2026-01-01", "source": "yfinance", "interval": "1D"}

What safety points should you know about?

The skill runs scripts and uses the network. Yahoo's endpoints are unofficial and unauthenticated, and Yahoo rate-limits by source IP. The project's client spaces requests through a shared throttle to reduce this risk, but you should still avoid heavy or production workloads.

Yahoo data can be delayed or contain errors, so do not base trading decisions on it when you need real-time or exchange-certified prices. Check any figure that matters against an authoritative source.

  • Yahoo data is unofficial and can change without notice
  • Rate limits apply per IP address
  • Do not use it as the sole source for trading decisions

What people use it for

  • Backtesting a simple strategy on daily prices for AAPL.US and MSFT.US
  • Charting Hong Kong stocks such as 700.HK and 9988.HK against the Hang Seng Index (^HSI)
  • Reviewing quarterly financial statements for a Canadian stock such as TD.TO
  • Pulling an option chain snapshot for a US ticker to see strikes and open interest
  • Checking FX rates such as HKD=X or EURUSD=X for currency-adjusted analysis

Frequently asked questions

Is the yfinance skill free?

The source describes the data as completely free, with no registration or API key required. The skill itself is MIT licensed, and the Yahoo data is unofficial and may be delayed or contain errors.

What do I need to install before using it?

You need Python with the yfinance package, or the Vibe-Trading project's backtest loaders. The direct Yahoo client also needs the requests library, and the machine needs internet access to Yahoo Finance.

Where do I put the skill folder?

Unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder for one project. In the Claude apps, upload it under Settings, then Capabilities, then Skills.

Why does my HK ticker not work as 700.HK?

The skill converts HK tickers to Yahoo format by padding the number to four digits, so 700.HK becomes 0700.HK. Use the project format and let the skill handle the conversion.

Can I use this for real-time trading?

No, the source notes that Yahoo data is unofficial, can be delayed or contain errors. Use an exchange-certified source for trading decisions that depend on real-time prices.

Does Yahoo Finance limit how much I can request?

Yes, Yahoo rate-limits requests by source IP address, and the unofficial endpoints can change without notice. The project spaces its calls to reduce this, but heavy workloads are not a good fit.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use the yfinance skill if you want free historical prices, company fundamentals or option chains for US, Hong Kong and Canadian tickers for research, charting or backtesting. Pick a licensed or exchange-certified data provider if you need real-time prices, guaranteed accuracy or a production workload.

Download the skill