wichtounet / swr-calculator

Safe Withdrawal Rate (SWR) Calculator
MIT License
52 stars 9 forks source link

Documentation #2

Open mwrietz opened 2 years ago

mwrietz commented 2 years ago

Please add an example showing command line argument format to be used when running.

agilejon commented 2 years ago

A bit of documentation on both usage and output would be helpful. I've got it running but I'm confused about why it requires both a "Number of years" and a start/end year arguments. I've no doubt there's a good reason, it just isn't clear to me.

It's running with arguments fixed 4 50 1871 2021 "us_stocks:100;" us_inflation. I'll review your blog post to see if I can understand some of the other commands (fixed, swr, multiple_wr, etc), but would much appreciate a bit of documentation. Thank you for making and sharing this app!

thepoorswiss commented 2 years ago

@agilejon Keep in mind that many of the features are just experiments I am running for my blog and have little to no value.

The duration in years (like 50) is the duration of the retirement. For instance, it will tell you your chances of success of still having money after 50 years. The period is how many years are going to be used for the simulation. If you use a wider period, you will have more simulations and this will be more accurate. But you could use only the last 100 years if you want more recent results or remove the last 30 years to avoid some crazy bull markets for instance.

agilejon commented 2 years ago

@thepoorswiss Ah, that makes sense.

Totally understand this is just some personal experiments. Again, thank you for sharing though. I was curious how a longer retirement duration might impact outcomes. Both your blog and this code was very exciting to find! It's one thing to read about this, but quite another to have the opportunity to play with these models.

IsmaelValentino commented 1 year ago

Hi thepoorswiss and fellow netizens, I hope you are all doing well. First, thanks thepoorswiss for all the valuable information you provide us in your blog; it has helped me tremendously in my FIRE journey. On the other hand, I would like to experiment with other data sets (e.g. sectors, industries, leverage, real estate, among others), but I am having setbacks trying to run the script. It returns the following error message "C:\swr-calculator-master\scripts>python convert.py C:\swr-calculator-master\stock-data\us_stocks.csv fixed 4 50 1871 2021 "us_stocks:100;" us_inflation Did not find the column" I tried resolving the problem with ChatGPT without success. I will appreciate any help!

IsmaelValentino commented 1 year ago

I replaced ";" for "," here "reader = csv.reader(csvfile, delimiter=';')" to "reader = csv.reader(csvfile, delimiter=',')" in the "convert.py" script and now it returns Column A, Column B, Column B (duplicate) of "us_stocks.csv"

thepoorswiss commented 1 year ago

@IsmaelValentino What are you trying to do? It seems you are running the python script with parameters intended for the C++ script. The python script is only a helped to help convert some files to the proper format. But to do any simulation, you have to compile the C++ application and run it.