investment-portfolio
Track investments with buy/sell records, allocation charts, and P/L analysis. Use when managing a stock or crypto portfolio, rebalancing, or comparing assets.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ckchzh/investment-portfolioinvestment-portfolio
Investment portfolio tracker — record holdings with buy prices, track performance and P/L, view allocation charts, analyze risk, calculate DCA, manage dividends, rebalance to targets, compare assets, and view sector breakdown. All data stored locally in JSONL format.
Commands
add
Add a holding — specify ticker, number of shares, and purchase price.
scripts/script.sh add AAPL 10 175.50
scripts/script.sh add BTC 0.5 42000
remove
Remove a holding by ticker symbol.
scripts/script.sh remove TSLA
update
Update the current market price of a holding.
scripts/script.sh update AAPL 195.00
list
Show all holdings with shares, buy price, and current price.
scripts/script.sh list
summary
Portfolio summary — total value, total cost, overall P/L.
scripts/script.sh summary
allocation
ASCII bar chart showing portfolio allocation by ticker as percentage.
scripts/script.sh allocation
performance
Detailed gain/loss analysis per holding with percentage returns.
scripts/script.sh performance
risk
Risk metrics — standard deviation of returns and diversification score.
scripts/script.sh risk
rebalance
Generate buy/sell suggestions to match target allocation percentages.
scripts/script.sh rebalance '{"AAPL":40,"GOOGL":30,"BTC":30}'
dca
Dollar-cost averaging calculator — monthly investment table over 12 months.
scripts/script.sh dca AAPL 500
dividend
Calculate dividend yield from annual dividend and current price.
scripts/script.sh dividend AAPL 3.76 195.00
compare
Compare two holdings side by side — shares, prices, and P/L.
scripts/script.sh compare AAPL GOOGL
sectors
Sector breakdown with allocation chart. Uses built-in ticker-to-sector mapping.
scripts/script.sh sectors
export
Export portfolio data as CSV.
scripts/script.sh export csv
history
Show transaction history from the log file.
scripts/script.sh history
help
scripts/script.sh help
version
scripts/script.sh version
Examples
# Build a portfolio
scripts/script.sh add AAPL 10 175
scripts/script.sh add GOOGL 5 140
scripts/script.sh add BTC 0.1 42000
scripts/script.sh update AAPL 195
# Analyze
scripts/script.sh summary
scripts/script.sh allocation
scripts/script.sh performance
scripts/script.sh risk
# Rebalance
scripts/script.sh rebalance '{"AAPL":50,"GOOGL":30,"BTC":20}'
scripts/script.sh compare AAPL GOOGL
scripts/script.sh sectors
Configuration
| Variable | Required | Description |
|---|---|---|
PORTFOLIO_DIR | No | Data directory (default: ~/.local/share/investment-portfolio/) |
Data Storage
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ckchzh-investment-portfolio": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
header
Header design reference — navigation patterns, sticky headers, responsive menus, accessibility. Use when designing website headers or implementing navigation components.
docker-helper
Dockerfile生成、docker-compose编排、命令速查、调试排错、镜像优化、仓库配置. Use when you need docker helper capabilities. Triggers on: docker helper.
rsyslog
RSyslog advanced system logging reference. RainerScript configuration, input/output modules (imtcp/imfile/omfwd/omelasticsearch), templates with property replacer, content-based filtering, TLS-encrypted remote logging, queue performance tuning, and debug troubleshooting.
Fitness Plan — Science-Based Training & Workout Auditor
Track workouts, calculate BMI/1RM, and access exercise science guides. 支持科学健身计划制定、BMI/最大力量计算及运动解剖学参考。Use when planning gym sessions, calculating macro needs, or auditing training splits.
pesticide
Pesticide management reference — chemical classes, application methods, IPM strategies, residue limits, safety protocols. Use when selecting pest control products, calculating spray rates, or managing pesticide compliance.