banner-photo

Investigating Index Funds


Note that I am not a financial professional or financial advisor. I am just a mathematician interesested in better understanding index funds. With that in mind, please enjoy this post :).

I am finally (thanks graduate school!) at a stage in my life where I can afford to put money aside for retirement. In retirement planning, I am looking for an investment vehicle that tends to outpace inflation, meaning that I am just looking to not lose money. Through various podcasts, blog posts and memes I gathered that index funds were a reasonable route.

An index fund is an electronically traded fund whose portfolio is constructed to match the spread of stocks in a particular index (S&P 500, NASDAQ, DOW, etc.)1. Ignoring fees (which tend to be minimal for index funds) and taxes (which should also be minimal or nonexistent with a Roth IRA2) this implies that the value of your investment follows the given index. For example, if you invested $100 when the S&P 500 index was valued at $1 and withdrew your investment at a time when the S&P 500 was valued at $2 your return would be $200, again ignoring any taxes or fees. If you invested $100 when the S&P 500 index was valued at $1 and had to withdraw when it was valued at $0.50, then your return would be $50.

Using this simple idea of how an index fund works I thought I could try and get an estimate of what the multiplier would be for a given index and holding period using historical closing prices. As an example we can consider the S&P 500 in the manner pictured below.

Above we can imagine investing $100 in an index fund tracking the S&P 500 on January 2, 1980. If we held that investment for 40 years (withdrawing exactly on January 2, 2020) we would have been able to withdraw about $3,080 before any fees or taxes. Repeating this process for any trading day that occurred at least 40 or more years prior to our most recent trading day would produce a historical distribution of investment multipliers. This distribution is pictured in the box-and-whisker plot to the right, where the uppermost and lowermost horizontal lines represent the maximum and minimum multipliers respectively.

This figure suggests that an S&P 500 index fund investment held for 40 years has an empirical probability of 75% of at least being worth about 12.5 times more than the initial investment amount. Is this good? That is hard to tell without a comparison point. The overall goal is for my investment to outpace inflation, making that a natural point for comparison. Following the method layed out by the US Inflation Calculator3, we can calculate an inflation multiplier over every 40 year interval for which consumer price indexes (CPIs) were available4. For example, the CPIs in January of 1980 and 2020 were 77.8 and 257.971 respectively. The inflation multiplier for this interval would be 3.32, meaning something that cost a dollar in January 1980 would be about $3.32 in January 2020.

To the left we compare the observed 40 year multipliers for the S&P 500 and inflation. While there is some slight overlap, the vast majority of the historical S&P 500 multipliers greatly outpace inflation. A reasonable concern could be any correlation between these two, i.e. does the S&P multiplier tend to be low when the inflation multiplier tends to be high? While the data is not included here, an additional analysis revealed that the correlation coefficient between two matching S&P and inflation multipliers was 0.03 and the S&P multiplier was always greater than its inflation counterpart.*

We can visualize this for more intervals and indexes. Below are the multipliers for the S&P 500, the DOW Jones Inustrial Average and the NASDAQ Composite for each interval from 5 to 40 years in steps of 5 years. For comparison purposes, inflation multiplier distributions are also included. All index data was taken from Yahoo! Finance on September 26, 2022. Yahoo! Finance had daily closing prices going back to January 1, 1992 for the DOW and back to February 4, 1971 for the NASDAQ Composite. You are able to toggle the S&P 500 and inflation distributions so that they only include data from January 1971 onward. Hover over the boxes for a more detailed five number summary.

This plot suggests a few things about index performance. In the short term (5-10 years post-initial investment) the indices are almost indistinguishable from one another and barely outperform inflation. However, 20 years after the initial investment the indices tend to outpace inflation. The NASDAQ composite pulls ahead as the index with the highest multipliers at the 20 year mark as well. This would suggest that an index fund matching the NASDAQ would perform best as a long term investment, assuming future performance follows existing trends.

Importantly, these boxplots provide evidence that an index fund can be a good long term investment when it comes to outpacing inflation. We should note, however, that this post has not compared index fund performance to other investment types (actively managed funds, certificates of deposit, etc.). Additional analysis to make these comparisons would be fun and interesting as the index fund has often been held up as a superior long term investment strategy, perhaps most famously by Warren Buffet5.

While examining historic multipliers for different investment periods can be fun, it is not the most accurate portrayal of how most people will invest their money. Rather than place your entire investment all at once and then wait, you will probably place small pieces of your investment over time. A slightly more realistic simulation of investing in an index fund is placing a certain amount into the fund at the same time each year and then withdrawing everything x years after the very first investment.

Below I have created an interactive graphic that allows you to explore the amount you historically could have withdrawn following this very strategy for all of the indexes explored above (again ignoring fees and taxes). To calculate this you select an index, a total number of years for the investment timeline and input how much you plan to invest for each year of the timeline. The appropriate multipliers are then calculated and multiplied with your proposed investments and the resulting historical investment end values are plotted in a histogram below#.


Before ending this post, I do want to make a small note on the assumption that past performance will be indicative of future performance. This assumption is by no means a guarantee. Weird things can happen in the world that can in turn cause unprecedented market changes. There will always be risk when making investments, but, hopefully, analysis of the historic outcomes of said investments can help us calibrate our risk tolerance.

Find the python code that helped produce this post at my GitHub repository here, https://github.com/matthewosborne71/InvestigatingIndexes.
Notes

* CPIs are provided on a monthly basis, while closing prices are daily level data. To make comparable CPI and index multipliers each trading day had its month and year extracted and paired with the corresponding CPI.
# Historical multipliers were calculated in a manner similar to that which produced the boxplots. For example, if your investment timeline was 30 years long, then one set of multipliers would be calculated by dividing the index value on 1-2-2010 by the values on 1-2-1980, 1-2-1981, 1-2-1982, etc. adjusting the date when necessary to capture the closest recorded trading day.



References

1. https://www.investopedia.com/terms/i/indexfund.asp, accessed on 9/26/2022.
2. https://www.irs.gov/retirement-plans/roth-iras, accessed on 9/26/2022.
3. https://www.usinflationcalculator.com/frequently-asked-questions-faqs/#HowInflationCalculatorWorks, accessed on 9/26/2022.
4. https://www.usinflationcalculator.com/inflation/consumer-price-index-and-annual-percent-changes-from-1913-to-2008/, accessed on 9/26/2022.
5. https://www.npr.org/2021/07/29/1022440582/planet-money-summer-school-2-index-funds-the-bet, accessed on 9/26/2022.