investment-portfolio

by BytesAgain

Track investments with buy/sell records, allocation charts, and P/L analysis. Use when managing a stock or crypto portfolio, rebalancing, or comparing assets.

3.7k行业场景未扫描2026年3月23日

安装

claude skill add --url github.com/openclaw/skills/tree/main/skills/ckchzh/investment-portfolio

文档

investment-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.

bash
scripts/script.sh add AAPL 10 175.50
scripts/script.sh add BTC 0.5 42000

remove

Remove a holding by ticker symbol.

bash
scripts/script.sh remove TSLA

update

Update the current market price of a holding.

bash
scripts/script.sh update AAPL 195.00

list

Show all holdings with shares, buy price, and current price.

bash
scripts/script.sh list

summary

Portfolio summary — total value, total cost, overall P/L.

bash
scripts/script.sh summary

allocation

ASCII bar chart showing portfolio allocation by ticker as percentage.

bash
scripts/script.sh allocation

performance

Detailed gain/loss analysis per holding with percentage returns.

bash
scripts/script.sh performance

risk

Risk metrics — standard deviation of returns and diversification score.

bash
scripts/script.sh risk

rebalance

Generate buy/sell suggestions to match target allocation percentages.

bash
scripts/script.sh rebalance '{"AAPL":40,"GOOGL":30,"BTC":30}'

dca

Dollar-cost averaging calculator — monthly investment table over 12 months.

bash
scripts/script.sh dca AAPL 500

dividend

Calculate dividend yield from annual dividend and current price.

bash
scripts/script.sh dividend AAPL 3.76 195.00

compare

Compare two holdings side by side — shares, prices, and P/L.

bash
scripts/script.sh compare AAPL GOOGL

sectors

Sector breakdown with allocation chart. Uses built-in ticker-to-sector mapping.

bash
scripts/script.sh sectors

export

Export portfolio data as CSV.

bash
scripts/script.sh export csv

history

Show transaction history from the log file.

bash
scripts/script.sh history

help

bash
scripts/script.sh help

version

bash
scripts/script.sh version

Examples

bash
# 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

VariableRequiredDescription
PORTFOLIO_DIRNoData directory (default: ~/.local/share/investment-portfolio/)

Data Storage

All data saved in ~/.local/share/investment-portfolio/:

  • holdings.jsonl — Portfolio holdings (one JSON object per line)
  • history.log — Transaction log

Requirements

  • bash 4.0+
  • python3 (for JSONL processing and calculations)

All prices are manually entered — no external API calls.


Powered by BytesAgain | bytesagain.com | hello@bytesagain.com

相关 Skills

面试体系设计

by alirezarezvani

Universal
热门

按岗位、级别和团队设计面试流程,生成能力矩阵、题库与评分标准,分析面试官偏差并校准招聘门槛,适合搭建或优化企业招聘体系。

团队招人没章法时,用它快速搭建岗位化面试流程、题库与评分标准,还能兼顾校准面试偏差,招聘更稳更准。

行业场景
未扫描9.0k

抽认卡

by BytesAgain

热门

Spaced repetition study tool with deck management. Use when you need flashcard.

行业场景
未扫描3.7k

教程文档

by anderskev

热门

Tutorial patterns for documentation - learning-oriented guides that teach through guided doing

行业场景
未扫描3.7k

相关 MCP 服务

by boosted-chat

热门

Flight search & booking for AI agents. 400+ airlines, $20-50 cheaper than OTAs.

行业场景
137

Search company disclosures and financial statements from the Korean market. Retrieve stock profiles, market classifications, and historical trading data across major exchanges. Accelerate equity research with accurate, date-specific insights for Korean securities.

做韩国股研时,用它能一站查公司披露、财报和历史行情,按日期精确追溯关键信息,比手动翻交易所高效太多。

行业场景
103

检索韩国市场公司的披露文件与财务报表,并获取股票概况等关键信息。

想研究韩股公司时,它能一站式拉取披露、财报和股票概况,省去跨站查资料的麻烦,对跨境投研尤其省时。

行业场景
103

评论