Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retirement plot and table calculations are inconsistent and calculator rounds savings rate to nearest 2% before proceeding #3

Open
ragibson opened this issue Mar 24, 2021 · 1 comment

Comments

@ragibson
Copy link

  1. Your tables assume a mid-year return of half the annual return rate for new savings, but your primary calculation does not. This makes your table and plot inconsistent.

Here is an example where the obvious answer (using your table's calculations) is 15 years, but the main calculation claims 15.2 years.

plot_table_inconsistency

Note that the desired target net worth

>>> expenses = 50000
>>> annual_withdrawal = 0.04
>>> expenses / annual_withdrawal
1250000.0

is exactly reached at 15 years in your table (ignoring rounding issues in your javascript code). That is, $1.25MM is the resulting value at t = 15:

>>> income = 100000
>>> savings = 50000
>>> expenses = income - savings
>>> portfolio = 69313.90
>>> return_rate = 0.05
>>> withdrawal_rate = 0.04
>>> 
>>> t = 15
>>> savings * (1 + return_rate / 2) * ((1 + return_rate) ** t - 1) / return_rate + portfolio * (1 + return_rate) ** t
1250000.0038315544

  1. As an aside, the effective intrayear increase on continuously DCA'd investments with exponential growth is actually r/ln(1+r), but I accept that r/2 is probably "close enough" here, especially considering the site is intended for rough calculation anyway.
>>> r = 0.05
>>> r / log(1 + r)
1.0247967157143927
>>> r = 0.07
>>> r / log(1 + r)
1.0346053546590026
>>> r = 0.10
>>> r / log(1 + r)
1.0492058687257062

  1. This is a bit minor, but the calculator rounds the savings rate to the nearest 2% (seemingly to align with the plot) and then proceeds using the rounded rate rather than the values input by the user.

E.g. the savings rate is clearly incorrect (on the left) unless manually input (on the right)

rounding_error

and thus the result is slightly incorrect by default. You can verify the result on the right is more correct via your straightforward annuity calculation (again, temporarily ignoring the fact that this calculation is slightly incorrect for the use case)

>>> from math import log
>>> 
>>> income = 100000
>>> savings = 71000
>>> expenses = income - savings
>>> portfolio = 600000
>>> return_rate = 0.05
>>> withdrawal_rate = 0.04
>>> 
>>> log((savings * withdrawal_rate + return_rate * expenses) / (portfolio * return_rate * withdrawal_rate + savings * withdrawal_rate)) / log(1 + return_rate)
1.2306177277526853
@ragibson
Copy link
Author

ragibson commented Dec 21, 2023

I thought about this a bit more and put a bit of a re-imagined version at https://ryanagibson.com/posts/analytic-early-retirement-calculator/ -- other than Networthify's rounding, the impact seems to usually be limited to a year or so.

That said, the absolute impact from rounding is especially bad at the lower end if anyone were to try to use it for more typical retirement planning (where I'm pretty sure the usual consensus is a minimum target of ~10%). For relative error, it would be worst for users very close to retirement.
no_portfolio_comparison

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant