portfolio
Installation
SKILL.md
Portfolio
Investment portfolio manager. Add and remove holdings, list positions, analyze allocation weights, generate rebalance suggestions against target weights, and calculate performance returns over configurable time periods. All data is stored locally in JSON files — no external API calls required.
Commands
| Command | Description | Flags |
|---|---|---|
add <ticker> <qty> <price> |
Buy shares — adds to holdings and records a buy transaction | --date YYYY-MM-DD (defaults to today) |
remove <ticker> |
Sell shares — removes from holdings and records a sell transaction | --quantity N (partial sell; omit to sell all) |
list |
Display all current holdings in a formatted table | --format table|json|csv |
analyze |
Analyze portfolio allocation with value and weight percentages | --by ticker|sector --format table|json |
rebalance |
Generate buy/sell suggestions to reach target allocation weights | --target TICKER:PCT,... --threshold PCT (default 5) |
performance |
Calculate portfolio returns (invested, sold, current value, gain/loss) | --period 1d|1w|1m|3m|1y|all --format table|json |
help |
Show the built-in help message with all command examples | — |
Data Storage
All data is stored locally in ~/.portfolio/: