Replies: 1 comment
-
|
There is another issue when trrying to analyze assets/portfolios which don't follow standard US trading days convention. If you have more portfolio values within one year actual dates, quantstats would infer period length based on 252. Hence actual 300 days of portfolio returns within one year would be assumed as 1.2 years which eventually lead to incorrect CAGR. This is based on v0.77 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The current way to calculate CAGR is incorrect. The years component should be:
total_days = len(df.index)
years = total_days / 252.
it looks like the way it is currently configured it counting weekends in the numerator but not the denominator. this understates CAGR.
thanks
def cagr(returns, rf=0.0, compounded=True, periods=252):
"""
Calculates the communicative annualized growth return
(CAGR%) of access returns
Beta Was this translation helpful? Give feedback.
All reactions