Goal
report.summarize() reports total_return_pct (cumulative) and xirr_pct (money-weighted). A CAGR column (time-annualized total return) is a familiar third lens people ask for.
What to do
- In
src/divvy/report.py summarize(), add a cagr_pct column: (ending_value / total_contributed) ** (1/years) - 1, where years is the span from first contribution to as_of. (It's a rough measure for a DCA account — document that in a comment; XIRR remains the rigorous one.)
- Add the
{:.2f}% format in the CLI table and the Streamlit UI styler (src/divvy/ui.py).
- Add a test in
tests/ (see tests/test_analytics.py for the pattern).
Acceptance criteria
- New
cagr_pct column shows in CLI + UI; test passes; ruff clean.
Goal
report.summarize()reportstotal_return_pct(cumulative) andxirr_pct(money-weighted). A CAGR column (time-annualized total return) is a familiar third lens people ask for.What to do
src/divvy/report.pysummarize(), add acagr_pctcolumn:(ending_value / total_contributed) ** (1/years) - 1, whereyearsis the span from first contribution toas_of. (It's a rough measure for a DCA account — document that in a comment; XIRR remains the rigorous one.){:.2f}%format in the CLI table and the Streamlit UI styler (src/divvy/ui.py).tests/(seetests/test_analytics.pyfor the pattern).Acceptance criteria
cagr_pctcolumn shows in CLI + UI; test passes; ruff clean.