zfin/docs/reference/cli/analysis.md
Emil Lerch 4f1ca3d34d
All checks were successful
Generic zig build / build (push) Successful in 5m19s
Generic zig build / publish-macos (push) Successful in 12s
Generic zig build / deploy (push) Successful in 22s
add ability to handle opaque 401(k)s with new tax_mix fields
2026-08-01 15:32:33 -07:00

2.1 KiB

zfin analysis

Break your portfolio down by asset class, sector, geography, account, and tax type.

Usage: zfin analysis [FILE]

Renders a bar breakdown along five axes, plus an umbrella-exposure estimate. The Asset Category / Sector / Geographic axes use metadata.srf; the Tax Type axis uses accounts.srf. Unclassified holdings and unmapped accounts are shown as such.

Example

ZFIN_HOME=examples/pre-retirement-both zfin analysis
  Asset Category
  Equity                   ██████████████████████████▋     89.2%  $1,233,151.30
  Fixed Income             ██                               7.0%  $96,922.00
  Cash                     █▏                               3.8%  $53,064.51

  By Tax Type
  Traditional (Pre-Tax)    █████████████████▋              58.9%  $815,290.06
  Taxable                  ██████▍                         21.6%  $299,010.60
  Roth (Post-Tax)          █████                           16.9%  $233,732.95
  HSA (Triple Tax-Free)    ▊                                2.5%  $35,104.20

  Umbrella exposure
    Total liquid:                              $1,383,137.81
    Shielded (retirement accounts):            $1,084,127.21
    Exposed (taxable + non-shielded pre-tax):  $299,010.60 (21.6%)

The umbrella block's shielded/exposed split can be overridden per account with shielded:bool:false in accounts.srf.

One account can contribute to several By Tax Type rows. An account with tax_mix_* carve-outs -- a 401(k) whose single reported balance lumps pre-tax and Roth money together -- is apportioned across types by weight rather than landing wholly on its tax_type.

See also


CLI command reference