TradeBot Check
Trading involves a risk of losing money. Nothing on this site is financial advice and past results do not guarantee future results. Risk disclosure
Backtesting

QuantStats

Python library that turns a series of returns into performance and risk metrics, charts and a full HTML tearsheet, handy for reviewing any backtest or portfolio.

ranaroussi/quantstats★ 7,943 stars last commit 2026-11-02
Our take

A quick way to see a backtest or portfolio the way analysts do: Sharpe, drawdowns, monthly heatmaps and a shareable HTML report from a few lines of Python.

Who it is for

Python users who already have returns from a backtest, a bot or a portfolio and want clear statistics and charts.

Strengths

  • Metrics include Sharpe, Sortino, volatility, win rate, CVaR and the Kelly criterion.
  • Charts cover drawdowns, rolling statistics, monthly returns and yearly returns.
  • Report modes (metrics, plots, basic, full, html) produce a complete HTML tearsheet.
  • Includes Monte Carlo simulations for probabilistic risk analysis.

Good to know

  • Metrics work on return series, not individual trades, so trade-level statistics can differ.
  • The README says full documentation is still coming soon.
  • Needs Python 3.10 or later plus pandas, numpy, scipy, matplotlib, seaborn and yfinance.
  • Past statistics describe history only and are illustrative, not a promise of future results.

Custom bots are coming soon
We are preparing a service to build bots on tools like this one. Follow our Telegram channel to know when it opens.

Notify me

Real-life uses

Backtest tearsheet generator

After every backtest, feed the returns into a script that builds a standard report with drawdowns, monthly returns and risk ratios, so you compare strategies on the same page. Illustrative only, never a promise of returns.

📑 Report ready: max drawdown -12.4%, Sharpe 0.9, 7 of 12 months positive (example figures).

Compare it with others

Guides that use it

Quick answers

How much does QuantStats cost?

Free and open source. Prices change, so check the official website before you decide.

Is QuantStats open source?

Yes. License: Apache-2.0.

Who is QuantStats for?

Python users who already have returns from a backtest, a bot or a portfolio and want clear statistics and charts.

What is QuantStats written in?

QuantStats is written in Python.

What should I know before using QuantStats?

Metrics work on return series, not individual trades, so trade-level statistics can differ. The README says full documentation is still coming soon. Needs Python 3.10 or later plus pandas, numpy, scipy, matplotlib, seaborn and yfinance. Past statistics describe history only and are illustrative, not a promise of future results.

Want a bot like this when custom bots open? Get notified · All comparisons · Guides

Sources

Every fact on this page comes from these sources, checked on 2026-11-25. If something has changed, the source wins.

  1. https://github.com/ranaroussi/quantstats: features, modules, install command, requirements, limitations
  2. https://api.github.com/repos/ranaroussi/quantstats: Apache-2.0 license, about 7,900 stars, active (last push 2026-11-02), not archived

Alternatives in Backtesting