ranaroussi/quantstats

Portfolio analytics for quants, written in Python

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 45 minutes ago
Added to GitGenius on September 8th, 2026
Created on May 1st, 2019
Open Issues & Pull Requests: 31 (+0)
GitHub issues: Enabled
Number of forks: 1,232
Total Stargazers: 7,624 (+1)
Total Subscribers: 121 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 37.7 days
Mean response time: 220.4 days
90th percentile: 876.4 days
Tracked items: 159

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 10% of issues opened in the past year have been closed. Three people close 97% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 12
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 114 days
Stale 30+ days: 11
Stale 90+ days: 8

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

QuantStats is a Python library for portfolio analytics that helps quants and portfolio managers evaluate strategy performance through in-depth metrics and risk analysis.

The tool addresses the need to understand portfolio behavior beyond simple returns by providing three core modules: a stats module for calculating performance metrics like Sharpe ratio, win rate, and volatility; a plots module for visualizing performance, drawdowns, and rolling statistics; and a reports module for generating tear sheets and batch analyses. It includes Monte Carlo simulation capabilities for probabilistic risk analysis. The library operates on return series data rather than discrete trade entries, making it well-suited for systematic and algorithmic strategies with regular rebalancing where period-based metrics like consecutive wins and profit factors are meaningful.

Developers should understand that QuantStats analyzes returns at the period level (daily, weekly, or monthly), not at individual trade boundaries. This approach works well for algorithmic trading strategies and systematic rebalancing but may not align with how discretionary traders track multi-day trades. The library can generate reports in multiple formats, including interactive HTML tear sheets, and provides both basic and full metric variants depending on analysis depth needed.

The project shows consistent maintenance with regular updates documented in its changelog. Development activity demonstrates ongoing refinement of existing functionality and documentation improvements to clarify how period-based metrics work and their appropriate use cases.