Calculation catalog › Monte Carlo

Monte carlo prob ending surplus

Share of paths whose ending after-tax estate is positive.

Field: Probability of ending with a surplus Unit: probability Basis: no dollar basis Computed by: Engine Status: Complete chain

Appears in: monte-carlo-page (Adjustment tile "Chance of ending with money left")

Calculation records

  • Guardrail adjustment shares, depths, durations and ending surplus Formula record, justified by derivation

    Purpose: How likely a mid-course spending cut is, how deep and how long it runs among the paths that cut, and how often the plan still ends with something left.

    Statement: pathsWithCut is the share of all paths with at least one cut year and pathsWithRaise the share with at least one raise action. Among the cut paths only: averageCutYears is their mean guardrailCutYears, p90CutYears its interpolated 90th percentile, medianMaxCutDepth and p90MaxCutDepth the interpolated 50th and 90th of their maxGuardrailCutDepth, and averageLongestCutSpellYears their mean longestGuardrailCutSpellYears. probEndingSurplus is the share of all paths whose ending after-tax estate is strictly positive; probEndingAboveBequestTarget is the share of the paths carrying a target that cleared it, and exactly null when no path carries one. For the worksheet's five paths: 0.6, 0.6, 14/3, 7.2, 0.3, 0.54, 3 years, 0.6 and 0.6. Units: shares in [0, 1], years, and depth as a fraction of the discretionary layer. Rounding: none; absolute 1e-9, with the no-target null compared exactly.

    Formula: pathsWithCut = |{p : cutYears_p > 0}| / N; among those paths, averageCutYears = mean(cutYears), p90 by interpolation at 0.9(m-1); probEndingSurplus = |{p : estate_p > 0}| / N

    • N: All paths (unit: paths) (domain: worksheet 5)
    • m: Paths with at least one cut year (unit: paths) (domain: worksheet 3)
    • cutYears_p, spell_p, depth_p: One path's cut years, longest consecutive cut spell and deepest cut (unit: years, years, fraction) (domain: worksheet [2,4,8], [1,3,5], [0.10,0.30,0.60] among cut paths)
    • estate_p: One path's ending after-tax estate (unit: usd) (domain: worksheet 0, 100, 200, 0, 50)

    Timing: once per aggregation, over the completed path set

    Rounding: none

    Limits:

    • Every cut statistic divides by the cut paths, not by all paths: over all five, average cut years would be 2.8 and the average longest spell 1.8 years
    • A zero ending estate is not a surplus; probEndingSurplus takes a strictly positive estate, so counting zeros would give 1 rather than 0.6
    • probEndingAboveBequestTarget divides by the paths whose comparison is non-null, and is null only when no path carries a target; all five worksheet paths carry one, so that denominator and the path count coincide here
    • The cut statistics are all zero for a plan with no guardrail policy, which is not the same claim as a plan that cut nothing
    • guardrailActionCounts is summed elsewhere (monte-carlo-guardrail-action-counts); this record publishes path shares and conditional magnitudes only
    • The evidence supplies the guardrail fields, endingAfterTaxEstate and endingAboveBequestTarget only; every other MonteCarloPath field is at the test’s neutral (no depletion or shortfall, floor and target met, attainment 1, no goal activity)

    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: monte-carlo-guardrail-adjustments.md Mutation receipt: monte-carlo-guardrail-adjustments.mutation.md

    Evidence tests: run.evidence.test.ts

    Implemented in: run.ts

    Is the number of: monte-carlo-paths-with-cut-share, monte-carlo-paths-with-raise-share, monte-carlo-cut-years, monte-carlo-max-cut-depth-percentiles, monte-carlo-average-longest-cut-spell-years, monte-carlo-prob-ending-surplus, monte-carlo-prob-ending-above-bequest-target

Engine source: engine/src/montecarlo/run.ts (MonteCarloSummary.adjustments.probEndingSurplus)

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.