<jupyter_start><jupyter_text>An Approximation for Financial Independence> Simple math behind breaking free<jupyter_code>import pandas as pd
import numpy as np

import matplotlib.pyplot as plt
import matplotlib
import seaborn as sns
plt.style.use('ggplot')
plt.style.use(['dark_background'])<jupyter_output><empty_output><jupyter_text>MotivationI just had a conversation with a friend who is looking to get a hold of her own finances but doesn't know where to start. I couldn't find a good summary that reduces the math down to a simple terms. MMM comes close. So I just decided to write my own piece.Source: Unsplash. Photographer: Eivarain. Financial IndependenceFinancial independence is the idea that you've "invested" enough money so that these investments start "passively" making money for you. The basic principle is that you leave the original investment untouched and simply shave the excess of every year. If that investment generates enough for you to pay your bills, CONGRATULATIONS!! You're financially independent. This is the basic formula for how to buy your way out of the system.  It allows for your house, groceries, bills, etc to be paid for passively and sustainably. Of course, you can still work and stay busy but it's on your terms.  You're free to pursue your passion projects that the work grind never left you with enough time/energy to do.    But how much money do you need? Well, that's where things get complicated for many people. They read about different "asset classes," "market cycles," "balanced portfolios," etc and decide: "I'll just pay someone else to do this for me."  Or worse, I will just save 20% and call it good enough.However, not everyone can afford a financial planner and simply not thinking about it is a great way to never retire.> The good news is that we simplify things if we stop trying to "beat" the system. The market grows every year right? We'd have problems if it didn't...  What if there was a single stock that simply followed the market's inherent growth? If you chose to simply put ALL your excess money into that stock... maybe that could be enough?  Introducing the 4% ruleTL;DR: The formula is:The basic assumption is that, on average, the market grows 7% every year and that the S&P 500 follows that growth. So if you put 100 dollars into that "stock" this year, you can expect to have 107 dollars next year (on average).  But, of course, inflation decreases the value of that by about 3% every year (yes, your money is basically on fire if you leave it in cash).  Thus, we have the 4% rule.  This simply says that you can expect 4% growth of your investment every year assuming the market grows 7% and you lose 3% of that to inflation.It's crude. It's reductionist. But it turns out to be good enough to get started. There are many arguments that can be made against this "rule of thumb" but I think MMM handles them well so I won't list them here. Source: https://en.wikipedia.org/wiki/S%26P_500_Index Applying the 4% ruleRemember, we want to keep our initial investment "untouched" when we "retire" so we can just shave the cream off the top every year.  If that "cream," is enough to live on, then we have achieved financial independence.  So we need our "nest egg" to be large enough such that 4% of it matches our standard of living (how much we spend). Well, if we use the 4% rule above, it turns out to be 25 times the amount that you spend every year.  So if you spend 100,000 dollars a year then you'd need keep working until you save 2.5 million.  That seems like a lot right?  So...what if you can live off 40,000? Well now it reduces to only 1 million. Still a lot maybe… but you got time.Again, the formula is...To make it visual, I plotted your nest-egg size (in millions) vs your annual spending budget (in thousands). So if you can collect your bills and figure out how much you spend every year, you can use the plot (or the formula above) to determine how much you need to save.<jupyter_code>upper_lim = 200
plt.figure(figsize=(16,8))
spending = np.linspace(10,upper_lim,100)
nestegg  = spending * 25 / 1000
plt.plot(spending,nestegg,c='c')
plt.grid(alpha=0.1); plt.ylabel('Needed for Financial Independence (Millions $)',fontsize=18)
plt.xlabel('How much you spend annually (Thousands $)',fontsize=18)
matplotlib.rcParams.update({'font.size': 22})
plt.xlim(0,upper_lim); plt.suptitle('How much to save before Financial Independence',fontsize=25)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0623463687150838, 'fraction_numerical': 0.01564245810055866, 'mean_word_length': 4.574097135740971, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '47906', 'license': 'Apache-2.0', 'n_tokens_mistral': 1267, 'n_tokens_neox': 1159, 'n_words': 704, 'path': 'nbs/03a_MMM_4percentRule.ipynb', 'repo_name': 'seanczak/torch_series_blog', 'size': '4475'}