Markets and trading · Edition No. 4 · 29 Aug 2026

ranaroussi/quantstats

Portfolio tearsheets from a returns series — the monthly-returns heatmap that tests the 2%-a-month claim, under a licence he can ship.

← Markets and tradingRead the whole edition →

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.

Stars7.6k
LicenceApache-2.0
Latestv0.0.81 (2026-01-13)checked 7 Sep 2026
Written inPython
RunsLocally, on your own machine
Setup effort
1 / 5
Payoff
4 / 5
Good
  • 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
Watch for
  • 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
Install
pip install quantstats
Screenshots
ranaroussi/quantstats: GitHub preview cardranaroussi/quantstats: Screenshot 1ranaroussi/quantstats: Screenshot 2ranaroussi/quantstats: Screenshot 3

Get the next edition in your inbox

A dozen repositories, opened and checked. The licence read, the last release dated, and the ones that did not make it named with the reason. It is the half most lists leave out.

No tracking pixels. One click to leave. The archive stays free either way.

We use your address to send the edition and nothing else. Confirm by email, leave in one click. How we handle it.