This article is based on the spreadsheet I made to estimate net worth over time.
I think that Excel is basically a programming language, and I have an interest in bridging the gap from it to more traditional languages. And I needed an excuse to get matplotlib working on my machine.
Luckily, procrastination worked in my case. If I had tried it a few months ago, numpy was not yet working on M1 macs, but as of python 3.9.4, it installs normally using pyenv and pip.
I started a GitHub repo to hold the Excel spreadsheet and python port — I’ll be posting more ports to various frameworks. I like it as a simple example because it has conditionals, loops, arrays and is a pretty useful thing to know.
It’s also a good starting point for learning more programming. Excel is great, and there’s a lot you can do, but with the python version, I could add the following features.
- Instead of using constants for the various inputs (like market rate), use a lambda and define different ways the market could move rather than constant
- Do similar things with spending models in retirement, inflation, etc.
- Make it easier to have more lumpy spending/saving — meaning, assume aggressive spending in youth, then a period where you might have children and buying a house, then a house sale in the future, etc.
- Make it possible to show many more scenarios at once (like 30 historical market curves effect on your plan)
To be fair, all of this is very possible in Excel. It’s just a lot easier in python.