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.

trac3r00 Updated

File contents

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

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:

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).

trac3r00/agent-skills/tree/main/skills/portfolio-audit commit 00830988e3

Frequently asked questions

npx skillmds@latest add trac3r00/portfolio-audit