← Back to Skills Marketplace
patello

Avanza Investment Tracker

by Patrik Ekenberg · GitHub ↗ · v2.0.2 · MIT-0
cross-platform ✓ Security Clean
211
Downloads
0
Stars
0
Active Installs
15
Versions
Install in OpenClaw
/install avanza-investment-tracker
Description
Process Avanza CSV exports, calculate TWRR/Modified Dietz returns, and track portfolio performance. Use when importing stock transactions, calculating invest...
README (SKILL.md)

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:

  1. Copy template: cp assets/special_cases_template.json ../data/avanza/special_cases.json
  2. Edit with your rules
  3. Import with --special-cases ../data/avanza/special_cases.json

See Also

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
Usage Guidance
This skill appears coherent for importing Avanza CSVs and computing returns. Before installing: 1) Review the implementation of the price-update code (StatCalculator.update_prices) to confirm which external API/URL it calls and whether that endpoint is acceptable — the package uses 'requests' to fetch prices but the SKILL.md does not list the provider. 2) Keep your data directories outside the skill folder (as documented) and back up your asset_data.db before running destructive commands; 'reset --confirm' is destructive. 3) Run pip install in a virtualenv (requirements.txt only lists 'requests'). 4) Inspect or test SpecialCases JSON templates carefully: they transform CSV rows and can change parsed fields; malformed rules could produce incorrect data. 5) If you need a stricter security posture, run the price-update step in an offline or sandboxed environment until you've verified the external endpoints and behavior.
Capability Analysis
Type: OpenClaw Skill Name: avanza-investment-tracker Version: 2.0.2 The Avanza Investment Tracker skill is a legitimate tool for processing financial transaction CSVs and calculating portfolio performance metrics (TWRR/Modified Dietz). The code uses standard libraries (sqlite3, csv, json) and the 'requests' library to fetch stock prices from a known public endpoint (avanza.se). No evidence of data exfiltration, malicious execution, or prompt injection was found; all database operations use parameterized queries to prevent SQL injection, and the logic strictly follows the stated purpose in SKILL.md.
Capability Tags
cryptocan-make-purchases
Capability Assessment
Purpose & Capability
The name/description (import Avanza CSVs, compute TWRR/Modified Dietz, track portfolio) match the provided scripts. The only external dependency is 'requests' which is appropriate for fetching prices. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs running the included CLI scripts against user-provided data directories and explicitly states data should live outside the skill directory. Commands, options (database path, special_cases path), and the destructive 'reset --confirm' action are documented. The runtime instructions do not instruct reading unrelated system files or environment variables.
Install Mechanism
This is an instruction-only skill (no install spec). requirements.txt only lists 'requests'. No downloads from arbitrary URLs or archive extraction are present.
Credentials
The skill requires no environment variables or external credentials. Its use of 'requests' is consistent with price lookups; nothing in the manifest asks for unrelated secrets or elevated access.
Persistence & Privilege
always:false and model invocation is not disabled (the default). The skill does not request permanent platform-wide privileges. It stores and manipulates data only in user-specified SQLite databases and metadata tables within those databases.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install avanza-investment-tracker
  3. After installation, invoke the skill by name or use /avanza-investment-tracker
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.0.2
Fix: ensure transfer_net code included in published package
v2.0.1
Republish: ensure transfer_net code is included in package
v2.0.0
Version 2.0.0 - No file changes detected in this release. - Skill functionality, usage, and documentation remain unchanged.
v1.0.1
- Added _meta.json file for improved metadata management. - Updated scripts (calculate_stats.py, cli.py, database_handler.py) with minor changes and adjustments. - Removed version field from SKILL.md and made other editorial updates. - No breaking changes; core functionality remains the same.
v1.0.0
Nickname support, versioning, cleanup
v1.2.3
- Internal structure updates: removed unused _meta.json metadata file. - scripts/calculate_stats.py, scripts/cli.py, and scripts/database_handler.py updated, likely minor code and maintenance improvements. - No changes to user-facing commands or documentation.
v1.2.2
No functional or documentation changes; only metadata updated. - Internal metadata file (_meta.json) changed. - No user-facing code or documentation modifications.
v1.2.1
Added account nickname feature from PR #47
v1.2.0
No major changes in this release. - Internal metadata updated in _meta.json. - No changes to functionality or user-facing documentation.
v1.1.1
Documentation update
v1.1.0
Documentation cleanup
v0.1.0
Documentation update with cleaner example placeholders
v0.0.3
Account nicknames feature (PR #47): set/remove/list account display names. Updated all scripts from main.
v0.0.2
Synced with master branch (PR #45: Autogiroinsättning, Avkastningsskatt, Uttag av riskkostnad handlers)
v0.0.1
Initial release of avanza-investment-tracker. - Import and parse Avanza CSV transaction exports. - Calculate portfolio performance using TWRR and Modified Dietz methods. - Track holdings and transactions via a local SQLite database. - Handle corporate actions with a customizable special cases config. - CLI commands for importing data, updating prices, viewing stats, and account summaries.
Metadata
Slug avanza-investment-tracker
Version 2.0.2
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 15
Frequently Asked Questions

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.

💬 Comments