Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculation of 3Y and 5Y annualized return date lag #337

Open
mf12ca opened this issue Mar 4, 2024 · 0 comments
Open

Calculation of 3Y and 5Y annualized return date lag #337

mf12ca opened this issue Mar 4, 2024 · 0 comments

Comments

@mf12ca
Copy link

mf12ca commented Mar 4, 2024

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

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

No branches or pull requests

1 participant