You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This causes the CAGR to always be calculated with the default periods per year (252), which leads to errors in the calculation when using other periods. It should be solved with:
I was coming to report the same error. I'm not sure it's a duplicate because the periods parameter is not being passed at all whereas the other issue recommends using 365 as the default number of periods if I understand correctly.
In line 839 of the file 'reports.py' the function '_stats.cagr' is called without passing the periods per year defined in the main call:
metrics["CAGR﹪%"] = _stats.cagr(df, rf, compounded) * pct
This causes the CAGR to always be calculated with the default periods per year (252), which leads to errors in the calculation when using other periods. It should be solved with:
metrics["CAGR﹪%"] = _stats.cagr(df, rf, compounded, periods=win_year) * pct
The text was updated successfully, but these errors were encountered: