Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion quantstats/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,7 @@ def rar(returns, rf=0.0):
Args:
returns (pd.Series): Return series to analyze
rf (float): Risk-free rate (annualized, default: 0.0)
compounded (bool): Whether to compound returns for CAGR calculation (default: True)

Returns:
float: Risk-adjusted return
Expand All @@ -1582,7 +1583,7 @@ def rar(returns, rf=0.0):
returns = _utils._prepare_returns(returns, rf)

# Calculate CAGR and divide by exposure time
return cagr(returns) / exposure(returns)
return cagr(returns, compounded=compounded) / exposure(returns)


def skew(returns, prepare_returns=True):
Expand Down