save_portfolio_snapshot
Save a dated monthly snapshot of a local portfolio export, recording holdings and plan targets so later check-ins can measure changes without re-deriving history.
Instructions
Freeze the local export as one dated monthly snapshot (portfolio.snapshots, data/private/snapshots, git-ignored) so a later check-in can measure what actually changed instead of re-deriving history that was never recorded. Holdings are mapped to target buckets the same way map_holdings_to_targets does; the stored plan_targets prefer data/private/investment_plan.json's own targets over get_portfolio_config()'s. Refuses to overwrite an existing date unless force=True.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to a local broker portfolio export (CSV/XLSX) | |
| as_of | No | ISO date (YYYY-MM-DD) to file this snapshot under; defaults to today | |
| force | No | Overwrite an existing stored snapshot for the same date |