← Back to library

Stress-test a retirement plan against past bear markets

u/NinjaTrader007 on r/investing rebuilt a retirement portfolio with Claude and ran Monte Carlo simulations: a sixty-forty mix growing about six percent a year, with a few past bear markets dropped in at random across fifteen to twenty years, plus one-off shocks he wanted to see.

  • OutcomeHave an AI build a simulation of your retirement plan that drops historical downturns and big one-off costs into the years ahead, and shows the range of outcomes.
  • SetupUnder an hour
  • LevelIntermediate
  • Creditu/NinjaTrader007 on r/investing
View original
Works with
ClaudeChatGPTClaude Code

Published Oct 20, 2026Updated Oct 20, 2026AI dry run on sample input: passed Oct 20, 2026Source verified Oct 24, 2026

When should you use it?

  • You're near or in retirement and want to see how bad years would affect your plan
  • You've budgeted your spending monthly and know your big future expenses
  • You'd like a second look before, or alongside, a session with an advisor

Not for: Choosing investments or timing trades; this tests a plan, it doesn't recommend one; Replacing a fee-only planner if your situation is complex (pensions, taxes, estates)

What do you need, and what do you get?

You need

  • Your current allocation and balances (rounded is fine)
  • A monthly budget of expenses and income through the transition years
  • Planned one-off costs, such as a roof or a car, with rough years

You get

  • A simulation script you can rerun with different assumptions
  • The share of runs where money lasts your full horizon, and the worst cases
  • A plain-language summary of which assumptions matter most

How does it work, step by step?

  1. Write the budget firstSet out expenses and income month by month until they settle into a steady pattern.
  2. Describe the portfolioGive the allocation, starting balances and withdrawal plan.
  3. Run the simulationUse our prompt so the model writes code, inserts real historical downturns and reports the spread.
  4. Question the resultsChange growth rates, crash timing and expenses, then discuss the output with an advisor if you have one.

The prompt

Our own prompt, inspired by u/NinjaTrader007 on r/investing and written to work in Claude, ChatGPT and Claude Code. Values in lime are placeholders.

Fill in the blanks (optional; the copied prompt uses your values)

Prompt7 variables
Help me stress-test my retirement plan. Write the analysis as a script I can rerun, and list every assumption first.
Portfolio: {allocation_and_balances}. Monthly budget and income through the transition: {budget}. Planned one-off costs: {big_expenses}. Horizon: {years} years.
1. Run fixed scenarios first: steady growth at {base_rate}, and a severe early crash.
2. Then run {n} simulated paths that insert {k} historical bear markets at random years, modeling stocks and bonds separately.
3. Report the share of paths where money lasts the full horizon, the worst 10% of outcomes, and which assumptions change the result most.
Don't recommend specific investments.

Inspired by u/NinjaTrader007 on r/investing: Claude Monte-Carlo Simulations. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • Simulation results depend heavily on assumptions. Make it list every assumption at the top of the report.
  • Ask it to model stocks and bonds separately; a single blended return hides how bonds behave in a crash.

Our take

The question most retirees actually care about isn't average returns; it's whether the plan survives a bad sequence, such as a crash early in retirement on top of a big expense. This post shows a practical way to explore that with an assistant: build a monthly budget through the messy transition years, then run many simulated futures with real historical downturns placed at random. In the replies, the poster adds sensible refinements: fixed worst-case runs before the random ones, stocks and bonds modeled separately, and a cash and CD buffer to cover two or three years. Our caution is about false confidence. Every result depends on the growth rate, the downturns chosen and the spending assumptions, so we ask for those to be listed up front and for the work to be done in code you can rerun. This is planning support, not investment advice. In our dry run with a made-up $1.2M portfolio and budget, our prompt wrote a simulation script, ran 1,000 paths with 3 inserted downturns, reported that money lasted 25 years in 91% of runs, and showed that delaying a $60,000 renovation raised that figure.

Where the time goes back: A stress test that would take a planner a meeting or two to set up takes an evening, and you can rerun it whenever your plans change.

FAQ

Can I trust an AI to model this?
Trust the code you can read and rerun, not a number in a chat. Ask it to write the simulation as a script, show its inputs and test simple fixed scenarios first, as the poster did.
Should I still see an advisor?
The poster considered it, and it's sensible for big decisions. A simulation is a good way to arrive with clear questions.

Source and credit

Inspired by u/NinjaTrader007 on r/investing. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
Claude Monte-Carlo Simulations
Creator
u/NinjaTrader007 on r/investing
Published on
Reddit
Original date
Aug 31, 2026
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
Claude
AI dry run
Oct 20, 2026: passed. Dry-run tested by our AI test agent on sample input. Assumptions visible; analysis in code.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 24, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in Money & Admin

All 89 Money & Admin playbooks →

Related playbooks

Money & AdminWorkflow✓ AI dry run

Match apartment defects to the housing code before filing

A documented list of your apartment's problems, each tied to the code section it breaks and the building's public violation history, ready for complaints you file yourself.

Credit: Argona0x (@Argona0x)

An afternoon+
Money & AdminPrompt✓ AI dry run

Appeal a parking ticket with a clear, polite letter

Turn the facts behind a parking ticket into a short, respectful appeal to the right city office, with your evidence attached.

Credit: u/Fuhdawin on r/ChatGPT

Minutes
Money & AdminPrompt✓ AI dry run

Get your money back for a renewal you didn't approve

Write firm, evidence-backed emails that turn down store credit and ask for a refund of a subscription charge you canceled in time.

Credit: u/nenanwton on r/ChatGPT

Minutes
Money & AdminWorkflow✓ AI dry run

Plan your week from your inbox and a spoken to-do list

Let a coding agent read your recent email and current calendar, combine them with a to-do list you dictate, and propose a week's schedule for your approval.

Credit: u/Still_Reindeer_435 on r/AIPersonalAssistant

Under an hour