- Clone the repository:
git clone https://github.com/magurh/portfolio-tracker.git
cd portfolio-tracker
uv
is used for dependency management. Follow the steps outlined in the official documentation for installation. Whenever new dependencies are added, or for initial repository setup, run:
uv sync --all-extras
-
Add your transactions in the
data
folder, following the formatting instructions of the csv files. Keep the same names for the spreadsheet files. Make sure that all tickers are available for theyfinance
package -- for instance, VUSA needs to be replaced by VUSA.AS. -
Rename the
.env.dummy
file to.env
. If data is saved in a private subdirectory inside thedata
folder, name this subdirectoryprivate_data
, and setPRIVATE_PATH
to"private"
inside the env file. Otherwise, no changes are needed to the environment variables. -
Run the visualizer:
uv run python -m portfolio_tracker.app
Enjoy!
Stock Analytics:
- Current portfolio dashboard: valuation and breakdown
- Realized and unrealized gains from historic positions (FIFO method)
- Separate tabs for stocks and index funds
- Portfolio performance over time and benchmark comparison
- Dividends and Commissions
- Tax calculation on capital gains
To be added at a later stage:
- Crypto assets
- Forex and cash positions
Fixes:
- Stock splits: as the tracker is aware of stock splits, make sure that the transactions are not manually adjusted for those.
- Formatting for tables
- Renaming and/or delistings of tickers
To use Jupyter Lab, set the kernel to the fast-updates-monitoring environment created by poetry:
uv run python -m ipykernel install --user --name=portfolio-tracker
One can open Jupyter lab using poetryuv run jupyter lab
.
To add new dependencies, use: uv add <dependency>
.