About FI Portfolio Doctor

Hi! I'm Danny Libin, and I built this app to help me understand the mechanics behind using a portfolio to fund financial independence and retirement. I wanted a clean, interactive way to view my results, and the ability to iterate on various scenarios quickly and easily.

Financial independence (FI) is the point at which your current annual expenditure can reasonably be supported by your current savings nest egg for the rest of your life (or indefinitely). In other words, you can retire if you choose to do so, regardless of your age (as in FIRE - Financially Independent Retired Early).

The concept behind this simulator is to determine the success rate (Health! 👨‍⚕️) of your portfolio in retirement, on the basis of the available historical data of U.S. stock market and bonds performance. A healthy portfolio should be able to weather most of the worst case scenarios experienced in the history of the market.

How It Works

Past performance is no guarantee of future results.

—Everyone Ever

If we're using historical data to determine our success rates, and we know past performance is no guarentee of future results, how does this even work?!

When it comes to any stock market simulation, especially in the long term, we can't expect any sort of guarantees. The name of the game is risk management, which is where the historical data comes in.

This simulator takes all available historical data and runs the length of your full retirement across various different retirement start dates. The questions we're answering are:

  • What would happen if I had retired right before the Great Depression?
  • What about if I had experienced the Dot-com bubble during my retirement?
  • How often would my portfolio fail in these situations?
  • How often would I end up with a massive surplus at the end of my life?

Portfolio Risk Management

Regardless of how many retirement cycles we simulate, we can never eliminate risk completely. However, we can develop a familiarity with the various methods we have at our disposal for risk management.

The Trinity study famously produced the concept known as the "safe withdrawal rate". They used a similar simulation to determine the maximum withdrawal rate that avoids most portfolio failures during a 30 year period. This produced the "4% rule", which became a useful rule of thumb for retirement simulation. So if you had a $1M portfolio, you could safely withdrawal 4%, $40,000, annually with minimal risk of portfolio failure.

However, things get a bit dicier for early retirees. The longer you expand the time horizon of the simulation, the less certain you can be of the results, which you can see by the gradual divergence of the portfolio ending balances in this simulator.

Luckily, we have plenty of options to manage risk:

  • Start with a higher portfolio (the obvious choice...)
  • Delay your retirement
  • Reduce your withdrawal percentage
  • Adjust your annual withdrawals based on market performance rather than continuously withdrawing the same (inflation-adjusted) amount
  • Produce any kind of income throughout retirement to reduce withdrawals or even continue depositing

A healthy portfolio is really a combination of the portfolio itself and the withdrawal strategy.

What about Inflation

Over a long time horizon, inflation is an extremely important consideration in simulations and it is easy to underestimate.

There are several ways to track inflation. FI Portfolio Doctor measures it by tracking the consumer price index (CPI). In short, CPI tracks the average price of a basket of consumer goods and services purchased by households, such as food, housing, transportation, etc. The magnitude of change in the average cost of this basket measures inflation.

We can illustrate the importance of inflation-adjustment with an example. If you had started retirement in 1942 and your money grew to a nominal value of $328,974,040 by 2001, your inflation-adjusted value would be "just" $29,496,8164! In other words, you need to account for inflation or you won't have a good understanding of the actual purchasing power of your dollars over a long time horizon.

By default, all values in FI Portfolio Doctor are adjusted for inflation. However, you can uncheck the inflation-adjustment checkbox for fun to see some really high numbers.

Historical Data Used

The historical data used in FI Porftolio Doctor is compiled by Robert Shiller, a Nobel Laureate. Dividends and earnings data before 1926 are from Crowles and associates. After 1926, S&P index data is used.

What about international data? I'm globally diversified!

US market data is the most robust available, especially going back as far as Shiller's data does, so that's what FI Portfolio Doctor uses. However, global diversification would actually produce a reduced asset correlation, and thus has the potential to produce equal or better results with less risk (according to modern portfolio theory). As such, if you're efficiently globally diversified, particularly among less correlated asset classes (emerging markets, etc), your actual portfolio may well do better than those based strictly on US data, at least in terms of volatility.

How to Use

I designed FI Portfolio doctor as a way to iterate on various scenarious quickly, and to view the details of each run interactively with details.

On the left side are your portfolio inputs. Each time you adjust any inputs, just press "Calculate!" and the results data will refresh.

Stock Ratio

The stock ratio is the amount of stocks versus bonds in your portfolio.

Expense Ratio

The expense ratio of your portfolio may vary depending on the way you invest. If you're using mutual funds, it may be as high as 1%. If you're using straight Vanguard index funds, it may be as low as 0.04%. Personally, I use Betterment, which charges 0.25% in exchange for automating global diversification according to modern portfolio theory.

Simulation Length

Adjust this number for the planned length of your retirement. The longer the retirement length, the fewer cycles we can run against the available historical data. If you're an early retiree, this number might be something like 60 years, which allows for 90 different simulated cycles of retirement (as of 2021).


Other than your starting balance, your withdrawal strategy can make the biggest impact on your portfolio's health, and there are many strategies.

Fixed - The 4% rule is a popular guideline to start with. According to this guideline , if you withdraw a fixed 4% of your starting portfolio, adjusted for inflation, you have a high chance of success across a range of scenarios. So, if your starting portfolio is $1M, you would withdrawl $40,000 inflation-adjusted dollars annually for the duration of your retirement.

Percent of Portfolio - Another option to is to dynamically adjust your portfolio based on market performance. In other words, the better the market does, the more you withdraw, and vice versa.

This withdrawal method is the the safest - you won't find a single failure in any scenario! This is because you can only ever spend a fraction of your portfolio. You also have the potential to spend the most with this method - as your portfolio grows, so does your spending. However, if you have no way to support very low spend years, this method isn't as practical.

Clamped Percent of Portfolio - My favorite plan for retirement spending is a hybrid of the above two rules, a dynamic spending approach. With this method, you set a ceiling and a floor for spending each year, and allow market performance to dictate where your spending falls on the scale. This way, you don't have to worry about withdrawals below your minimum projected expenses, but you can also spend more on good years than you would with a fixed strategy. This reduces the odds of failure as well as reducing the odds of having an enormous nest egg late in your life.

If you're not happy with your portfolio health, try tinkering with your minimum spend to get a feel for how much spending flexibility can help. Even small reductions in the minimum can cause dramatic improvements. See the difference a $40,000 and a $30,000 minimum spend can have? Neat!

Withdrawal Delays and Deposits

You can further fine tune your inputs by specifying a period to delay withdrawls. If you are nearing retirement and are not happy with your portfolio health at your given inputs, you can try delaying retirement for a few years to see how much closer it can get you.

Additionally, you can account for deposits you know you'll be making the future. Perhaps you're expecting to collect Social Security 10 years into your retirement, or perhaps you know you'll have some income from a side-gig or part-time work.

If you want to have a bit of fun, you can even use it as an investment calculator by delaying withdrawals indefinitely and setting periodic deposits instead! This gives you a more realistic range of possible results based on historical data rather than the static percent most investment calculators use.


On the right, you'll see the results of your current simulation, which includes a graph and various statistics.

All Cycles View - In this view, you'll see detailed lines in the graph which show each simulated cycle's portfolio ending balance based on your inputs. Hover and click around on the graph to view the details of each cycle and year.

A table with the selected cycle's view shows up below the graph, which shows you ending balances, withdrawals, deposits, as well as notable events during each period. If you're interested in a cycle starting on a particular year (say, right before the great depression), you can select it in the blank table (while no other cycle is selected).

Zoom Cycle View - Some of the lower and median balance cycles are a bit dwarfed by the cycles that did exceedingly well (hurray for compounding interest! 💸) so it is hard to see the minutia. To remedy this, select he cycle you want to drill down to and select the "Zoom Cycle" view.

Quantiles View - This view will give you a bird's eye view of each portfolio's performance that's a bit cleaner, but less detailed than the all cycles view. 80% of cycles lie between the top and bottom lines (90th and 10th percentiles). The middle line is the "median" case (50th percentile).

Portfolio Health - This is ultimately the most important section, the health of your portfolio, as diagnosed by FI Portfolio Doctor 👨‍⚕️! If the large majority of the simulations end in success, you can consider your inputs able to accomidate most historical circumstances.

Don't forget to consider the amount of cycles with low ending balances (inflation-adjusted ending balance less than half the original balance) and high ending balances (inflation-adjusted ending balance more than 3 times the original balance). If enough of your balances end precariously low, you may want to consider tweaking your inputs to be a bit safer. Likewise, if you have many very high ending balances and you'd rather use your money during your lifespan, you can consider being more liberal with your spending.

Share, Save, Download

You can share, save, and download all of your results right from the results screen.

Press the share button to generate a link which contains all of your input parameters. You can either share this with anyone else to show off your portfolio run, or you can save the link or bookmark it for future reference and rerun it any time by clicking the link or pasting it into the browser.

If you want to see the details behind the cycles and calculations made in the simulation, you can click download, which returns a CSV file with all of the data.


Using historical data to model future returns means we are assuming that the future performance will look at least somewhat like the past. There are no guarentees that will be the case, so plan accordingly. Use this calculator to get a general idea of what a retirement may look like and not as financial advice.