Avanza Investment Tracker

v2.0.2

Process Avanza CSV exports, calculate TWRR/Modified Dietz returns, and track portfolio performance. Use when importing stock transactions, calculating invest...

0· 204·0 current·0 all-time
byPatrik Ekenberg@patello

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for patello/avanza-investment-tracker.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Avanza Investment Tracker" (patello/avanza-investment-tracker) from ClawHub.
Skill page: https://clawhub.ai/patello/avanza-investment-tracker
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install avanza-investment-tracker

ClawHub CLI

Package manager switcher

npx clawhub@latest install avanza-investment-tracker
Security Scan
Capability signals
CryptoCan make purchases
These labels describe what authority the skill may exercise. They are separate from suspicious or malicious moderation verdicts.
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
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.
Assessment
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.

Like a lobster shell, security has layers — review code before you run it.

latestvk97c02ktfqwyq4nee58azm6r7584vere
204downloads
0stars
15versions
Updated 1w ago
v2.0.2
MIT-0

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

CommandDescription
python scripts/cli.py import FILEImport transactions from CSV
python scripts/cli.py statsShow performance stats
python scripts/cli.py stats --update-prices autoUpdate prices, then show stats
python scripts/cli.py accountsShow account summaries
python scripts/cli.py statusCheck system status
python scripts/cli.py reset --confirmClear 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

Comments

Loading comments...