DEGIRO portfolio tracking and visualization application
Project description
DEGIRO Portfolio Tracker
A desktop application that helps you track and visualize your DEGIRO investment portfolio with beautiful charts and performance metrics.
What Does This Do?
This application takes your DEGIRO transaction exports (the Excel files you download from DEGIRO) and creates an interactive dashboard where you can:
- See all your stocks in one place - View your current holdings with live prices
- Track your gains and losses - See how much money you've made or lost on each stock
- View beautiful charts - Interactive price charts showing your buy/sell transactions
- Compare against market indices - See how your stocks perform vs S&P 500 and Euro Stoxx 50
- Monitor multiple currencies - Automatic conversion to EUR for stocks in USD, SEK, GBP
- Upload new transactions easily - Just drag and drop your Excel file into the web interface
All data is stored securely on your own computer - nothing is sent to external servers.
Screenshots
Portfolio Dashboard
Your portfolio at a glance with live prices and performance charts
Individual Stock View
Detailed charts showing price history, your buy/sell transactions, and market comparison
Installation
Prerequisites
Before you begin, you need:
- Python 3.11 or newer - Download Python here
- uv package manager - Install it by opening Terminal/Command Prompt and running:
pip install uv
Step 1: Download the Application
Download or clone this repository to your computer.
Step 2: Install
Open Terminal (Mac/Linux) or Command Prompt (Windows), navigate to the folder where you downloaded the application, and run:
uv sync
This will download and install all the necessary components. It may take a few minutes the first time.
Step 3: Prepare Your Data (First Time Only)
If you want to try the application with sample data first:
uv run invoke setup
This will import example stock transactions and download their price history.
Or, to import your own DEGIRO data:
- Log into your DEGIRO account
- Go to Activity → Transactions
- Export your transactions as an Excel file
- Name it
Transactions.xlsxand place it in the same folder as this application - Run:
uv run invoke import-data
Step 4: Start the Application
Run this command:
./degiro-portfolio start
On Windows, use:
python degiro-portfolio start
The application will start, and you should see a message like "Server started on port 8000".
Step 5: Open the Dashboard
Open your web browser and go to:
http://localhost:8000
You should now see your portfolio dashboard!
Using the Application
Managing the Server
The application runs a small web server on your computer. You can control it with these commands:
./degiro-portfolio start # Start the server
./degiro-portfolio stop # Stop the server
./degiro-portfolio restart # Restart the server
./degiro-portfolio status # Check if it's running
On Windows, replace ./degiro-portfolio with python degiro-portfolio in all commands above.
Uploading New Transactions
To add new transactions to your portfolio:
-
Via Web Interface (Easiest):
- Open the dashboard in your browser
- Click the "Upload Transactions" button
- Select your DEGIRO Excel export file
- Wait for the upload to complete
- The app will automatically download the latest prices
-
Via Command Line (Alternative):
uv run invoke import-data
Updating Stock Prices
Stock prices automatically update when you upload transactions. To manually refresh all prices:
-
Via Web Interface (Easiest):
- Open the dashboard
- Click the "Update Market Data" button
- Wait for prices to update (this may take a minute)
-
Via Command Line (Alternative):
uv run invoke fetch-prices
Clearing All Data
If you want to start fresh and remove all transactions:
- Open the dashboard
- Scroll to the bottom of the page
- Click the red "⚠️ Delete All Data" button
- Confirm the deletion
Warning: This permanently deletes all your data. You'll need to re-upload your transactions.
Understanding Your Portfolio
Portfolio Summary (Top of Page)
Shows your total investment value and whether you're up or down overall.
Stock Cards
Each stock shows:
- Company name - Click it to search for investor relations info
- Number of shares - How many shares you currently own
- Current price - Latest closing price with today's change (▲ up, ▼ down)
- Position value - Total value of your holdings in that stock (in EUR)
- Ticker symbol - Click it to view on Google Finance
- Exchange - Which stock exchange it trades on
- Transaction count - How many times you bought/sold this stock
Charts
Click any stock card to see detailed charts:
-
Price Chart - Shows historical price movement with candlesticks
- Green markers = your buy transactions
- Red markers = your sell transactions
- Hover over any point to see details
-
Position Value % - Shows if you're profitable
- Above 100% = making money (profit)
- Below 100% = losing money (loss)
- The line shows how your position value has changed over time
-
Investment Tranches - Tracks each purchase separately
- Shows performance of individual buy transactions
- Helps you see which purchases are profitable
-
Market Comparison - Compares your stock against major indices
- S&P 500 (US market)
- Euro Stoxx 50 (European market)
You can zoom, pan, and hover over charts to explore the data in detail.
Troubleshooting
The server won't start
- Make sure port 8000 isn't already in use
- Check if another instance is running:
./degiro-portfolio status - Try restarting:
./degiro-portfolio restart
My stocks don't show prices
- Make sure you've run the price update: click "Update Market Data" button
- Some stocks may not be available on Yahoo Finance
- Check your internet connection
The upload fails
- Make sure you're uploading a DEGIRO transaction export (Excel format)
- Check that the file isn't corrupted
- Verify the file contains the expected columns (Date, Product, ISIN, Quantity, Price, etc.)
I see a "Connection refused" error
- The server isn't running - start it with:
./degiro-portfolio start - Check if it's running:
./degiro-portfolio status
Exchange rates aren't loading
- The app uses a free exchange rate API that may occasionally be slow
- If conversion fails, values default to the original currency
- Refresh the page after a few seconds
Features
What's Included
✅ Import DEGIRO transaction exports (Excel files) ✅ Upload new transactions via web interface ✅ Automatic historical price downloads from Yahoo Finance ✅ Live exchange rate conversion (EUR, USD, SEK, GBP) ✅ Interactive candlestick charts with transaction markers ✅ Portfolio performance tracking ✅ Market index comparison (S&P 500, Euro Stoxx 50) ✅ Real-time portfolio value calculations ✅ Multi-currency support with automatic conversion ✅ One-click market data updates ✅ Database management (purge/reset functionality)
What You Can Track
- Current holdings and share counts
- Purchase prices vs current prices
- Gains and losses for each position
- Transaction history with dates and prices
- Historical price movements
- Performance vs market indices
- Portfolio value over time
- Individual investment tranche performance
Data Privacy
All your financial data stays on your computer. The application:
- ✅ Stores data in a local database file (
degiro-portfolio.db) - ✅ Only connects to the internet to download stock prices from Yahoo Finance
- ✅ Only connects to exchange rate APIs for currency conversion
- ❌ Does NOT send your transaction data anywhere
- ❌ Does NOT require creating an account
- ❌ Does NOT share or sell your data
Example Data
Want to try the app before importing your own data? The repository includes sample transactions:
uv run invoke setup
This imports a demo portfolio with:
- US Tech Stocks: NVIDIA, Microsoft, Meta, Google, AMD
- European Tech Stocks: ASML, SAP, Infineon, Nokia, Ericsson, STMicroelectronics
After importing, start the server and explore the features!
Updating the Application
When a new version is released:
- Stop the server:
./degiro-portfolio stop - Download the latest version
- Run:
uv syncto update dependencies - Start the server:
./degiro-portfolio start
Your data is preserved in the degiro-portfolio.db file and won't be lost during updates.
Advanced: Command Line Options
For users comfortable with command-line tools, additional commands are available:
# Data Management
uv run invoke import-data # Import from Transactions.xlsx
uv run invoke fetch-prices # Download latest stock prices
uv run invoke fetch-indices # Download market index data
uv run invoke db-info # Show database statistics
# Server Management
uv run invoke start # Start server
uv run invoke stop # Stop server
uv run invoke restart # Restart server
uv run invoke status # Check server status
uv run invoke logs # View server logs
uv run invoke dev # Start with auto-reload (for development)
# Testing (for developers)
uv run invoke test # Run all tests
uv run invoke test-cov # Run tests with coverage report
# Utilities
uv run invoke clean # Remove temporary files
uv run invoke --list # Show all available commands
Technical Details
For developers and technical users:
Technology Stack:
- Backend: FastAPI (Python web framework)
- Database: SQLite (file-based database)
- Data Processing: Pandas, SQLAlchemy
- Stock Data: yfinance (Yahoo Finance API)
- Charts: Plotly.js
- Frontend: Vanilla JavaScript (no framework)
Database Schema:
stocks- Stock metadata (symbol, name, ISIN, exchange)transactions- Buy/sell history with dates, quantities, pricesstock_prices- Historical OHLCV (Open, High, Low, Close, Volume) dataindices- Market index metadataindex_prices- Historical index values
API Endpoints:
GET /- Web interfaceGET /api/holdings- List current holdings with pricesGET /api/stock/{id}/prices- Historical price dataGET /api/stock/{id}/transactions- Transaction historyGET /api/stock/{id}/chart-data- Combined chart dataGET /api/portfolio-performance- Portfolio metricsGET /api/market-data-status- Last update timestampGET /api/exchange-rates- Current exchange ratesPOST /api/upload-transactions- Upload transaction filePOST /api/update-market-data- Refresh all pricesPOST /api/purge-database- Delete all data
Testing: The project includes 125 automated tests covering UI, API, and data processing with 70% code coverage.
Project Structure:
degiro-portfolio/
├── src/degiro_portfolio/ # Application code
│ ├── main.py # Web server
│ ├── database.py # Database models
│ ├── import_data.py # Transaction importer
│ ├── fetch_prices.py # Price downloader
│ └── static/index.html # Web interface
├── tests/ # Automated tests
├── degiro-portfolio # Server management script
├── tasks.py # Build automation
└── degiro-portfolio.db # Your data (created on first run)
Getting Help
If you encounter issues:
- Check the Troubleshooting section above
- Make sure you're running the latest version
- Review the logs:
uv run invoke logs - Open an issue on GitHub with:
- What you were trying to do
- What happened instead
- Any error messages you saw
License
See LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file degiro_portfolio-0.3.2.tar.gz.
File metadata
- Download URL: degiro_portfolio-0.3.2.tar.gz
- Upload date:
- Size: 2.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38d057bc5d2b703f22b93c1df97c27110b61c57189c7a58d5e5f7fa7cb27907e
|
|
| MD5 |
8a94a9ec2935e87bc75a5f1c112fe7b1
|
|
| BLAKE2b-256 |
2a56172ceca753bd592b0e719536ebda539245def0dd271e1e016f2f638ed613
|
Provenance
The following attestation bundles were made for degiro_portfolio-0.3.2.tar.gz:
Publisher:
publish.yml on jdrumgoole/degiro-portfolio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
degiro_portfolio-0.3.2.tar.gz -
Subject digest:
38d057bc5d2b703f22b93c1df97c27110b61c57189c7a58d5e5f7fa7cb27907e - Sigstore transparency entry: 832935303
- Sigstore integration time:
-
Permalink:
jdrumgoole/degiro-portfolio@e9e29f41a8555171ca64783a84a493dc7388062c -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/jdrumgoole
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e9e29f41a8555171ca64783a84a493dc7388062c -
Trigger Event:
push
-
Statement type:
File details
Details for the file degiro_portfolio-0.3.2-py3-none-any.whl.
File metadata
- Download URL: degiro_portfolio-0.3.2-py3-none-any.whl
- Upload date:
- Size: 54.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e368fb5e1af59ba54024259a71ce1a8528e6629aaf39b41c8bf16c9f4dfb028f
|
|
| MD5 |
a9a89d1efdc7bb9474bd113605fa1baf
|
|
| BLAKE2b-256 |
d46d01fb4d6a4a53474ef0399c40e7418532093e10d9b85dfc20aa6cd8940ac4
|
Provenance
The following attestation bundles were made for degiro_portfolio-0.3.2-py3-none-any.whl:
Publisher:
publish.yml on jdrumgoole/degiro-portfolio
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
degiro_portfolio-0.3.2-py3-none-any.whl -
Subject digest:
e368fb5e1af59ba54024259a71ce1a8528e6629aaf39b41c8bf16c9f4dfb028f - Sigstore transparency entry: 832935305
- Sigstore integration time:
-
Permalink:
jdrumgoole/degiro-portfolio@e9e29f41a8555171ca64783a84a493dc7388062c -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/jdrumgoole
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e9e29f41a8555171ca64783a84a493dc7388062c -
Trigger Event:
push
-
Statement type: