Skip to content

feat: v0.5 optimization suite#4

Merged
fall-development-rob merged 1 commit into
mainfrom
feat/v0.5-optimization
Apr 17, 2026
Merged

feat: v0.5 optimization suite#4
fall-development-rob merged 1 commit into
mainfrom
feat/v0.5-optimization

Conversation

@fall-development-rob
Copy link
Copy Markdown
Contributor

Summary

  • Glide-path allocation (src/glide-path.ts): resolveWeights() linearly interpolates portfolio weights across age-based steps. Integrated into runProjection and MC loop for per-year weight resolution.
  • Efficient frontier (src/efficient-frontier.ts): computeEfficientFrontier() with inline long-only QP solver, 20 frontier points, current-portfolio position, max-Sharpe tangency, min-variance, and distance-to-frontier.
  • Claiming optimizers (src/claiming-optimizers.ts): optimizeSsClaiming (62-70, SSA factors), optimizePensionClaiming (55-75, early/late factors), optimizeAnnuityTiming (current to retirement age, bundled rate table). All grid-search with configurable metric.
  • Bundled data: SSA_ADJUSTMENT_FACTORS (9 ages, 2025 rates), ANNUITY_RATE_TABLE (31 ages, male/female).
  • Types: GlidePathStep, FrontierPoint, EfficientFrontierResult, ClaimingOptimizerResult plus new optional Scenario fields.
  • Version: 0.4.0 -> 0.5.0. Zero new runtime dependencies. v0.4 scenarios produce identical output.

Test plan

  • 141 smoke tests pass (20+ new v0.5 assertions)
  • v0.3 backwards-compat fixture unchanged (Tests 13-14)
  • Empty glide_path produces identical output to v0.3 (Test 39)
  • Glide path changes deterministic projection output (Test 40)
  • Efficient frontier: 20 points, ordered, weights non-negative sum ~100 (Tests 30-33)
  • SS optimizer: 9-point sweep, optimal in [62,70] (Tests 34-35)
  • Pension optimizer: 21-point sweep (Test 36)
  • Annuity optimizer: correct sweep length and bounds (Tests 37-38)
  • SSA factors match CONTRACT-019 spec exactly (Test 28)
  • Build succeeds with no errors

🤖 Generated with claude-flow

…ng optimizers)

Implements ADR-034 through ADR-036 and CONTRACT-019:
- Glide-path allocation with linear interpolation (resolveWeights)
- Mean-variance efficient frontier with long-only QP solver (computeEfficientFrontier)
- SS claiming optimizer with SSA adjustment factors (optimizeSsClaiming)
- Pension claiming optimizer with early/late factors (optimizePensionClaiming)
- Annuity timing optimizer with bundled rate table (optimizeAnnuityTiming)
- Projection and MC integration for per-year glide-path weights
- 20+ new smoke test assertions; 141 total passing

Co-Authored-By: claude-flow <ruv@ruv.net>
@fall-development-rob fall-development-rob merged commit 10d8798 into main Apr 17, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant