Goal
Today divvy compare --expense-ratio 0.0006 applies one fee to every holding. Real baskets mix cheap and pricey funds (e.g. SCHD 0.06% vs. an active fund 0.5%). Let a bucket YAML optionally carry per-ticker fees.
What to do
- Support an optional
expense_ratios: map in the bucket YAML, e.g.:
weights: { SCHD: 0.5, VYM: 0.5 }
expense_ratios: { SCHD: 0.0006, VYM: 0.0006 }
- In
src/divvy/cli.py, read it from the YAML and pass it to run_backtest(..., expense_ratios=...) (the engine already accepts a per-symbol dict — see src/divvy/engine.py). Fall back to the flat --expense-ratio when the map is absent.
- Add a test.
Acceptance criteria
- A YAML with
expense_ratios: applies per-ticker fees; missing key → unchanged behavior; test passes; ruff clean.
Goal
Today
divvy compare --expense-ratio 0.0006applies one fee to every holding. Real baskets mix cheap and pricey funds (e.g. SCHD 0.06% vs. an active fund 0.5%). Let a bucket YAML optionally carry per-ticker fees.What to do
expense_ratios:map in the bucket YAML, e.g.:src/divvy/cli.py, read it from the YAML and pass it torun_backtest(..., expense_ratios=...)(the engine already accepts a per-symbol dict — seesrc/divvy/engine.py). Fall back to the flat--expense-ratiowhen the map is absent.Acceptance criteria
expense_ratios:applies per-ticker fees; missing key → unchanged behavior; test passes; ruff clean.