Files
sure/app
Guillem Arias ec6fc1d685 feat(retirement): PR4b "Why this target?" card + trimmed-mean anchor
- IncomeStatement#trimmed_mean_expense(months:, trim_pct:) — trailing-N-
  month mean monthly expense with the top/bottom trim_pct% of months
  dropped, so one-off spikes don't skew the anchor. Family#retirement_
  spending_baseline now uses it (was median).
- Goal::Retirement#fi_number — 25× the annual target (4% rule).
- "Why this target?" card on the show page: Last-12-months anchor →
  Target → FI number (25×), with a "Use my average" button that sets
  target_spend to the trimmed-mean baseline. Money is privacy-sensitive.
- Header gains a green-dot "Active plan" DS::Pill badge when projectable.

Tests: trimmed_mean returns non-negative; fi_number = 25× annual target;
baseline returns Money. Rubocop + erb_lint clean.
2026-05-29 12:34:40 +02:00
..
2026-03-25 10:50:23 +01:00