Skip to content

A local-first personal finance app

:chart_with_upwards_trend: Monte Carlo - Stop the min spending from raising the spending above planned (#9414)

Michael Clarka3a1c7fc41f8
diff --git a/packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx b/packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx
index dfb9dbc5a1..fe49d59e17 100644
--- a/packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx
+++ b/packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloRunDetailTable.tsx
@@ -767,7 +767,7 @@ export function MonteCarloRunDetailTable({
<PrivacyFilter>
<FinancialText as="span">
{t(
- 'Raised to the minimum spending: {{amount}}.',
+ 'Lifted by the minimum spending floor to {{amount}}.',
{
amount: format(
row.plannedSpending,
diff --git a/packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloWithdrawalRuleConfiguration.tsx b/packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloWithdrawalRuleConfiguration.tsx
index 9f554bfec0..92cacce2b4 100644
--- a/packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloWithdrawalRuleConfiguration.tsx
+++ b/packages/desktop-client/src/components/reports/reports/monte-carlo/MonteCarloWithdrawalRuleConfiguration.tsx
@@ -84,11 +84,14 @@ export function MonteCarloWithdrawalRuleConfiguration({
</Text>
<MonteCarloHelpTooltip>
<Trans>
- The lowest amount you need to live on in any year, no matter
- what the rule says: when the rule cuts below it, the plan is
- lifted back up to it and that is what gets spent. Income
- counts towards it, so the pots only withdraw enough to top it
- up. It only applies in years with planned spending - a
+ The lowest amount you need to live on, no matter what the rule
+ says: when the rule cuts below it, spending is lifted back up
+ to it. It never raises spending above what a phase plans -
+ each year the floor is the lower of this amount and the
+ phase&apos;s planned spending, so a floor sized for full
+ retirement simply holds cheaper part-time years at their plan.
+ Income counts towards it, so the pots only withdraw enough to
+ top it up. It only applies in years with planned spending - a
spending phase set to 0 takes nothing. Like your planned
spending, it&apos;s in today&apos;s money and rises with
inflation. Set to 0 for no floor.
diff --git a/packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.test.ts b/packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.test.ts
index 9cf6d5edc6..75eb5ceb8e 100644
--- a/packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.test.ts
+++ b/packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.test.ts
@@ -1449,6 +1449,38 @@ describe('runMonteCarloSimulation', () => {
);
});
+ it('never lifts a cheaper phase above its plan to reach the floor', () => {
+ // A staged retirement: 10,000 a year of part-time spending for three
+ // years, then 100,000 in full retirement. A 75,000 floor sized for
+ // the second phase must leave the first phase at its 10,000 plan
+ const result = runMonteCarloSimulation(
+ makeParams(
+ {
+ horizonYears: 5,
+ inflationMean: null,
+ spendingPhases: [
+ {
+ id: 'part-time',
+ name: '',
+ fromAge: null,
+ annualWithdrawal: 10_000,
+ },
+ { id: 'retired', name: '', fromAge: 63, annualWithdrawal: 100_000 },
+ ],
+ withdrawalRule: { ...WITHDRAWAL_RULE_DEFAULTS, type: 'guardrails' },
+ minimumSpending: 75_000,
+ captureRunDetail: 0,
+ },
+ { startingBalance: 1_000_000, expectedReturnMean: 0, returnStdDev: 0 },
+ ),
+ );
+ const rows = result.runDetail!;
+ expect(rows.map(row => row.plannedSpending)).toEqual([
+ 10_000, 10_000, 10_000, 100_000, 100_000,
+ ]);
+ expect(rows.some(row => row.minimumApplied)).toBe(false);
+ });
+
it('minimum spending floor neutralizes rule cuts', () => {
const base = makeParams(
{ annualWithdrawal: 10_000, horizonYears: 30 },
diff --git a/packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts b/packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts
index fb2c8e26f4..3859ae9569 100644
--- a/packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts
+++ b/packages/desktop-client/src/components/reports/reports/monte-carlo/monteCarloSimulation.ts
@@ -2279,11 +2279,13 @@ export function runMonteCarloSimulation(
// zero-spend phase takes nothing. Like the phase amounts it's in
// today's money, so it rises with this replay's inflation path.
// It is a floor on spending, so income counts towards it and the
- // pots only top the year up to it
+ // pots only top the year up to it. It never lifts spending above
+ // the plan itself: a floor sized for full retirement must not
+ // inflate a cheaper phase, such as part-time years before it
const minimumThisYear = minimumSpending * cumulativeInflation;
- const minimumFromPots = Math.max(
- 0,
- minimumThisYear - incomeTowardsSpending,
+ const minimumFromPots = Math.min(
+ planned,
+ Math.max(0, minimumThisYear - incomeTowardsSpending),
);
if (
rule.type !== 'none' &&
@@ -2707,7 +2709,10 @@ export function runMonteCarloSimulation(
) {
tailAdjustedPlan = Math.max(
tailAdjustedPlan,
- minimumSpending * cumulativeInflation - tailIncomeTowardsSpending,
+ Math.min(
+ tailPotFundedPlan,
+ minimumSpending * cumulativeInflation - tailIncomeTowardsSpending,
+ ),
);
}
runDetail.push({
diff --git a/packages/docs/docs/experimental/monte-carlo-analysis.md b/packages/docs/docs/experimental/monte-carlo-analysis.md
index fc922d57bd..ffbe5226c0 100644
--- a/packages/docs/docs/experimental/monte-carlo-analysis.md
+++ b/packages/docs/docs/experimental/monte-carlo-analysis.md
@@ -158,11 +158,11 @@ By default, the simulation withdraws the same (inflation-adjusted) amount every
All the rules share a few ideas:
-- Your **spending phases** set the planned amounts. The rules wake up in your first year of planned spending: that year takes the planned amount (only a **Minimum spending** set higher than it can override that), and from the next year onward the rule adjusts what's actually taken - independently in every replay, reacting to how that replay is going. Zero-spend years (for example, working years before retirement) neither trigger nor move the rules. A cut or raise carries across phase boundaries: if the rule cut your spending by 10% during a rough patch, the next phase's amount starts 10% lower too.
+- Your **spending phases** set the planned amounts. The rules wake up in your first year of planned spending: that year takes the planned amount, and from the next year onward the rule adjusts what's actually taken - independently in every replay, reacting to how that replay is going. Zero-spend years (for example, working years before retirement) neither trigger nor move the rules. A cut or raise carries across phase boundaries: if the rule cut your spending by 10% during a rough patch, the next phase's amount starts 10% lower too.
- Rules usually improve your **success rate** by cutting spending in bad times, but that safety isn't free - you get it by living on less. Keep an eye on the **Median total withdrawn** stat to see what a rule costs you in income.
- Rules only see the wealth you can actually spend. If a pension is locked until its access age, it doesn't earn you spending raises while a bridge pot pays the bills - the rules watch the accessible pots, and the pension starts counting the moment it unlocks.
-If you set a **Minimum spending**, your yearly spending never drops below that amount, no matter what the rule says - it is the lowest amount you need to live on, so when the rule cuts below it the plan is lifted back up to it and that is what gets spent. [Income streams](#income) count towards it, so the pots only withdraw enough to top your spending up to the floor - a 12,000 floor with a 10,000 state pension means the pots never pay less than 2,000. It only applies in years you actually plan to spend - a spending phase set to 0 (for example, years before retirement while your salary covers your costs) takes nothing. Like your spending phases, it's an amount in today's money - it rises with inflation so its spending power holds steady.
+If you set a **Minimum spending**, the rule can never cut your yearly spending below that amount - it is the lowest amount you need to live on, so when the rule cuts below it the plan is lifted back up to it and that is what gets spent. The floor never raises spending above what a phase plans: in each year it is the lower of your minimum and that phase's planned amount. So you can size it for full retirement without it inflating a cheaper phase - with a part-time phase of 10,000 a year followed by full retirement at 100,000, a 75,000 floor holds the part-time years at their full 10,000 (the rule can't cut them at all) and holds the full-retirement years at 75,000. [Income streams](#income) count towards it, so the pots only withdraw enough to top your spending up to the floor - a 12,000 floor with a 10,000 state pension means the pots never pay less than 2,000. It only applies in years you actually plan to spend - a spending phase set to 0 (for example, years before retirement while your salary covers your costs) takes nothing. Like your spending phases, it's an amount in today's money - it rises with inflation so its spending power holds steady.
### Guardrails (Guyton-Klinger)
diff --git a/upcoming-release-notes/fix-monte-carlo-minimum-spending-phases.md b/upcoming-release-notes/fix-monte-carlo-minimum-spending-phases.md
new file mode 100644
index 0000000000..60b5ea89c1
--- /dev/null
+++ b/upcoming-release-notes/fix-monte-carlo-minimum-spending-phases.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [MikesGlitch]
+---
+
+Monte carlo - Stop the minimum spending floor raising a cheaper spending phase above its planned amount