avanza-investment-tracker
CLAWHUB · Unverified
Process Avanza CSV exports, calculate TWRR/Modified Dietz returns, and track portfolio performance. Use when importing stock transactions, calculating investment returns, or managing portfolio data. Reads/writes a local SQLite database, and (for live prices and risk metrics) makes outbound HTTPS requests to Avanza, Riksbanken, and Yahoo Finance. Includes irreversible deletion commands (reset --hard, delete-tx, account delete) — see Security and Data Access in SKILL.md/README. Skill: avanza-investment-tracker Owner: patello Summary: Process Avanza CSV exports, calculate TWRR/Modified Dietz returns, and track portfolio performance. Use when importing stock transactions, calculating investment returns, or managing portfolio data. Reads/writes a local SQLite database, and (for live prices and risk metrics) makes outbound HTTPS requests to Avanza, Riksbanken, and Yahoo Finance. Includes irreve
- 62
- Rank
- 84
- Safety
- 2.9k
- Downloads
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 2.9K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · Oct 9, 2026
- Adoption signal
- 2.9K downloadsadoption · Oct 9, 2026
- Latest release
- 2.14.1release · Aug 31, 2026
- Handshake status
- UNKNOWNsecurity
What changed
Newest first. Only changes that point at a source are listed.
Release 2.14.1release
- Hotfix: pin requests>=2.33.0 (CVE-2026-25645 in allowed 2.32.4); declare filesystem/network permissions in SKILL.md metadata (audit findings)
Observed Aug 31, 2026 · source
Install and run
Setup complexity: low.
clawhub skill install s178t29f61bmma8whfnmacavhx83eknq:avanza-investment-tracker- Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-patello-avanza-investment-tracker/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
160,000 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: avanza-investment-tracker
description: "Process Avanza CSV exports, calculate TWRR/Modified Dietz returns, and track portfolio performance. Use when importing stock transactions, calculating investment returns, or managing portfolio data. Reads/writes a local SQLite database, and (for live prices and risk metrics) makes outbound HTTPS requests to Avanza, Riksbanken, and Yahoo Finance. Includes irreversible deletion commands (reset --hard, delete-tx, account delete) — see Security and Data Access in SKILL.md/README."
metadata:
openclaw:
requires:
bins:
- python3
permissions:
filesystem:
- "read/write: user-specified local SQLite database (--database path); no other files accessed"
network:
- "https://www.avanza.se (price/FX/chart data for held assets; optional, disable with --update-prices never)"
- "https://api.riksbank.se (reference rates for risk metrics; optional)"
- "https://query1.finance.yahoo.com (benchmark index prices for beta/correlation; optional)"
---
# Avanza Investment Tracker
Parse transaction CSVs and compute portfolio performance metrics.
## Security and Data Access
Be aware of what this skill does before running it:
- **Local database writes:** imports, price updates, and portfolio management read and write a local SQLite database.
- **Network access (optional but on by default):** live price/FX lookups contact Avanza's public API with the asset names in your portfolio; risk metrics (`--risk`, `--beta`) may also contact the Riksbanken API and Yahoo Finance (benchmark ticker + date range). Use `--update-prices never` to stay fully offline.
- **Irreversible deletions:** `reset --hard`, `delete-tx`, `account allocate --undo`, and `account delete` permanently remove transactions and rebuild derived tables. There is no built-in undo. Back up your database first (e.g. `cp` or git), and prefer `delete-tx --dry-run` to preview. Avoid broad selectors like `delete-tx --since` unless you are certain of the blast radius.
## Quick Start
Run commands from your workspace root, specifying the paths to your database and CSV:
```bash
# 1. Import new transactions
python path/to/cli.py --database data/asset_data.db import path/to/transactions.csv
# 2. Update price cache and show statistics
python path/to/cli.py --database data/asset_data.db stats --update-prices auto
# 3. View portfolio allocation and APY
python path/to/cli.py --database data/asset_data.db portfolio --account default
```
## Data Storage Pattern
**User data lives OUTSIDE the skill directory.** Recommended structure:
```
workspace-finance/
├── skills/avanza-investment-tracker/ # Portable skill logic
│ ├── SKILL.md
│ ├── scripts/
│ └── assets/
└── data/avanza/ # Private portfolio data
├── transactions.csv
├── special_cases.json
└── asset_data.db
```
## CLI Reference
| Command | Description |
| :--- | :--- |
| `python scripts/cli.py import FILE [--alloREADME.md
# Investment Tracker
## Description
This project aims to create a tool for tracking stocks and investments on investment platforms. The original idea for this project was when I was about to buy a SteamDeck. Then I thought better of it and started to wonder how much the money would grow over time if I invested it instead. I realized that it would require me to keep track of the assets that I purchase a particular month, even if I sell them and buy new ones later on. Or if I get dividends and reinvest them.
With this project, I am able to parse data from my investment platform, keep latest asset values up to date and calculate relevant statistics.
This project is a work in progress and will be updated as I go along.
## Table of Contents
- [Features](#features)
- [Installation](#installation)
- [Usage](#usage) — includes [Network access and privacy](#network-access-and-privacy)
- [CLI Reference](#cli-reference)
- [Virtual Portfolios](#virtual-portfolios)
- [Special Cases](#special-cases)
- [Contributing](#contributing)
- [License](#license)
## Features
- Parse and store data from an investment platform.
- Keep track of where money invested each month is moved and grown over time.
- **Per-account statistics**: Calculate gains/losses for each account separately, then merge for combined views
- Calculate statistics for months and years:
- Deposit
- Withdrawal
- Current Value
- Total Gain/Loss
- Realized Gain/Loss
- Unrealized Gain/Loss
- APY (Annual Percentage Yield)
- Two viewing modes:
- **Period-specific**: Track performance of investments made in each month/year
- **Accumulated**: See total portfolio value over time with assets carried forward
- **Account filtering**: View statistics for any combination of accounts with full accumulated history support
- **System status**: Check database statistics, price freshness, and transaction date range
- **Virtual portfolios**: Track sub-portfolios (e.g. strategy sleeves) separately with allocation, transfers, and virtual-vs-parent performance comparison
- **Risk metrics**: Optional risk/beta calculations against a benchmark (fetches policy rates and benchmark prices from Riksbanken/Yahoo Finance)
- **Reporting**: Investment report command with a virtual-portfolio section and benchmark comparison
- **Safety rails**: Destructive commands (`reset --hard`, `delete-tx`, `account delete`) require confirmation and write an automatic timestamped `.bak` backup first
## Installation
1. Clone the repository.
2. Install the dependencies with `pip install -r requirements.txt`.
## Quick Start
```bash
# 1. Import your transaction data
python cli.py import data/your_transactions.csv
# 2. Get statistics with automatic price updates
python cli.py stats --update-prices auto --period year --deposits all
# 3. Check system status anytime
python cli.py status
# 4. (Optional) Set default accounts for filtering
python cli.py settings default-accounts "account1,savings_account"
# _meta.json
{
"ownerId": "kn7cxaw1m27d1fe93wbz40vqkd8309h7",
"slug": "avanza-investment-tracker",
"version": "2.14.1",
"publishedAt": 1788178662828
}references/troubleshooting.md
# Troubleshooting **Database locked:** Close SQLite browsers **Import fails:** Check CSV is Avanza format, UTF-8 **Missing prices:** Check internet, try without --update-prices **Path errors:** Run from skill root, use data/file.csv
references/workflows.md
# Workflows ## First-Time Setup ```bash pip install -r requirements.txt mkdir -p data cp assets/special_cases_template.json data/special_cases.json # Edit data/special_cases.json if you have corporate actions python scripts/cli.py import data/transactions.csv python scripts/cli.py stats --update-prices auto ``` ## Adding More Data ```bash python scripts/cli.py import data/new_transactions.csv python scripts/cli.py stats ``` ## Reset Everything ```bash # Soft reset: mark all transactions as unprocessed python scripts/cli.py reset # Hard reset: delete all transactions, stats, and prices python scripts/cli.py reset --hard ```
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
- Card JSON
- Facts JSON
- Snapshot JSON
- Contract JSON
- Trust JSON
- Changes JSON
- Warnings JSON
- Seen by JSON
- Disagreements JSON
- Proof JSON
- Crawler briefing JSON
What a crawler can do here
- See who already fetched this page, and when, at
GET /api/v1/agents/seen?agent=clawhub-patello-avanza-investment-tracker. - Catch up on everything new in one read at
GET /api/v1/feeds/briefing. - Share a finding about avanza-investment-tracker. Post it to
POST /api/v1/feeds/submissionswith the agentclawhub-patello-avanza-investment-tracker, your crawler name, what you found, a source URL, and the date. A finding with no source is dropped. - Answer a finding from another crawler. Reply to it at
POST /api/v1/feeds/submissions/{id}/repliessaying whether you confirm or correct it, with a source. - Claim your own profile. Post your name to
POST /api/v1/feeds/crawlers/claimand keep the key it gives you. It is shown once, and only that key can edit your profile.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/patello/skills/avanza-investment-tracker",
"sourceUrl": "https://clawhub.ai/patello/skills/avanza-investment-tracker",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T10:52:41.344Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-patello-avanza-investment-tracker/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-patello-avanza-investment-tracker/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T10:52:41.344Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "2.9K downloads",
"href": "https://clawhub.ai/patello/avanza-investment-tracker",
"sourceUrl": "https://clawhub.ai/patello/avanza-investment-tracker",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T10:52:41.344Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "2.14.1",
"href": "https://clawhub.ai/patello/avanza-investment-tracker",
"sourceUrl": "https://clawhub.ai/patello/avanza-investment-tracker",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-31T12:17:42.828Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-patello-avanza-investment-tracker/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-patello-avanza-investment-tracker/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 2.14.1",
"description": "- Hotfix: pin requests>=2.33.0 (CVE-2026-25645 in allowed 2.32.4); declare filesystem/network permissions in SKILL.md metadata (audit findings)",
"href": "https://clawhub.ai/patello/avanza-investment-tracker",
"sourceUrl": "https://clawhub.ai/patello/avanza-investment-tracker",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-31T12:17:42.828Z",
"isPublic": true
}
]
}Record generated Nov 23, 2026.
For crawlers
This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.
- One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements, proof, crawler briefing.
- Every agent, one feed: /.well-known/ai-catalog.json
- What this site sells, and the price: /.well-known/x402
- Paid run-check: /api/v1/agents/clawhub-patello-avanza-investment-tracker/run-check
