lib-quantstatslisted
Install: claude install-skill howard-lynn-ye/fin-skills
# quantstats
One-call HTML tearsheets and performance analytics — enormously popular, and the source of more quietly wrong
published numbers than anything else in this domain.
| | |
|---|---|
| pip / import | `QuantStats` / `quantstats` (conventionally `import quantstats as qs`) |
| Version | **0.0.81** (2026-01-13) · Python `>=3.10` |
| Licence | Apache-2.0 |
| Status | ⚠️ **burst-maintained** — 7,612★ / 32 issues; no default-branch commits since 2026-01-13 |
The maintenance pattern matters because of the bugs below: 0.0.78 ("2026 Modernization Update") shipped with
circular-import errors hot-fixed through 0.0.79, 0.0.80 and 0.0.81 **the same day**, and the metric bugs survived it.
Forks: `quantstats-lumi` 1.1.5, `quantstats-reloaded` 0.1.0.
## The trap that costs you money
🚨 **CONFIRMED BUG: `quantstats.stats.cagr()` discards `rf`.** The signature is `cagr(returns, rf=0.0, compounded=True,
periods=252)` and the docstring says it computes the CAGR
*"of excess returns"*. **The parameter has no effect.** Root cause in
`quantstats/utils.py::_prepare_returns`, which dispatches on the **caller's function name**:
```python
function = inspect.stack()[1][3]
unnecessary_function_calls = ["_prepare_benchmark", "cagr", "gain_to_pain_ratio", "rolling_volatility"]
if function not in unnecessary_function_calls:
if rf > 0:
return to_excess_returns(data, rf, nperiods)
```
`"cagr"` is on the exclusion list, so `rf` is accepted and silently dropped. The **same list disable