7.6k stars · Apache-2.0 · v0.0.81 (2026-01-13) · Track this in Scout
Portfolio tearsheets from a returns series — the monthly-returns heatmap that tests the 2%-a-month claim, under a licence he can ship.
▶Repo detailsthe review · specs · pros & cons · install
What it is
A portfolio analytics library. Hand it a series of returns and it produces the full professional statistics set — Sharpe and Sortino ratios, maximum drawdown, win rate, rolling volatility, a monthly-returns heatmap — and writes the lot into a single self-contained HTML report.
What it is good for. A trading target is usually stated as a monthly number, and quantstats's headline output is a monthly-returns table: the exact grid that shows whether two percent a month is a real pattern or one lucky quarter dragging eleven mediocre ones behind it. But the sharper reason it belongs here is the licence. Edition 2 flagged that backtesting.py is AGPL, and its own correction flagged that vectorbt carries a Commons Clause — which together mean neither can safely sit inside a paid trading product. QuantStats is Apache-2.0. It is the reporting layer you can actually put in front of customers. Build the tearsheet users will see on this, and keep the AGPL backtester strictly for private research.
- Apache-2.0 — unlike both of those backtesters, it is safe inside a commercial product
- The monthly-returns heatmap is a monthly target rendered as a picture you can look at
- One call produces a complete HTML report you can hand straight to a user or serve in a browser
- It reports; it does not backtest. Something else still has to produce the returns series
- Version 0.0.81 after years of releases — a low-ceremony project, and some plotting dependencies are fussy about versions
- Beautiful statistics on an overfitted strategy are still an overfitted strategy. It will flatter you convincingly
pip install quantstats



