A local-first portfolio tracker with a FastAPI backend and vanilla JS frontend.
cd portfolio-app
pip install -r requirements.txtRun once with portfolio_v4.html as the data source:
python seed.py ~/Downloads/portfolio_v4.htmlThis populates all 8 tables (tickers, transactions, prices, categories, sectors, brokers, fx_history, config).
uvicorn main:app --reloadOpen http://localhost:8000 in your browser.
To use a different port:
PORT=8080 uvicorn main:app --reload --port 8080| View | Description |
|---|---|
| Positions | Category-grouped holdings with P&L, expandable to individual positions |
| Insights | Allocation pie chart by category + sector bar chart |
| Transactions | Full transaction history with broker/type/date filters |
| Prices | Update prices per ticker (stalest first) |
| Add | Add new tickers or transactions |
portfolio.dbis never deleted or truncated by the app.- FX rate input re-fetches positions on the fly; persisted on blur.
- Cost basis uses historical quarterly FX rates from
fx_historytable. - Current value always uses the live FX rate from the sidebar input.