pfm keeps your investments β shares, ETFs, funds, crypto β and your bank spending in one place, running on your own machine. Daily prices, one base currency, real money-weighted returns, risk and stress tests, budgets, a full balance sheet with retirement readiness, and Spanish tax tooling. Your data and keys never leave your server.
The metrics and tools I actually wanted from a portfolio tracker β without handing my financial data to anyone.
Paste any broker statement β any language, any format β and a model extracts the trades and cash movements. No column mapping. Ready-made importers for IndexaCapital, MyInvestor, Mintos (P2P), Coinbase, Portfolio Dividend Tracker and a generic CSV, plus bank statements (CSV and the Spanish AEB43/N43 format).
Stocks, ETFs, mutual and index funds, crypto, bonds, commodities, fixed deposits and cash β across multiple broker "portfolios", including managed ones such as a robo-advisor β plus P2P/savings interest income.
Money-weighted IRR, real (inflation-adjusted) return, benchmark comparison, and a return attribution that shows which holdings drove the result and how much came from contributions versus market growth.
Drawdown, volatility and the Sharpe ratio; stress tests that replay 2008, 2020, 2022 and the dot-com crash on your current holdings; fund look-through to see real sector and region exposure and overlap between funds; position caps that warn when one holding grows too big.
Import bank statements and categorise them with rules, merchant names and AI suggestions. Monthly trends, recurring-charge detection (it flags price rises and missed payments) and named budgets with planned-versus-actual per category.
A balance sheet with a source and date on every line: broker cash and positions, bank balances, fixed deposits, property, pension and loans with an amortisation schedule. On top of it, a retirement-readiness projection in real terms that includes expected pensions.
Deployable cash after an emergency buffer and a tax reserve, a "next euro" proposal against your allocation targets with its reasons, and a tax-aware rebalancing plan that prices each sell against its own lots, estimates the tax and can cap the realised gain.
Income by month and year, yield-on-cost, projected forward annual income per holding, an income-by-calendar-month view, and fund ongoing charges (TER) in a fees report.
FIFO realised gains per financial year, a Spanish IRPF savings-base (base del ahorro) estimate, a two-month-rule (antiaplicaciΓ³n) check and a year-end planner for offsetting losses β with CSV and PDF exports.
A decision journal: what you did, why, what you expected, and a review date to check how it turned out. One Action Items list collects everything that needs attention β stale imports, a cap breached, idle cash, a decision due for review.
Ask about your portfolio in plain language; the chat calls live tools over your real holdings, spending, goals and plans. A research workbench adds fundamentals, fair-value and sell calculators and a scorecard of past calls. Works with Anthropic Claude, Gemini, OpenRouter or a local Ollama model.
A read-only MCP server exposes holdings, performance, tax, net worth, spending, budget and the allocator to any MCP-capable assistant, such as Claude.
FIRE goals with pace tracking, a Monte-Carlo wealth simulator that fills its inputs from your balance sheet, and saved scenarios you can track against your real net worth.
Full compatibility with Portfolio Dividend Tracker (PDT) v2 β a popular dividend tracker that pulls from a handful of brokers or a Google Sheet. pfm reads and writes that same Google Sheet (and the PDT XLSX), so the two stay in sync.
Self-hosted. The code is public; your database, API keys and amounts stay in local, gitignored files that never get committed.
Screens from the bundled demo account β fictional sample data, not a real portfolio. Click any to enlarge.
pfm ships with Docker Compose, so a self-hosted instance is a few commands away.
localhost:8080Log in with your API key, add a portfolio, and import your transactions from a file, pasted text, or a Google Sheet.# 1 Β· clone + configure git clone https://github.com/alexgoldhoorn/pfm.git cd pfm cp .env.example .env.local # set SERVER_API_KEY and an LLM key (e.g. ANTHROPIC_API_KEY) in .env.local # 2 Β· start docker compose --profile dev up -d --build # 3 Β· open http://localhost:8080
python scripts/create_demo_account.py --fresh then
docker compose -f docker-compose.demo.yml up -d spins up a full demo with
fictional sample data (portfolio, bank spending, budget, mortgage) at localhost:8081.
Holdings, transactions, imports, analytics, tax reports, spending, budgets, net worth, retirement, the allocator, decisions and Google Sheets sync β everything the web client does runs through FastAPI. Browse the full, auto-generated reference.
Open the API reference β