Project · 2023
Portfolio Tracker
A full-stack tracker for a mixed Canadian and US stock portfolio. It records every trade and cash flow, handles dividends, splits and currency, then answers the only question that matters. How is this actually doing, and against what.
Read-only demo with a sample portfolio. The real app runs locally with your own data.
01 Overview
Knowing what your money actually did
Brokerage statements are good at telling you what you own and bad at telling you how you have done. They rarely separate the money you added from the return you earned, and they almost never compare you to the index you could have bought instead.
Portfo answers that properly. It keeps a universe of tradable securities across the S&P 500, the S&P/TSX 60 and CIBC CDRs, stores daily price history back to 2020, and records trades and cash flows either one at a time or in bulk from a CSV. From that it computes both kinds of return over any window you pick.
The base currency is Canadian, so US holdings are converted at the historical rate for each day rather than today's. Dividends and stock splits are applied on their real dates, which is what keeps a position like an NVIDIA holding honest through a ten-for-one split.
Two returns tell the whole story. What the assets did, and what you did.
02 What it does
The numbers a statement leaves out
Built around the distinction between market return and your return.
Two kinds of return
Time-weighted return for a fair comparison against an index, and money-weighted return (XIRR) for what your dollars actually earned.
Benchmarks
Your equity curve overlaid on the S&P 500, the Nasdaq 100 and the S&P/TSX 60, on the same rebased axis.
Risk metrics
Volatility, Sharpe and Sortino, maximum drawdown, plus beta, alpha and tracking error against the chosen benchmark.
Corporate actions
Dividends and splits applied on their real dates, with an optional reinvestment (DRIP) view.
Mixed currency
A CAD base with US positions converted at each day's historical USD/CAD rate, not a single spot rate.
Open and closed
Per-position performance for what you still hold and what you have already sold, including realized gains.
03 Under the hood
A real backend, and an honest demo
This one is genuinely full-stack. A FastAPI service with SQLAlchemy and SQLite owns the data and the maths, pulling market history from Yahoo Finance on a schedule. A React and TypeScript front end sits on top, with TanStack Query for fetching, Recharts for the curves, and the whole interface in English and French.
Portfo is deliberately a local, single-user tool. It has no login and one portfolio, which is exactly right on your own machine and exactly wrong on the open internet, where any visitor could read or wipe the book. So rather than pretend otherwise, the demo here is read-only. I seeded a sample portfolio, let the real backend compute everything from real market data, then froze those results as static JSON the page reads directly. The figures you see are genuine, including a position carried through a ten-for-one split.
Writing is switched off in the demo. To use it with your own trades you run it locally, which is what it was built for.
Educational use only, not investment advice. Figures come from free, unaudited market data and the demo portfolio is illustrative, not a real book. Always verify against your broker's own statements.
See what the statement does not show
Open the demo and compare a sample portfolio against the indexes it was competing with.