zfin/docs/reference/cli/portfolio.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

1.5 KiB

zfin portfolio

Load and analyze your portfolio: positions, valuations, cash, and watchlist.

Usage: zfin portfolio [FILE]

Reads portfolio.srf (or the -p pattern / [FILE] argument) and prints a summary: total value, cost, and gain/loss; trailing historical returns; a per-position table with lot detail; and a cash-by-account section. Watchlist symbols, if any, appear at the bottom.

Example

ZFIN_HOME=examples/pre-retirement-both zfin portfolio
Portfolio Summary (examples/pre-retirement-both/portfolio.srf)
========================================
  Value: $1,383,137.81  Cost: $658,837.01  Gain/Loss: +$724,300.80 (109.9%)
  Lots: 13 open, 0 closed    Positions: 5 symbols
  Historical:  1M: +3.2%  3M: +13.3%  1Y: +24.5%  3Y: +56.4%  5Y: +56.1%  10Y: +182.6%

  Symbol    Shares   Avg Cost      Price     Market Value      Gain/Loss   Weight ...
  VTI       2480.0    $138.35    $373.38      $925,982.40 +  $582,874.40    66.9%
    open      1100.0    $140.00                 $410,718.00 +  $256,718.00          2018-06-15 LT Pat 401k
    ...

  Cash
  Account                               Balance  Note
  Joint taxable                      $48,000.00
  ...

Manual-priced rows render in warning color (the price may be stale).

See also


CLI command reference