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