quantstats icon indicating copy to clipboard operation
quantstats copied to clipboard

Add compounded flag to qs.stats.rar() for non-compounded return streams

Open austinchennn opened this issue 8 months ago • 1 comments

Description: Similar to Issue #507, the qs.stats.rar() function currently computes CAGR assuming daily compounded returns because it calls cagr() without exposing the compounded parameter.

For intraday or capital-constrained strategies, this geometric CAGR inflates the Risk-Adjusted Return.

Proposed Solution: Add a compounded boolean flag to rar() (defaulting to True for backward compatibility) and pass it down to cagr() to maintain consistency across the library. I would be happy to open a PR to implement this fix.

austinchennn avatar Mar 20 '26 01:03 austinchennn

Implemented in v0.0.82.

rar(returns, rf=0.0, compounded=True) is available, and reports.metrics() threads its own compounded setting through, so a report requested with compounded=False no longer shows a compounded figure. Thank you for the request.

ranaroussi avatar Sep 26 '26 08:09 ranaroussi