Skip to content

CasamaMaker/VisualTradeRepublic

Repository files navigation

VisualTradeRepublic

A local, single-page web app that turns your Trade Republic CSV export into a rich, interactive portfolio dashboard. It downloads real historical market prices and shows what your money has actually done — including the losses that most apps quietly hide when you sell.

The live demo runs on synthetic example data (no server, no personal data). To analyze your own Trade Republic portfolio, run it locally — see Getting started.

⚠️ Unofficial, personal project. Not affiliated with, endorsed by, or connected to Trade Republic. Use at your own risk.

Main dashboard


Highlights

  • 📈 Real prices — resolves each ISIN to a Yahoo Finance ticker and downloads the daily history (with FX conversion to EUR).
  • 💶 Honest returns — the return chart is money-weighted (MWR / XIRR), and a realized loss stays on the chart forever. Selling a losing position does not make the loss disappear.
  • 🧮 Two returns, clearly separated — whole-account vs. invested-part-only, each shown for last year and all-time, in % and €.
  • 🕰️ Time travel — see your holdings as they were on any past date.
  • 🔍 Asset detail — price chart with buy/sell markers, average buy price, realized + unrealized result, dividends.
  • 📜 Full movements history — multi-select filters (types & assets), sortable columns, and live sums of the filtered rows.
  • 🏦 Net-worth view — stacked area of cash + market value, plus the account-level gain/loss chart.
  • 🌐 Bilingual — Catalan / English, switchable on the fly, with locale-aware number formatting.
  • 🔒 Local-first — everything runs on localhost. Your data never leaves your machine.

Screenshots

Money-weighted return (€) with monthly buy/sell activity bars Return in euros

Total net worth = cash + assets, and account gain/loss Net worth

Asset detail: price, trades and stats Asset detail

Movements history with multi-select filters and column sums Movements

Real return, broken down concept by concept (reconciles to the total) Real return breakdown


Getting started

Requirements

  • Python 3.9+
  • The requests package:
    pip install requests

Run

python server.py

Then open http://127.0.0.1:8765/ (Windows users can just double-click start.bat).

Drag your Trade Republic CSV export onto the drop zone (or click to select). The app contacts Yahoo Finance to download quotes — the first load can take ~30–60 s.

Get your CSV from Trade Republic

In the Trade Republic app: Profile → Transactions → Export. You'll receive a CSV named similar to Exportación de transacción.csv.


Try it without your own data

The repo ships with example_transactions.csv — a fully synthetic, anonymous dataset (~3 years, ~€20k) built on real, public instruments (MSCI World / S&P 500 ETFs, Allianz, SAP, LVMH, ASML, Apple, NVIDIA, Bitcoin). No personal information whatsoever.

Just upload it the same way to explore every feature with realistic market movements.


How the returns are calculated

Most portfolio views show value − invested capital, which drops your realized losses the moment you sell. This app avoids that:

  • Real gain/loss (€) = total account value − net contributions. Immune to sells: selling only moves value from “positions” to “cash”, so the line never jumps. A €100 realized loss stays −€100.
  • Return (%) uses MWR (money-weighted / XIRR) — the interest rate a savings account would have needed, with the same deposits and withdrawals on the same days, to reach your current balance. New deposits don't inflate the percentage the way gain / invested does.
  • The whole-account figure includes idle cash; the invested-part-only figure isolates how your picks performed. Both are shown for the last 12 months and since inception.

Some instruments (certain funds, bonds, private markets) have no reliable market quote and fall back to the last trade price; the app flags these.


How it works

CSV upload ──▶ server.py (/api/process)
                     │
                     ▼
             fetch_quotes.py
             ├─ resolve each ISIN → Yahoo ticker
             ├─ download daily prices + FX → EUR
             └─ build daily series (value, invested, cash, movements, income, fees…)
                     │
                     ▼  JSON
             portfolio.html  (Chart.js dashboards, all computed in the browser)
  • server.py — tiny http.server: serves the static files and exposes POST /api/process.
  • fetch_quotes.py — parses the CSV, resolves tickers, downloads quotes, and assembles the data model.
  • portfolio.html — the entire UI (HTML + CSS + JS in one file). Charts via Chart.js + the zoom plugin (loaded from a CDN).

Project structure

File Purpose
portfolio.html The whole front-end (UI, charts, i18n, all client-side math).
server.py Local web server + CSV processing endpoint.
fetch_quotes.py CSV parsing, ticker resolution, quote download, data model.
start.bat Windows launcher.
example_transactions.csv Synthetic demo dataset (safe to publish).

Privacy

The app runs entirely on your machine. The only outbound requests go to Yahoo Finance, to download public market prices for the ISINs in your CSV. No account data, balances, or transactions are ever uploaded anywhere.

Note: data.json and .ticker_cache.json are generated locally from your CSV and therefore contain your holdings. They are ignored by git — don't commit them.


Tech stack


Disclaimer

This is a hobby project for personal use. It is not investment advice, and the figures it shows may be inaccurate (wrong ticker resolution, missing quotes, FX approximations, etc.). Always cross-check against your broker. Not affiliated with Trade Republic.

About

Local, private dashboard for your Trade Republic portfolio — real prices, honest returns, no data leaves your machine.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages