# Portfolio Audit

> Analyzes an exported portfolio CSV for concentration risk, asset-type allocation drift, and gain/loss. Reads a file you exported yourself (no login, no network, fully offline and deterministic) and warns when any single position or asset class exceeds your stated limits. Covers stocks, crypto, ETFs, and any asset type you label.

- Skill: `trac3r00/portfolio-audit` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add trac3r00/portfolio-audit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/trac3r00/portfolio-audit/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- License: MIT
- Author: trac3r00 (https://skillmd.com/u/trac3r00)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/trac3r00/portfolio-audit

---


# Portfolio Audit

A brokerage export tells you what you own. This tells you whether one position
or one asset class is quietly too big.

## Commands

```bash
python3 scripts/portfolio_audit.py portfolio.csv
python3 scripts/portfolio_audit.py portfolio.csv --json
python3 scripts/portfolio_audit.py portfolio.csv --max-position 0.20 \
    --max-type crypto=0.10
```

## CSV format

Header, any order, case-insensitive:

```csv
symbol,type,quantity,cost_basis,current_price
AAPL,stock,100,150.0,300.0
BTC,crypto,0.5,20000,60000
```

`type` is freeform (stock, crypto, etf, cash...). `cost_basis` and
`current_price` are per-unit.

## Semantics

| Check | Default | Gate |
|---|---|---|
| Single position weight | `--max-position 0.25` | exit 1 when any position exceeds |
| Asset type weight | `--max-type type=weight` | exit 1 when the type exceeds |
| Gain/loss | informational | always reported |

Warnings name the symbol and the actual weight. A clean portfolio (no
concentration, no drift) exits 0.

## Pairs with

`subscription-audit` (the other personal-finance CSV tool — recurring charges
vs asset allocation).

