AI-powered retirement planning with Monte Carlo simulations
Built by Nicholas Falshaw · Retirement planning with an AI advisor · Production since 2025
Retirement calculators come in two flavors: oversimplified single-slider toys, or spreadsheets with forty tabs that nobody maintains. Neither explains why your trajectory looks the way it does, and neither answers follow-up questions like 'what happens if I retire three years earlier?'
A web app combining Monte Carlo portfolio simulation (10,000 market paths) with an LLM advisor that interprets the distribution, stress-tests scenarios, and answers natural-language questions. Users input their current savings, contribution rate, target retirement age, and asset allocation — the engine returns a trajectory with a p10/p50/p90 confidence band and a plain-language narrative.
Next.js frontend
App Router, server components, charting via recharts
Simulation engine
Python worker running Monte Carlo with configurable return distributions, inflation, sequence-of-returns risk, spending-shock scenarios
Scenario storage
PostgreSQL persists every user scenario and simulation run for longitudinal comparison
RAG advisor
Ollama-hosted model with injected context (user inputs, simulation results, asset-class priors)
Auth
NextAuth v5 with Prisma adapter
Users see their retirement trajectory across 10,000 simulated market paths and can ask 'what if I retire three years earlier' or 'what if markets return 2% below historical' in plain language. All data stays on the owner's infrastructure — no third-party financial APIs.