Description
QuantStats is a Python library for portfolio analytics, built for quants and portfolio managers who want a clearer view of how a portfolio performs. It has three modules. quantstats.stats calculates performance metrics such as the Sharpe ratio, win rate and volatility. quantstats.plots visualizes performance, drawdowns, rolling statistics and monthly returns. quantstats.reports generates metric reports, batch plots and tear sheets that can be saved as HTML files. You can create basic or full metrics and plots, a combined basic or full report, or a complete HTML tear sheet. The library also includes Monte Carlo simulations for probabilistic risk analysis. The readme explains an important limitation. QuantStats analyzes return series, such as daily, weekly or monthly returns, not discrete trades. Win rate, consecutive wins and losses, payoff ratio and profit factor are therefore counted by period, so a multi-day trade can count as several wins and losses. The readme says these metrics suit systematic strategies with regular rebalancing, and that discretionary traders with multi-day trades may see results that differ from trade-level statistics. The project is on GitHub, and the listing shows it as free.…
Highlights
- Sharpe ratio, win rate and volatility metrics
- Charts for drawdowns, rolling statistics and monthly returns
- HTML tear sheets and batch plots
- Monte Carlo simulations for risk
Ratings & Reviews
No ratings yet
Be the first to rate Quantstats.
People also visit
Quantstats FAQ
What is QuantStats?
A Python library for portfolio analytics, with performance metrics, charts and HTML reports.
Who is it for?
Quants and portfolio managers, according to the readme.
How do I create a full report?
The readme shows qs.reports.html for a complete HTML tear sheet, and qs.reports.full for full metrics and plots.
Does it analyze individual trades?
Not directly. It analyzes return series, so win rate and similar metrics are counted per period, which can differ from trade-level statistics.
Does it include risk simulations?
Yes. The readme describes built-in Monte Carlo simulations for probabilistic risk analysis.
Is it free?
The listing shows it as free.
What are the best Quantstats alternatives?
Popular alternatives to Quantstats include QuantInvestStrats, EigenLedger and Portfolio Performance. See all Quantstats alternatives




