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
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install avanza-investment-tracker - After installation, invoke the skill by name or use
/avanza-investment-tracker - Provide required inputs per the skill's parameter spec and get structured output
What is Avanza Investment Tracker?
Process Avanza CSV exports, calculate TWRR/Modified Dietz returns, and track portfolio performance. Use when importing stock transactions, calculating invest... It is an AI Agent Skill for Claude Code / OpenClaw, with 211 downloads so far.
How do I install Avanza Investment Tracker?
Run "/install avanza-investment-tracker" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Avanza Investment Tracker free?
Yes, Avanza Investment Tracker is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Avanza Investment Tracker support?
Avanza Investment Tracker is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Avanza Investment Tracker?
It is built and maintained by Patrik Ekenberg (@patello); the current version is v2.0.2.