Skip to content

feat: add compounded flag to rar() for non-compounded returns#511

Open
austinchennn wants to merge 2 commits intoranaroussi:mainfrom
austinchennn:fix-rar-compounded
Open

feat: add compounded flag to rar() for non-compounded returns#511
austinchennn wants to merge 2 commits intoranaroussi:mainfrom
austinchennn:fix-rar-compounded

Conversation

@austinchennn
Copy link
Copy Markdown

Fixes #510

Description

Currently, the qs.stats.rar() function calculates the Risk-Adjusted Return by calling cagr() without exposing the compounded parameter. This forces a geometric CAGR calculation, which artificially inflates the RAR for intraday, capital-constrained, or non-compounded arithmetic return streams.

Changes Made

  • Added a compounded boolean flag to the rar() function signature.
  • Defaulted compounded=True to maintain strict backward compatibility for existing users.
  • Passed the compounded flag down to the underlying cagr() call.

This update ensures consistency across the library's statistical functions and provides accurate metrics for non-compounded trading strategies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant