I’ve been exploring ProjectionLab recently (the FIRE planning tool everyone raves about), and honestly, the Monte Carlo simulation feature is impressive. Instead of giving you a single “you’ll retire at age 45” number, it runs thousands of simulations with varying market returns, inflation rates, and spending patterns—then shows you a probability distribution. Like “80% chance of retiring by 45, 95% chance by 48.”
This got me thinking: can we replicate this with Beancount + Python?
What ProjectionLab Does
From what I can tell, ProjectionLab’s Monte Carlo engine:
- Takes your current net worth and spending rate
- Projects forward 10-40 years
- Randomizes investment returns each year (based on historical volatility)
- Randomizes inflation (within realistic bounds)
- Runs 10,000+ simulations
- Shows you the spectrum of possible outcomes
The result is a chart showing probability ranges—not false precision, but honest uncertainty. Which is way more useful for FIRE planning than “assume 7% returns forever.”
The Beancount Advantage
Here’s what got me excited: Beancount gives us actual historical data instead of guesses:
- Real spending: Pull 3-5 years of expenses from my ledger, not “I think I spend $40K/year”
- Real returns: Calculate my actual portfolio performance (not assumed 7%)
- Real savings rate: Income - Expenses over time, accounting for raises, lifestyle inflation, etc.
- Real volatility: Measure how much my monthly spending varies (helps model risk)
This eliminates the “garbage in, garbage out” problem that plagues most FIRE calculators.
Technical Implementation Questions
For those who’ve done this (or want to try):
1. What’s the minimum data requirement?
- Is 2 years of Beancount history enough, or do you need 5-10 years?
- Can you mix Beancount data (2 years) with historical spreadsheets (previous 5 years)?
2. Which Python libraries?
- NumPy for random distributions? (
numpy.random.normalfor returns, inflation) - Pandas for time series manipulation?
- Matplotlib/Plotly for visualization?
3. How do you model returns?
- Historical average ± standard deviation?
- Fat-tailed distributions (account for market crashes)?
- Different return assumptions for stocks vs bonds vs cash?
4. What’s the output format?
- Probability of success at different ages (80% at 45, 95% at 48)?
- Distribution chart showing 10th/50th/90th percentile outcomes?
- Safe withdrawal rate analysis?
The Value Proposition
Why build this when ProjectionLab exists?
For me:
- Privacy: My complete financial history stays on my laptop, not in someone’s cloud
- Customization: Can model weird edge cases (inheritance in 15 years, rental property income phase-out, etc.)
- Learning: Understanding the math makes me more confident in the results
- Integration: Generate report directly from my Beancount ledger—one source of truth
Effort vs reward: If this is a weekend project for someone Python-literate, it’s worth it. If it takes a month, maybe just use ProjectionLab and pay the $120/year.
Has Anyone Done This?
I found a few GitHub repos for retirement Monte Carlo in Python, but they all require manual input of current balance, spending, etc. Has anyone built a tool that reads Beancount ledger directly?
Something like:
$ python monte_carlo_fire.py --ledger my_finances.beancount --simulations 10000
Running 10,000 Monte Carlo simulations...
Current net worth: $287,450 (from Beancount)
Annual spending (3yr avg): $52,340 (from Beancount)
Savings rate (3yr avg): 42% (from Beancount)
Results:
- 50% probability of FI by age 43 ($1,100,000 target)
- 80% probability of FI by age 46 ($1,250,000 target)
- 95% probability of FI by age 49 ($1,400,000 target)
Generating charts in ./output/
The Moonshot Version
If we’re dreaming big: Fava plugin that adds a “Monte Carlo” tab showing:
- Interactive simulation controls (sliders for return assumptions, spending scenarios, etc.)
- Real-time probability charts
- “What-if” scenario comparison (what if I save $500 more per month?)
- Downloadable reports for sharing with spouse/financial advisor
Too ambitious? Or is this the kind of thing the Beancount community could build collaboratively?
I’m planning to start hacking on this next weekend—even if it’s just a rough Python script pulling data from my ledger. Happy to share progress (and inevitable failures) if anyone’s interested.
Questions:
- Has anyone already built this?
- Am I overcomplicating something ProjectionLab does better?
- Would a Monte Carlo Fava plugin be useful, or is this too niche?
Looking forward to hearing your thoughts!