Skip to content

An investment portfolio manager tracking performance and gains.

License

Notifications You must be signed in to change notification settings

magurh/portfolio-tracker

Repository files navigation

python License: MIT

Portfolio Tracker

Setup

  1. Clone the repository:
git clone https://github.com/magurh/portfolio-tracker.git
cd portfolio-tracker
  1. 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
  1. 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 the yfinance package -- for instance, VUSA needs to be replaced by VUSA.AS.

  2. Rename the .env.dummy file to .env. If data is saved in a private subdirectory inside the data folder, name this subdirectory private_data, and set PRIVATE_PATH to "private" inside the env file. Otherwise, no changes are needed to the environment variables.

  3. Run the visualizer:

uv run python -m portfolio_tracker.app

Enjoy!

Status and Notes

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

Extras

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>.

About

An investment portfolio manager tracking performance and gains.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published