zfin/docs/reference/cli/audit.md
Emil Lerch 74fc219afd
All checks were successful
Generic zig build / build (push) Successful in 5m48s
Generic zig build / publish-macos (push) Successful in 11s
Generic zig build / deploy (push) Successful in 23s
add docs/guides
2026-06-22 14:53:53 -07:00

2.2 KiB

zfin audit

Two modes in one command: a portfolio hygiene check, and reconciliation against a brokerage export.

Usage: zfin audit [opts]

Flagless runs the hygiene check -- stale manual prices, accounts overdue for update, and auto-discovered brokerage-file candidates. With brokerage flags, it reconciles your portfolio against the export (treating the brokerage as source of truth) and reports discrepancies.

Options

Flag Effect
--verbose Show full reconciliation output even when clean.
--stale-days <N> Manual-price staleness threshold (default 3).
--fidelity <CSV> Fidelity positions CSV ("All accounts" -> Positions tab -> Download).
--schwab <CSV> Schwab per-account positions CSV.
--schwab-summary Schwab account summary: paste from the summary page to stdin, then Ctrl-D.

Reconciliation matches export accounts to yours via institution:: and account_number:: in accounts.srf; an unmatched account is reported as "unmapped."

Example (hygiene check)

ZFIN_HOME=examples/pre-retirement-both zfin audit
  Portfolio hygiene

  Stale manual prices (>3 days — --stale-days to configure)
    (none)

  Accounts overdue for update (weekly default — set update_cadence in accounts.srf)
    Sam 401k                         weekly    no update history found
    Joint taxable                    weekly    no update history found

Brokerage exports contain real account numbers and holdings. Keep them out of any git repo and delete them after reconciling.

See also


CLI command reference