home / skills / 0juano / agent-skills / yahoo-finance

yahoo-finance skill

/yahoo-finance

This skill retrieves and analyzes Yahoo Finance data via CLI to help you monitor prices, fundamentals, macro indicators, and news efficiently.

npx playbooks add skill 0juano/agent-skills --skill yahoo-finance

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
3.3 KB
---
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

| Command | Purpose | Example |
|---------|---------|---------|
| `yf price TICKER` | Quick price + change + volume | `yf price YPF` |
| `yf quote TICKER` | Detailed quote (52w, PE, yield) | `yf quote AAPL` |
| `yf compare T1,T2,T3` | Side-by-side comparison table | `yf compare YPF,PAM,GGAL` |
| `yf credit TICKER` | Credit analysis: leverage, coverage, debt maturity | `yf credit YPF` |
| `yf macro` | Morning 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 ETF` | ETF top holdings + fund data | `yf flows EMB` |
| `yf history TICKER [PERIOD]` | Price history (1d/5d/1mo/3mo/6mo/1y/ytd/max) | `yf history YPF 3mo` |
| `yf fundamentals TICKER` | Full financials (IS, BS, CF) | `yf fundamentals YPF` |
| `yf news TICKER` | Recent news headlines | `yf news YPF` |
| `yf search QUERY` | Find tickers | `yf 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 quote` → `yf fundamentals` → `yf 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.

Overview

This skill provides fast, terminal-style access to Yahoo Finance data for equities, bonds, macro indicators, FX, ETFs, and credit metrics. It exposes a compact set of commands to retrieve prices, quotes, fundamentals, macro dashboards, FX rates, ETF flows, news, options, dividends and analyst ratings. Outputs are human-friendly tables by default and machine-readable JSON with a --json flag. Use it to move quickly from a morning market check to deep financial and credit analysis.

How this skill works

Each command queries Yahoo Finance endpoints and formats results into clear terminal tables or JSON. Commands cover single-ticker lookups (price, quote, fundamentals, history, news), comparative views (compare), credit-focused metrics (credit), macro dashboards (macro), LatAm FX (fx), ETF holdings (flows), and options/dividends/ratings. The tool handles missing data and rate limits with informative errors and supports piping structured JSON into downstream tools.

When to use it

  • Quick price and volume checks for a ticker (yf price).
  • Detailed equity breakdowns including 52-week range, P/E, yield (yf quote).
  • Credit reviews for leverage, interest coverage, and debt maturity (yf credit).
  • Morning macro snapshot with UST yields, DXY, VIX, oil, gold, BTC and ARS (yf macro).
  • LatAm FX monitoring for ARS, BRL, CLP, MXN, COP against a base (yf fx).
  • ETF research to see top holdings, AUM and flows (yf flows).

Best practices

  • Start your session with yf macro for the market backdrop before drilling into tickers.
  • Use yf price for rapid checks and yf quote plus yf fundamentals for deep dives.
  • Add --json when integrating results into scripts, dashboards, or automated reports.
  • For credit work, combine yf credit with fundamentals and history to validate ratios.
  • If you see rate-limit errors, wait a moment and retry; the tool surfaces clear retry guidance.

Example use cases

  • Morning workflow: yf macro → yf price for watchlist tickers → yf news for headlines.
  • Equity research: yf quote AAPL → yf fundamentals AAPL → yf history AAPL 1y for trend analysis.
  • Credit assessment: yf credit YPF to get leverage, coverage and debt maturity breakdown.
  • LatAm FX monitoring: yf fx USD to fetch ARS, BRL, CLP, MXN, COP rates in one call.
  • ETF due diligence: yf flows EMB to review top holdings, expense ratio and AUM.

FAQ

Can I get machine-readable output?

Yes — add --json to any command to receive structured JSON suitable for piping or ingestion.

What if a ticker is invalid or data is missing?

The skill returns clear error messages for bad tickers and notes when specific fields are unavailable.

Does it handle rate limits from Yahoo Finance?

Yes — the tool detects rate-limit conditions, surfaces a retry recommendation, and is designed to recover on subsequent calls.