Calculation catalog › Optimizer and comparisons

SWR rule result end year

Final planning year used to evaluate a displayed safe-withdrawal rule.

Field: endYear Unit: calendar year Basis: no dollar basis Computed by: Engine Status: Complete chain

Appears in: solver-page (withdrawal rule plan end year)

Calculation records

  • Swr rule end year Composition record, justified by derivation

    Purpose: Publish the rule run's ledger endpoint rather than its depletion year.

    Statement: decisions/swrComparator.ts#compareSwrRules publishes ProjectionResult.endYear, the final calendar year actually used by that safe-withdrawal-rule ledger run, without treating an earlier depletion year as the endpoint.

    Formula: SwrRuleResult.endYear = result.endYear

    • result.endYear: Final calendar year of the rule run (unit: calendar year) (domain: integer)
    • result.depletionYear: Depletion year, present only as a discriminator (unit: calendar year or null) (domain: integer or null)

    Timing: one completed rule run

    Rounding: none; integer calendar year

    Limits:

    • The simulation horizon is not depletion: substituting the depletion year, or recomputing a 30-year inclusive horizon from the start year, each name a different quantity. The worksheet's ledger endpoint and its depletion-year discriminator are supplied as a ProjectionResult literal at the simulate seam, so this proves the comparator's selection only; the ledger's own horizon arithmetic is out of scope for this record.

    Provenance: derived by codex, implemented by claude.

    Independent review: cursor

    Gates (6 of 6 pass): fixture registers a test: pass; pins resolve: pass; families exist: pass; worksheet exists: pass; mutation receipt exists: pass; provenance independent: pass

    Worksheet: swr-rule-end-year.md Mutation receipt: swr-rule-end-year.mutation.md

    Evidence tests: swrComparator.evidence.test.ts

    Implemented in: swrComparator.ts

    Is the number of: swr-rule-result-end-year

Records that feed this number

  • Swr rule rate and initial spend Model record, justified by derivation

    Purpose: Set initial spending from three published withdrawal-rate parameterizations.

    Statement: decisions/swrComparator.ts#compareSwrRules assigns Bengen 4.7%, Morningstar 3.9%, or ERN 1.75%+0.5(100/CAPE) and multiplies that percent by starting investable dollars to set constant-real initial annual spending before a same-plan ledger comparison.

    Formula: rates = (4.7,3.9,1.75+0.5*(100/CAPE)); initialSpend = startingInvestable * rate/100

    • CAPE: Cyclically adjusted price/earnings ratio (unit: 1) (domain: positive)
    • startingInvestable: Initial investable portfolio (unit: today USD) (domain: nonnegative)

    Timing: initial constant-real annual spending, before ledger comparison

    Rounding: none

    Limits:

    • Published rule parameterizations are planning lenses, not household safety guarantees. The worksheet pins rates and initial spending only; depletion, horizon, estate, and taxes come from the downstream ledger and are feeds.

    Provenance: derived by codex, implemented by codex.

    Independent review: cursor

    Gates (6 of 6 pass): fixture registers a test: pass; pins resolve: pass; families exist: pass; worksheet exists: pass; mutation receipt exists: pass; provenance independent: pass

    Worksheet: swr-rule-rate-and-initial-spend.md Mutation receipt: swr-rule-rate-and-initial-spend.mutation.md

    Evidence tests: swrComparator.evidence.test.ts

    Implemented in: swrComparator.ts

    Is the number of: swr-rule-result-initial-rate-pct, swr-rule-result-initial-annual-spend

    Feeds: swr-rule-result-depletion-year, swr-rule-result-end-year, swr-rule-result-ending-after-tax-estate, swr-rule-result-lifetime-taxes-and-penalties

Engine source: engine/src/decisions/swrComparator.ts (SwrRuleResult.endYear)

The evidence links on this page (each record's worksheet, mutation receipt, evidence tests and implementation, and the source links) are pinned to engine commit 2624dbdba9fd, committed 2026-10-11. The live calculation index and output-family census links point at the repository's main branch, so you can check this snapshot against them.