The date lag for the calculation of 3Y and 5Y annualized return is based on 35 and 59 months, respectively.
This should be years=3/5 (or months=36/60) instead:
Current code:
d = today - relativedelta(months=35)
metrics["3Y (ann.) %"] = _stats.cagr(df[df.index >= d], 0.0, compounded) * pct
The date lag for the calculation of 3Y and 5Y annualized return is based on 35 and 59 months, respectively. This should be years=3/5 (or months=36/60) instead:
Current code: d = today - relativedelta(months=35) metrics["3Y (ann.) %"] = _stats.cagr(df[df.index >= d], 0.0, compounded) * pct
d = today - relativedelta(months=59) metrics["5Y (ann.) %"] = _stats.cagr(df[df.index >= d], 0.0, compounded) * pct