Portfolio Risk Monitor
I was managing my own portfolio of Chinese equities and kept bouncing between broker pages and spreadsheets to answer one question: how much risk am I carrying right now. The goal was a single screen with everything on i…
I was managing my own portfolio of Chinese equities and kept bouncing between broker pages and spreadsheets to answer one question: how much risk am I carrying right now. The goal was a single screen with everything on it: risk, PnL, compound return, maximum drawdown, cash position, and BHB return attribution to show whether returns came from allocation or selection.
The biggest decision was Panel over a React frontend with an API behind it. This is a one-person, analytics-heavy project, and Panel lets the dashboard live in the same Python code as the Pandas analysis. The tradeoff is less control over UI polish, but iteration speed mattered more than pixels, and Panel still supports interactive plots, user login, and a customizable layout.
Market data comes from jqdatasdk, which is why the app supports Chinese equities only: that was the data source I could get free programmatic access to. A scheduler refreshes prices in the background, and PnL, compound return, and drawdown stream to the dashboard in real time.
For distribution I packaged it as Docker images for both arm64 and amd64 with CI on GitHub Actions, so anyone can run it with one docker command plus their own data credentials. A demo also runs on Hugging Face Spaces.