Skip to content

Add compounded flag to calmar() and rar()#512

Open
atharvajoshi01 wants to merge 1 commit into
ranaroussi:mainfrom
atharvajoshi01:fix/507-510-compounded-flag
Open

Add compounded flag to calmar() and rar()#512
atharvajoshi01 wants to merge 1 commit into
ranaroussi:mainfrom
atharvajoshi01:fix/507-510-compounded-flag

Conversation

@atharvajoshi01

Copy link
Copy Markdown

Fixes #507 and #510.

Both calmar() and rar() call cagr() internally but didn't expose its compounded parameter. For intraday or non-compounded return streams, geometric CAGR inflates these metrics.

Added compounded=True (backward compatible) to both functions, passed through to cagr().

# Before: always uses compounded CAGR
qs.stats.calmar(returns)

# Now: can use arithmetic returns
qs.stats.calmar(returns, compounded=False)
qs.stats.rar(returns, compounded=False)

…#510)

Both calmar() and rar() call cagr() internally but didn't expose
the compounded parameter. For intraday or non-compounded return
streams, geometric CAGR inflates these metrics.

Added compounded=True (backward compatible) to both functions,
passed through to cagr().
@atharvajoshi01

Copy link
Copy Markdown
Author

this still bites users on intraday returns or non-compounded streams. default stays compounded=True so existing callers don't change. will rebase if there's drift on main.

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.calmar() for intraday / non-compounded return streams

1 participant