AgentSkillsCN

yahoo-finance

Yahoo Finance 提供的金融数据:股票/债券价格、信用分析、宏观仪表盘、外汇汇率、ETF 流动、基本面信息,以及新闻资讯。当用户询问股票价格、债券收益率、信用指标、杠杆比率、债务/EBITDA、利息保障倍数、宏观指标(VIX、DXY、国债收益率、石油、黄金、BTC)、拉美外汇(ARS、BRL、CLP、MXN、COP)、ETF 持仓、损益表、资产负债表、现金流、财经新闻、期权链、股息历史,或分析师评级与升级信息时,此工具将为您提供全面支持。命令包括:yf price、yf quote、yf compare、yf credit、yf macro、yf fx、yf flows、yf history、yf fundamentals、yf news、yf search、yf options、yf dividends、yf ratings。

SKILL.md
--- frontmatter
name: yahoo-finance
description: >
  Financial data from Yahoo Finance: stock/bond prices, credit analysis, macro dashboard,
  FX rates, ETF flows, fundamentals, and news. Use when the user asks about stock prices,
  bond yields, credit metrics, leverage ratios, debt/ebitda, interest coverage, macro
  indicators (VIX, DXY, treasury yields, oil, gold, BTC), LatAm FX (ARS, BRL, CLP, MXN, COP),
  ETF holdings, income statements, balance sheets, cash flow, financial news, options chains,
  dividend history, or analyst ratings/upgrades.
  Commands: yf price, yf quote, yf compare, yf credit, yf macro, yf fx, yf flows, yf history,
  yf fundamentals, yf news, yf search, yf options, yf dividends, yf ratings.
license: MIT
compatibility: Requires Python 3.10+ and uv
allowed-tools: Read Bash(yf:*)
metadata:
  author: 0juano
  version: "1.0.0"
  openclaw:
    emoji: "📈"
    requires:
      bins: ["uv", "python3"]
    install:
      - id: uv
        kind: download
        url: https://astral.sh/uv/install.sh
        bins: ["uv"]
        label: "Install uv (Python package manager)"

Yahoo Finance CLI

Financial data terminal powered by Yahoo Finance. All commands via the yf script.

Setup

The script is at {baseDir}/scripts/yf. It uses uv run --script with inline PEP 723 metadata — dependencies install automatically on first run.

bash
chmod +x {baseDir}/scripts/yf

Commands

CommandPurposeExample
yf price TICKERQuick price + change + volumeyf price YPF
yf quote TICKERDetailed quote (52w, PE, yield)yf quote AAPL
yf compare T1,T2,T3Side-by-side comparison tableyf compare YPF,PAM,GGAL
yf credit TICKERCredit analysis: leverage, coverage, debt maturityyf credit YPF
yf macroMorning macro dashboard (UST, DXY, VIX, oil, gold, BTC, ARS)yf macro
yf fx [BASE]LatAm FX rates (ARS, BRL, CLP, MXN, COP)yf fx USD
yf flows ETFETF top holdings + fund datayf flows EMB
yf history TICKER [PERIOD]Price history (1d/5d/1mo/3mo/6mo/1y/ytd/max)yf history YPF 3mo
yf fundamentals TICKERFull financials (IS, BS, CF)yf fundamentals YPF
yf news TICKERRecent news headlinesyf news YPF
yf search QUERYFind tickersyf search "argentina bond"

All commands support --json for machine-readable output.

When to Use Which Command

  • Morning check: yf macro → get UST yields, DXY, VIX, commodities, BTC, ARS in one shot
  • Quick look: yf price TICKER → fast price/change/volume
  • Deep dive equity: yf quoteyf fundamentalsyf history
  • Credit analysis: yf credit TICKER → leverage ratios, interest coverage, debt breakdown
  • EM/LatAm FX: yf fx → all major LatAm pairs vs USD
  • ETF research: yf flows ETF → top holdings, AUM, expense ratio
  • Comparison: yf compare → side-by-side for relative value

Error Handling

The script handles bad tickers, missing data, and rate limits gracefully with clear error messages. If Yahoo Finance rate-limits, wait a moment and retry.

Output

By default, output uses Rich tables for clean terminal display. Add --json to any command for structured JSON output suitable for piping or further processing.