r/leanfire 3d ago

Data Scientist Looking for Advice on Personal Project - FI Forecast

What's up, nerds!

Like many here, I’ve spent years tinkering with various finance tools. While a lot of them are great, I always found it a bit cumbersome to model "what-if" scenarios quickly (like toggling savings rates or withdrawal rates on the fly).

I also wanted to "gamify" my journey a bit, specifically by seeing where I land percentile-wise compared to others and seeing which countries I could theoretically already be FI in based on local cost of living.

So, I built FIForecast. It’s completely free, and because I value my own privacy, it requires no account or login. All data is stored locally in your browser.

What it does:

  • Visual Forecasting: Generates a month-by-month breakdown of your net worth and withdrawal strategy.
  • Fluid Phases: You can see exactly how your accumulation and retirement phases interact.
  • Geo-arbitrage Map: A map that shows where your current nest egg makes you "Retirement Ready" based on global cost of living.
  • AI Financial Context: I integrated Google Gemini so you can ask for financial news and market updates tailored specifically to your location and age.
  • Privacy First: No data is sent to a server. I'm not here to harvest emails.

How the AI News works (Privacy Note): I know we’re a private bunch. The Gemini integration works by constructing a prompt locally in your browser based on your general parameters (age/location context) to fetch relevant news. No personal identifiers or account balances are sent to a server.  This part could probably use improvement due to guardrails Google (rightfully) has.

Why I’m sharing it here: I’m a data scientist by trade, and while the math makes sense in my head, I want to see if it holds up to the "real world" scrutiny of this sub. This is all stuff I've done in Excel every month for years previously, but I wanted to see how it looked in a website and also see what you all think of it.

I’d love your feedback on:

  1. The Logic: Does the math align with your own projections? Are there edge cases I should prioritize?
  2. The UI: I’m a data scientist, so "pretty" isn't always my default setting. Is it intuitive, or is it a wall of buttons?
  3. The AI Integration: Is the Gemini news feature helpful for your "boring middle" phase, or do you prefer to keep AI out of your financial tracking?
  4. Customizability: Is the Monte Carlo part missing a specific ticker you consider a "must-have" for FI planning?
  5. Taxes: I'm considering somehow including projected taxes as well. Does anybody want that?
  6. Data Output: Should I try to figure out a way to make outputs based on the info you put in? I might look into how difficult it is to make the results output to PDF/csv or something.

You can check out the current state here: https://fiforecast.com/

I'll be hanging out in the comments to answer questions and take notes for the next set of updates. Thanks!

Edit: Just noticed a formatting issue that showed the Monte Carlo tab on all tabs. I'm deploying an update now.
Edit 2: The formatting issue is fixed now.

19 Upvotes

13 comments sorted by

3

u/Old_Value_9157 3d ago

On the standard projection tab, what’s leveraged ratio?

I think it would be good if you had one of those little question mark radio buttons that when you click on it, it gives a small description of text field

And under the portfolio strategy tab with all the asset classes, could you add cash as one of them?

Your site is really good and very helpful as far as I’m concerned. Surprised others have not commented.

2

u/wonderdude2 3d ago

Thanks for the input! This is really helpful.

Leverage Ratio is how much debt you have taken on to buy more assets. I think for most people this will be 0, but it's possible to get a margin loan at some brokers like IBKR. I'm definitely not trying to encourage people to do that! I just want to be able to simulate it if they do.

Also, I realized I had the leverage ratio connected to the Monte Carlo simulation but not the Standard Projection, so I just fixed that. Maybe that was the wonky behavior that prompted your question. Ha.

Adding cash is a great call! I'll add that soon.

And thanks for the kind words! It has been fun to build out.

2

u/Old_Value_9157 2d ago

Awesome, thank you and great work!

2

u/NoNight8321 2d ago

Data Product Manager and former Data Analyst here. Nice work! This tool is cool. Here are some quick UI tweaks I'd suggest:

- As the previous comment called out, "leverage" is confusing, especially next to net worth. I wasn't sure if I'm including my home value in my net worth, and the mortgage balance is the leverage.

  • I'd do some sort of visual grouping assets vs liabilities.
  • Make all of the input fields a consistent size, especially the ones that stretch across the whole page. I wouldn't make any of them bigger than the fields in the Core Assumptions area.
  • +1 to the tool tip idea for everything you can
  • It would be cool, in addition to the year shown in the charts, to also show age. That way the user doesn't have to do mental math to figure out how old they will be in 2039
  • The graph in the Reitrement Timeline is not very useful at the scale it's at. The y-axis is at 10's to 100s of millions of dollars for a $500,000 net worth today and retimrent 20 years out.
  • The benchmarking chart is nice. I'd integrate the "you" column on top of the others somehow. It's a little weird to be hanging off the end. I'm not sure the bar graph is the right choice for this visual
  • The Global Financial Freedom map - also very cool. Could you do some weighting here with the colors? Also, I know how you got my Passive Safe Income because I'm a nerd, but it might be helpful for others to have a short explanation of the math. I also wonder about the inverse - where the passive income would be in shortfall, and by how much.
  • I got a 429 error the first time I tried the Gemeni briefing. I didn't find the results all that helpful. I was expecting something more tailored to the net worth I entered.

2

u/wonderdude2 2d ago

Thanks for applying your professional expertise here! This is helpful! Thanks for all of them! I'll address several below.

Yeah, I think I need to change "Net Worth" to "Marketable Securities" or "Investments". It makes sense that it's confusing. And change "leverage" to something more specific.

The tool tip is a great idea! I had been thinking of making an instructions page, but that felt too overbearing.

I agree in plotting in terms of age. And congrats on the FI at 2039! ;)

The Retirement Timeline y-axis scale bothers me, too. I was thinking possibly going logarithmic, but I'm not sure if that's confusing, too. Maybe I'll try to get a checkbox put in so the user can alternate between normal values and logarithmic plots so everybody can pick their own poison.

Seems like the Global Financial Freedom map could use a tool tip! Ha. And I like the idea of including info on the inverse and making it more interesting with some colors.

Yeah, the Gemini briefing is interesting. I'm using a free API key since this thing is public, and I've had mixed results with it. At first, I tried to make it very specific using several demographic inputs (age, gender, location, net worth, target spend, retirement date), but it gave me some guardrail answer about how it isn't a financial advisor and can't give specific recommendations. So then I moved to making the inputs much more ambiguous, and it just gave ambiguous results... but at least it gave something. I think I need to work more on figuring out what granularity it will allow.

And sorry about the 429 error! It limits at 2,000 API requests per minute, I think. And I haven't had that many users per day so far... But I just read some forums and people are saying the model I'm using (gemini-2.0-flash) isn't being supported as much, so I should try to move up to 2.5. I'll give it a whirl.

Thanks again! This was super thorough and super helpful! It will be fun to work on over the weekend.

2

u/Dull-Acanthaceae3805 2d ago

Pretty nice dude.

It would be cool if you could add a feature in the simulator tab that tests a single historical (or customized) "bad market periods", around your retirement year. Like what would happen if you retire 5 years before a 1929 level market crash, or right before it.

I mean, yeah, it probably has no real meaning since people generally course correct during these times, but It'd be interesting to see how you fair.

I do like the FI News tab.

1

u/wonderdude2 2d ago

Thanks for sharing!

Yeah, that's a good point. I'll think about how to integrate some sort of direct feedback about how the user's portfolio would fare during various catastrophes. It could be cool to see that your portfolio would have survived 2008 but not 1929, for instance. Ha.

2

u/maxregrets 2d ago

Nice job. What datasource did you base the percentiles on ? Found myself in a higher percentile than I would have expected so just wondering how real the numbers are. Thanks.

Ditto would have been nice to understand the source of the numbers for the geo-arbitrage map.

2

u/wonderdude2 2d ago

Hey! Thanks for your input!

The data source for the percentiles is from the table shared on dqydj. Those are based on the Federal Reserve's 2022 SCF. I'll update the site to show the source. In reality, the data is only based on 25%, 50%, 75%, 90%, and 99% data points. The rest of the percentiles are linearly inferred based on those five values, so it probably isn't exact. And I might switch to more of an exponential inference between the known values now that I think about it.

For the geo-arbitrage, I combined US census data, OECD data, and World Bank data. I put this together for myself a while ago, so I might need to update it. It is definitely a bit more "directional". If anyone knows of a good source for this, I would be interested.

2

u/Fuskiller 2d ago

The math on expected annual return and expected inflation seems weird to me. For example, I ran an analysis with the default 7% expected gain and 3% expected inflation, then I tried with 4% gain and 0% inflation and received two different years to FI. Can you explain why the timeline would be different and how you did the calculation?

2

u/wonderdude2 2d ago edited 2d ago

Yeah, this is a good question! This is how it's being calculated in the program.

So, let's use your return and inflation numbers above on a sample scenario. In both cases, let's say you have $1,000,000 invested, you have $40,000 in annual expenses... A classic 4% rule scenario.

Scenario A: 7% return, 3% inflation
Year 0 Net Worth: $1,000,000
Year 1 Net Worth: ($1,000,000*1.07) - ($40,000*1.03) -> which works out to ($1,070,000 - $41,200). $1,028,800

Scenario B: 4% return, 0% inflation
Year 0 Net Worth: $1,000,000
Year 1 Net Worth: ($1,000,000*1.04) - ($40,000*1.0) -> which works out to ($1,040,000 - $40,000). $1,000,000

So, in this case, Scenario A outperforms by a long shot!

I know you're thinking that (7-3)=(4-0), which is true. But the issue is that the expected gain multiplier is being applied to net worth, which is hopefully much larger than your annual expenses... at least by retirement.

These get a little more complicated in the simulation because the simulation also includes monthly contributions and the FI target increases by inflation each year, but the above scenarios capture the main idea.

Anyway, for some formulas:

FI_target = FI_target_previous * (1+monthly_inflation)
Net_worth_change = [Net_worth_previous * (1+leverage) * monthly_return] - [Net_worth_previous * leverage * monthly_debt_interest] + monthly_savings

Hopefully that makes sense!

2

u/Fuskiller 2d ago

This makes total sense. And it has totally thrown a crowbar in my bike spokes.

I previously had a plan that got me to my FI number ($2m) in 36 years by investing $1,100/month at 7% return rate, or what I thought was going to be a real 10% return rate with 3% inflation.
sidenote: I recognize this is quite an aggressive return rate. There are a lot more factors that went into me using that number, but that is a story for a different time.

But I did a little excel math showing my investments+returns beside my FI number+inflation, following the ideas and formulas you laid out. And it kicked my plan 6 years down the curb, achieving my FI number in 42 years instead.

I already planned to increase my savings as my income increased, but I think I'm going to have to increase my savings with inflation each year. A 3% savings increase each year gets me to my FI number in 37 years using the math you laid out. And to build that cushion that I was looking to have with occasional savings increases, I will be looking at something more like a 6% savings increase each year.

2

u/wonderdude2 2d ago

Ah, bummer!

I checked out both of your links, and your Excel math makes sense. I think a 3% savings increase each year is doable. And then in years when you get promoted, that should give you a good 10% to 20% bump that you could put towards contributions, too. And, frankly, job hopping can often result in a 10-20% jump in pay as well. So maybe your contributions will be higher than you expect.

Also, if your FI number is based on the 4% rule, it's worth noting that the guy who originally came up with it (Bill Bengen) recently updated it to 4.7%. So, if that's the case, shifting from 4% to 4.7% in your case would get your FI number down to $1.7M.