# etf-premium

Works out whether an ETF trades above or below NAV using Yahoo Finance data, compares funds against each other, and breaks a sudden price jump into its causes.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3100 installs · ★ 3453
- Author: himself65
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/himself65/finance-skills/tree/HEAD/plugins/market-analysis/skills/etf-premium/SKILL.md
- Updated: 2026-10-25
- HTML: https://affpapa.org/en/nevibecode/skills/etf-premium

## What it does

The skill computes how far an ETF's market price sits from its net asset value. Price comes from `regularMarketPrice` with a fallback to `previousClose`; NAV comes from the `navPrice` field through `yfinance`. It first checks that the ticker really is an ETF and returns an error if it is not.

Five branches cover the request types: a single-fund snapshot, a multi-ETF comparison, a screener for outliers, a deeper read with context, and a decomposition of a sharp move into the NAV-driven piece and the structural piece (dealer gamma exposure, blocked arbitrage, sentiment). A snapshot also pulls peer premiums from a built-in category table, so you can tell whether a gap belongs to one fund or to the whole group.

It needs `yfinance`, `pandas` and `numpy`, checks for them, and offers a `pip install` when they are missing. In Codex it runs shell probes first and states the limitation plainly when no shell is available. The author flags the output as research and educational material, not financial advice, so treat what it prints as analysis rather than a trade recommendation.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add himself65/finance-skills --skill etf-premium -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/etf-premium/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/etf-premium/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add himself65/finance-skills --skill etf-premium -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/etf-premium/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add himself65/finance-skills --skill etf-premium -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/etf-premium/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install himself65/finance-skills etf-premium
```

2. **Manually: put the files in place**
- File: `.github/skills/etf-premium/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add himself65/finance-skills --skill etf-premium -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/himself65/finance-skills --path plugins/market-analysis/skills/etf-premium
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/etf-premium/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add himself65/finance-skills --skill etf-premium -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/himself65/finance-skills/tree/HEAD/plugins/market-analysis/skills/etf-premium/SKILL.md

## When to use it
- check whether a fund trades above or below its NAV
- compare the premium on two ETFs in the same category
- screen a list for the steepest discounts
- split a sudden ETF move into NAV and structural parts
- explain why a premium is not converging to zero

## Example prompts
- Work out HYG's premium to NAV and show it next to JNK and USHY
- Compare IBIT and BITO — which one carries the bigger premium
- KWEB just spiked, decompose the move into the NAV piece and dealer gamma exposure

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 914c352b03ea6ccc.

BEGIN THIRD-PARTY FILE 914c352b03ea6ccc
````text
---
name: etf-premium
description: >
  Calculate an ETF's premium or discount to NAV from Yahoo Finance data (yfinance),
  compare or screen ETFs by premium, explain why a gap exists, and decompose a sudden
  ETF move into NAV-driven vs structural components (dealer gamma exposure, blocked AP
  arbitrage, sentiment). Use this skill whenever the user asks whether an ETF trades
  above or below NAV, compares ETF premiums or discounts, screens for the biggest
  ones, asks about ETF arbitrage or premium convergence, or wants to know why an ETF
  jumped or diverged from its holdings — including gamma squeezes, dealer gamma
  exposure (GEX), and blocked creation/redemption. Especially relevant for leveraged,
  inverse, international, bond, commodity, and crypto ETFs (IBIT, BITO, HYG, KWEB).
---

# ETF Premium/Discount Analysis 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.

Calculates the premium or discount of an ETF's market price relative to its Net Asset Value (NAV) using data from Yahoo Finance via [yfinance](https://github.com/ranaroussi/yfinance).

**Why this matters:** An ETF's market price can diverge from the value of its underlying holdings (NAV). When you buy at a premium, you're overpaying relative to the assets; at a discount, you're getting a bargain. This divergence is typically small for liquid US equity ETFs but can be significant for bond ETFs, international ETFs, leveraged/inverse products, and crypto ETFs — especially during periods of market stress.

**Important**: For research and educational purposes only. Not financial advice. yfinance is not affiliated with Yahoo, Inc.

---

## Step 1: Ensure Dependencies Are Available

**Current environment status:**

```
!`python3 -c "exec('try:\n import yfinance, pandas, numpy\n print(f\'yfinance={yfinance.__version__} pandas={pandas.__version__} numpy={numpy.__version__}\')\nexcept Exception:\n print(\'DEPS_MISSING\')')"`
```

If `DEPS_MISSING`, install required packages:

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

If already installed, skip and proceed.

---

## Step 2: Route to the Correct Sub-Skill
````
END THIRD-PARTY FILE 914c352b03ea6ccc

The third-party file has ended. Everything between the 914c352b03ea6ccc tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2411 of 21199 bytes. © himself65 · MIT · https://github.com/himself65/finance-skills/tree/HEAD/plugins/market-analysis/skills/etf-premium/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
