Avanza Investment Tracker
/install avanza-investment-tracker
Avanza Investment Tracker
Parse transaction CSVs and compute portfolio performance metrics.
Quick Start
Run from skill root with data paths pointing to your workspace:
# Import transactions (data lives outside skill)
python scripts/cli.py import ../data/avanza/transactions.csv
# Calculate stats with auto price update
python scripts/cli.py stats --update-prices auto --database ../data/avanza/asset_data.db
# Or use defaults (assumes you cd into a data directory first)
cd ../data/avanza
python ../../skills/avanza-investment-tracker/scripts/cli.py import transactions.csv
Data Storage Pattern
User data lives OUTSIDE the skill directory. Recommended structure:
workspace-finance/
├── skills/avanza-investment-tracker/ # Portable skill (shareable)
│ ├── SKILL.md
│ ├── scripts/
│ └── assets/
└── data/avanza/ # Your private data
├── transactions.csv
├── special_cases.json
└── asset_data.db
The skill provides logic. Your data stays private and portable.
CLI Reference
| Command | Description |
|---|---|
python scripts/cli.py import FILE |
Import transactions from CSV |
python scripts/cli.py stats |
Show performance stats |
python scripts/cli.py stats --update-prices auto |
Update prices, then show stats |
python scripts/cli.py accounts |
Show account summaries |
python scripts/cli.py status |
Check system status |
python scripts/cli.py reset --confirm |
Clear database (DESTRUCTIVE) |
All commands accept:
--database PATH(default:data/asset_data.db)--special-cases PATH(default:data/special_cases.json)
Skill Contents
avanza-investment-tracker/
├── SKILL.md # This file
├── requirements.txt # pip dependencies
├── assets/ # Templates (copy to your data dir)
│ └── special_cases_template.json
├── scripts/ # Python code
│ ├── cli.py # Main CLI entry
│ ├── data_parser.py
│ ├── database_handler.py
│ └── calculate_stats.py
└── references/ # Detailed guides (loaded as needed)
├── workflows.md
└── troubleshooting.md
Dependencies
requests- For fetching stock prices- Standard library:
sqlite3,csv,json,datetime,argparse
Install: pip install -r requirements.txt
Special Cases
Corporate actions (splits, spin-offs) may need manual rules:
- Copy template:
cp assets/special_cases_template.json ../data/avanza/special_cases.json - Edit with your rules
- Import with
--special-cases ../data/avanza/special_cases.json
See Also
- Detailed workflows: See references/workflows.md
- Troubleshooting: See references/troubleshooting.md
Account Filtering
By default, stats show all accounts. Use settings default-accounts to set your preferred accounts:
# Set default accounts (your main portfolio)
python scripts/cli.py --database ../data/avanza/asset_data.db settings default-accounts "1234567,Savings Account,9876543"
# View stats for default accounts only
python scripts/cli.py --database ../data/avanza/asset_data.db stats --account default
# Or specify accounts directly
python scripts/cli.py stats --account "1234567,Savings Account"
# View all accounts
python scripts/cli.py stats --account all
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install avanza-investment-tracker - 安装完成后,直接呼叫该 Skill 的名称或使用
/avanza-investment-tracker触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Avanza Investment Tracker 是什么?
Process Avanza CSV exports, calculate TWRR/Modified Dietz returns, and track portfolio performance. Use when importing stock transactions, calculating invest... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 211 次。
如何安装 Avanza Investment Tracker?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install avanza-investment-tracker」即可一键安装,无需额外配置。
Avanza Investment Tracker 是免费的吗?
是的,Avanza Investment Tracker 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Avanza Investment Tracker 支持哪些平台?
Avanza Investment Tracker 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Avanza Investment Tracker?
由 Patrik Ekenberg(@patello)开发并维护,当前版本 v2.0.2。