Skip to content

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

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

Add compounded flag to calmar() and rar()#512
atharvajoshi01 wants to merge 1 commit intoranaroussi: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().
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