Skip to content

Instantly share code, notes, and snippets.

@tadeoos
Created March 17, 2019 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tadeoos/2835c223caf30cae52f35ccde14a5efb to your computer and use it in GitHub Desktop.
Save tadeoos/2835c223caf30cae52f35ccde14a5efb to your computer and use it in GitHub Desktop.
Math behind financial independence
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Math behind early retirement scenarios\n",
"\n",
"This notebook provides easy way to personalize financial independence related calculations.\n",
"\n",
"## Acknowledgments\n",
"It's all thanks to Jacob Lund Fisker, the author of a book [_Early retirement extreme_](http://earlyretirementextreme.com/ere-book).\n",
"\n",
"Check out his blog at http://earlyretirementextreme.com/"
]
},
{
"cell_type": "code",
"execution_count": 89,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script><script type=\"text/javascript\">if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script><script>requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min']},});if(!window._Plotly) {require(['plotly'],function(plotly) {window._Plotly=plotly;});}</script>"
],
"text/vnd.plotly.v1+html": [
"<script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script><script type=\"text/javascript\">if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script><script>requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min']},});if(!window._Plotly) {require(['plotly'],function(plotly) {window._Plotly=plotly;});}</script>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from functools import partial\n",
"from math import log\n",
"import plotly.graph_objs as go\n",
"from plotly.offline import iplot, init_notebook_mode\n",
"\n",
"init_notebook_mode(connected=True)"
]
},
{
"cell_type": "code",
"execution_count": 90,
"metadata": {},
"outputs": [],
"source": [
"p0 = 10000. # size of a fund\n",
"p = 1000. # withdrawn on the first day of year\n",
"i = 0.04 # the rate of investment\n",
"\n",
"INVESTMENT_RETURNS = [0.01, 0.02, 0.03, 0.04, 0.06, 0.1, 0.15] # these are the i used in figures. You can change them here."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"def amount_after_one_year(p0, p, i):\n",
" # p1 = (p0-p) + i*(p0-p)\n",
" # p1 = (p0-p) * (1 + i)\n",
" # p1 = p0 + i * p0 - p - i*p\n",
" p1 = p0 * (1+i) - p * (1+i)\n",
" return p1\n",
"\n",
"\n",
"def amount_after_N_years(p0, p, i, N):\n",
" pN = p0*(1+i)**N - p * ((1+i)*((1+i)**N-1))/i\n",
" return pN\n",
"\n",
"def how_long_porfolio_will_last(p0, p, i):\n",
" \"\"\"This is the key formula for extreme early retirement.\n",
"\n",
" It relates the number of retirement years to the rate of\n",
" return on your portfolio and the size of your portfolio.\n",
" \"\"\"\n",
" a = 1/(1-(p0/p)*(i/(1+i)))\n",
" N = log(a)/log(1+i)\n",
" return N"
]
},
{
"cell_type": "code",
"execution_count": 88,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"12.37886251288324"
]
},
"execution_count": 88,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# if I saved 10000 and want to retrieve a 1000 each year, and my return is 4% annualy,\n",
"# how many years this fund will last?\n",
"how_long_porfolio_will_last(10000., 1000., 0.04)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"perpetual_i = (p/p0)/(1-p/p0) # this calculates the perpetuity interest\n",
"# after rearangment\n",
"p0 = (1+i) * p / i\n",
"\n",
"def required_fund_size(p, i):\n",
" \"\"\"Required fund size to withdraw p at the begining of each period\n",
" when interest is added at the end of this period.\"\"\"\n",
" return (1+i) * p / i"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"636000.0"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# If I want to live on 3000 a month, \n",
"# how much capital do I have to save (assuming 6% annual return)\n",
"# to live of it's returns?\n",
"required_fund_size(36000., 0.06)"
]
},
{
"cell_type": "code",
"execution_count": 74,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"mode": "lines",
"name": "1%",
"type": "scatter",
"uid": "7886554d-a8ed-49d5-ba9d-d364abf7e1bf",
"x": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49
],
"y": [
2.0100504196100584,
3.0303553334698425,
4.061125095655556,
5.102576599978876,
6.154933553914863,
7.21842676702423,
8.293294454799915,
9.379782558939043,
10.478145085116816,
11.588644459423227,
12.711551904713614,
13.84714783822328,
14.995722291904286,
16.157575357060928,
17.33301765498887,
18.522370835464752,
19.72596810508745,
20.944154787642397,
22.17728891884645,
23.425741878036437,
24.689899059589365,
25.970160587111724,
27.26694207370917,
28.58067543195131,
29.9118097374808,
31.260812150588198,
32.628168900484276,
34.014386337459676,
35.419992058628914,
36.84553611352235,
38.29159229641986,
39.75875953302531,
41.247663369868455,
42.7589575757041,
44.2933258651693,
45.85148375607288,
47.43418057294557,
49.04220161089395,
50.6763704753999,
52.33755161551725,
54.02665306997089,
55.74462944799829,
57.4924851694321,
59.27127799155877,
61.08212285376165,
62.92619607494047,
64.80473994327839,
66.71906774320573
]
},
{
"mode": "lines",
"name": "2%",
"type": "scatter",
"uid": "e8c56536-8659-4f45-8d4a-5df431e1c875",
"x": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49
],
"y": [
2.020203380862343,
3.0614433584845773,
4.124605780467535,
5.210633654410939,
6.3205321739379565,
7.455374309576893,
8.616307042433702,
9.80455833142977,
11.021444920196164,
12.268381108059229,
13.546888631612642,
14.85860783001778,
16.205310299508092,
17.588913281997193,
19.011496081004417,
20.47531885763388,
21.98284423308951,
23.536762216118465,
25.14001908904386,
26.795851031571843,
28.507823446576673,
30.279877189063647,
32.116383205509806,
34.02220748924653,
36.0027887811465,
38.06423213963108,
40.21342243555744,
42.458163090723396,
44.807347112576274,
47.27116988920573,
49.86139661116428,
52.5917020631437,
55.47810763878038,
58.53955099726497,
61.798639812718335,
65.28266597021015,
69.02499627039303,
73.06702092077757,
77.4609518718699,
82.27395867035224,
87.59449084429018,
93.54233977841146,
100.28545475135667,
108.06980970192409,
117.27674745149875,
128.54512855955792,
143.07259848307055,
163.54791734070452
]
},
{
"mode": "lines",
"name": "3%",
"type": "scatter",
"uid": "c55fcd7f-ddc1-43bb-816c-d4d595e061ef",
"x": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49
],
"y": [
2.030461492850972,
3.09329874777952,
4.190612349599508,
5.324714190557325,
6.498156798429303,
7.713767936270386,
8.97469165343127,
10.284437287382488,
11.646938338975694,
13.066623709042963,
14.548504547801345,
16.098281012251906,
17.722474671861182,
19.428594331744154,
21.225345934869107,
23.122901397120238,
25.13324741808593,
27.270644634159,
29.552241846536738,
31.99891275656369,
34.636419541603104,
37.497069554993,
40.622139352347155,
44.06553646560664,
47.89954450087546,
52.224258691432794,
57.18398178825796,
62.997825513127374,
70.0224458979957,
78.89845725743915,
90.9650809664821,
109.89737001400277,
156.79691451487795,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101
]
},
{
"mode": "lines",
"name": "4%",
"type": "scatter",
"uid": "cd27c2e1-2448-4c36-ab63-7d1c3f41b653",
"x": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49
],
"y": [
2.0408274413755714,
3.125958511085237,
4.2593331745470815,
5.445441531452388,
6.689431256441619,
7.997242620989924,
9.375780054997605,
10.833132796559536,
12.37886251288324,
14.024383870063652,
15.783476602960054,
17.672987685129698,
19.713815126505274,
21.932320859676782,
24.362418941571317,
27.048767740127303,
30.05185019801294,
33.456464288089755,
37.38680281163497,
42.03540662670101,
47.72483788314265,
55.059790496764684,
65.39782556827235,
83.07081325340205,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101
]
},
{
"mode": "lines",
"name": "6%",
"type": "scatter",
"uid": "3c80bfc2-a30e-41ac-8cad-1a1f876d69f1",
"x": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49
],
"y": [
2.0618939964764436,
3.1938521867940315,
4.405777542657981,
5.709833332003659,
7.121188047317667,
8.659094995891751,
10.348504939936118,
12.222562571712128,
14.326640476029088,
16.72520854388775,
19.514327728204563,
22.84639659120542,
26.985174278677775,
32.45041708777549,
40.51653063577149,
56.24173917965921,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101
]
},
{
"mode": "lines",
"name": "10%",
"type": "scatter",
"uid": "f183589f-da30-4863-84b9-89d80c7f070b",
"x": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49
],
"y": [
2.10544871360158,
3.3412352360716455,
4.742254444079301,
6.359612423507469,
8.272540897341711,
10.613776133413358,
13.632153320849183,
17.886317030755077,
25.158857928096797,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101
]
},
{
"mode": "lines",
"name": "15%",
"type": "scatter",
"uid": "68803bfd-5e4c-4581-a014-63743c5d09cb",
"x": [
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49
],
"y": [
2.1628267805661325,
3.5520176514241695,
5.277537866144313,
7.556081836746261,
10.91896890928078,
17.47505074602704,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101,
101
]
}
],
"layout": {
"margin": {
"t": 200
},
"title": {
"text": "Size of fund given in years of expanses<br>versus<br>how long it will actually last before being depleted<br>given different investment return rates",
"xref": "paper"
},
"xaxis": {
"title": {
"text": "Fund size (years)"
}
},
"yaxis": {
"range": [
1,
100
],
"title": {
"text": "Durability"
}
}
}
},
"text/html": [
"<div id=\"0f8a2f3c-64f5-495f-b390-419b40e22ba2\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";\n",
"if (document.getElementById(\"0f8a2f3c-64f5-495f-b390-419b40e22ba2\")) {\n",
" Plotly.newPlot(\"0f8a2f3c-64f5-495f-b390-419b40e22ba2\", [{\"mode\": \"lines\", \"name\": \"1%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.0100504196100584, 3.0303553334698425, 4.061125095655556, 5.102576599978876, 6.154933553914863, 7.21842676702423, 8.293294454799915, 9.379782558939043, 10.478145085116816, 11.588644459423227, 12.711551904713614, 13.84714783822328, 14.995722291904286, 16.157575357060928, 17.33301765498887, 18.522370835464752, 19.72596810508745, 20.944154787642397, 22.17728891884645, 23.425741878036437, 24.689899059589365, 25.970160587111724, 27.26694207370917, 28.58067543195131, 29.9118097374808, 31.260812150588198, 32.628168900484276, 34.014386337459676, 35.419992058628914, 36.84553611352235, 38.29159229641986, 39.75875953302531, 41.247663369868455, 42.7589575757041, 44.2933258651693, 45.85148375607288, 47.43418057294557, 49.04220161089395, 50.6763704753999, 52.33755161551725, 54.02665306997089, 55.74462944799829, 57.4924851694321, 59.27127799155877, 61.08212285376165, 62.92619607494047, 64.80473994327839, 66.71906774320573], \"type\": \"scatter\", \"uid\": \"b35dbcf9-9d56-44c1-a2db-f9f03bb0f12e\"}, {\"mode\": \"lines\", \"name\": \"2%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.020203380862343, 3.0614433584845773, 4.124605780467535, 5.210633654410939, 6.3205321739379565, 7.455374309576893, 8.616307042433702, 9.80455833142977, 11.021444920196164, 12.268381108059229, 13.546888631612642, 14.85860783001778, 16.205310299508092, 17.588913281997193, 19.011496081004417, 20.47531885763388, 21.98284423308951, 23.536762216118465, 25.14001908904386, 26.795851031571843, 28.507823446576673, 30.279877189063647, 32.116383205509806, 34.02220748924653, 36.0027887811465, 38.06423213963108, 40.21342243555744, 42.458163090723396, 44.807347112576274, 47.27116988920573, 49.86139661116428, 52.5917020631437, 55.47810763878038, 58.53955099726497, 61.798639812718335, 65.28266597021015, 69.02499627039303, 73.06702092077757, 77.4609518718699, 82.27395867035224, 87.59449084429018, 93.54233977841146, 100.28545475135667, 108.06980970192409, 117.27674745149875, 128.54512855955792, 143.07259848307055, 163.54791734070452], \"type\": \"scatter\", \"uid\": \"ecc40952-9e05-454a-bc58-8b5131c5f2b3\"}, {\"mode\": \"lines\", \"name\": \"3%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.030461492850972, 3.09329874777952, 4.190612349599508, 5.324714190557325, 6.498156798429303, 7.713767936270386, 8.97469165343127, 10.284437287382488, 11.646938338975694, 13.066623709042963, 14.548504547801345, 16.098281012251906, 17.722474671861182, 19.428594331744154, 21.225345934869107, 23.122901397120238, 25.13324741808593, 27.270644634159, 29.552241846536738, 31.99891275656369, 34.636419541603104, 37.497069554993, 40.622139352347155, 44.06553646560664, 47.89954450087546, 52.224258691432794, 57.18398178825796, 62.997825513127374, 70.0224458979957, 78.89845725743915, 90.9650809664821, 109.89737001400277, 156.79691451487795, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101], \"type\": \"scatter\", \"uid\": \"95cdb174-e555-497d-9fc3-e9d6c9a05b53\"}, {\"mode\": \"lines\", \"name\": \"4%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.0408274413755714, 3.125958511085237, 4.2593331745470815, 5.445441531452388, 6.689431256441619, 7.997242620989924, 9.375780054997605, 10.833132796559536, 12.37886251288324, 14.024383870063652, 15.783476602960054, 17.672987685129698, 19.713815126505274, 21.932320859676782, 24.362418941571317, 27.048767740127303, 30.05185019801294, 33.456464288089755, 37.38680281163497, 42.03540662670101, 47.72483788314265, 55.059790496764684, 65.39782556827235, 83.07081325340205, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101], \"type\": \"scatter\", \"uid\": \"d01ae13c-5f13-4ac9-8458-e0610fb0a0ea\"}, {\"mode\": \"lines\", \"name\": \"6%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.0618939964764436, 3.1938521867940315, 4.405777542657981, 5.709833332003659, 7.121188047317667, 8.659094995891751, 10.348504939936118, 12.222562571712128, 14.326640476029088, 16.72520854388775, 19.514327728204563, 22.84639659120542, 26.985174278677775, 32.45041708777549, 40.51653063577149, 56.24173917965921, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101], \"type\": \"scatter\", \"uid\": \"18e76609-3566-476d-8d47-330675b93156\"}, {\"mode\": \"lines\", \"name\": \"10%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.10544871360158, 3.3412352360716455, 4.742254444079301, 6.359612423507469, 8.272540897341711, 10.613776133413358, 13.632153320849183, 17.886317030755077, 25.158857928096797, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101], \"type\": \"scatter\", \"uid\": \"e4e7186b-e43d-4f57-9834-b53c0dc360c4\"}, {\"mode\": \"lines\", \"name\": \"15%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.1628267805661325, 3.5520176514241695, 5.277537866144313, 7.556081836746261, 10.91896890928078, 17.47505074602704, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101], \"type\": \"scatter\", \"uid\": \"7b338702-28c3-4c02-b4b6-ee208951d840\"}], {\"margin\": {\"t\": 200}, \"title\": {\"text\": \"Size of fund given in years of expanses<br>versus<br>how long it will actually last before being depleted<br>given different investment return rates\", \"xref\": \"paper\"}, \"xaxis\": {\"title\": {\"text\": \"Fund size (years)\"}}, \"yaxis\": {\"range\": [1, 100], \"title\": {\"text\": \"Durability\"}}}, {\"showLink\": false, \"linkText\": \"Export to plot.ly\", \"plotlyServerURL\": \"https://plot.ly\"}); \n",
"}\n",
"});</script><script type=\"text/javascript\">window.addEventListener(\"resize\", function(){if (document.getElementById(\"0f8a2f3c-64f5-495f-b390-419b40e22ba2\")) {window._Plotly.Plots.resize(document.getElementById(\"0f8a2f3c-64f5-495f-b390-419b40e22ba2\"));};})</script>"
],
"text/vnd.plotly.v1+html": [
"<div id=\"0f8a2f3c-64f5-495f-b390-419b40e22ba2\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";\n",
"if (document.getElementById(\"0f8a2f3c-64f5-495f-b390-419b40e22ba2\")) {\n",
" Plotly.newPlot(\"0f8a2f3c-64f5-495f-b390-419b40e22ba2\", [{\"mode\": \"lines\", \"name\": \"1%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.0100504196100584, 3.0303553334698425, 4.061125095655556, 5.102576599978876, 6.154933553914863, 7.21842676702423, 8.293294454799915, 9.379782558939043, 10.478145085116816, 11.588644459423227, 12.711551904713614, 13.84714783822328, 14.995722291904286, 16.157575357060928, 17.33301765498887, 18.522370835464752, 19.72596810508745, 20.944154787642397, 22.17728891884645, 23.425741878036437, 24.689899059589365, 25.970160587111724, 27.26694207370917, 28.58067543195131, 29.9118097374808, 31.260812150588198, 32.628168900484276, 34.014386337459676, 35.419992058628914, 36.84553611352235, 38.29159229641986, 39.75875953302531, 41.247663369868455, 42.7589575757041, 44.2933258651693, 45.85148375607288, 47.43418057294557, 49.04220161089395, 50.6763704753999, 52.33755161551725, 54.02665306997089, 55.74462944799829, 57.4924851694321, 59.27127799155877, 61.08212285376165, 62.92619607494047, 64.80473994327839, 66.71906774320573], \"type\": \"scatter\", \"uid\": \"b35dbcf9-9d56-44c1-a2db-f9f03bb0f12e\"}, {\"mode\": \"lines\", \"name\": \"2%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.020203380862343, 3.0614433584845773, 4.124605780467535, 5.210633654410939, 6.3205321739379565, 7.455374309576893, 8.616307042433702, 9.80455833142977, 11.021444920196164, 12.268381108059229, 13.546888631612642, 14.85860783001778, 16.205310299508092, 17.588913281997193, 19.011496081004417, 20.47531885763388, 21.98284423308951, 23.536762216118465, 25.14001908904386, 26.795851031571843, 28.507823446576673, 30.279877189063647, 32.116383205509806, 34.02220748924653, 36.0027887811465, 38.06423213963108, 40.21342243555744, 42.458163090723396, 44.807347112576274, 47.27116988920573, 49.86139661116428, 52.5917020631437, 55.47810763878038, 58.53955099726497, 61.798639812718335, 65.28266597021015, 69.02499627039303, 73.06702092077757, 77.4609518718699, 82.27395867035224, 87.59449084429018, 93.54233977841146, 100.28545475135667, 108.06980970192409, 117.27674745149875, 128.54512855955792, 143.07259848307055, 163.54791734070452], \"type\": \"scatter\", \"uid\": \"ecc40952-9e05-454a-bc58-8b5131c5f2b3\"}, {\"mode\": \"lines\", \"name\": \"3%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.030461492850972, 3.09329874777952, 4.190612349599508, 5.324714190557325, 6.498156798429303, 7.713767936270386, 8.97469165343127, 10.284437287382488, 11.646938338975694, 13.066623709042963, 14.548504547801345, 16.098281012251906, 17.722474671861182, 19.428594331744154, 21.225345934869107, 23.122901397120238, 25.13324741808593, 27.270644634159, 29.552241846536738, 31.99891275656369, 34.636419541603104, 37.497069554993, 40.622139352347155, 44.06553646560664, 47.89954450087546, 52.224258691432794, 57.18398178825796, 62.997825513127374, 70.0224458979957, 78.89845725743915, 90.9650809664821, 109.89737001400277, 156.79691451487795, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101], \"type\": \"scatter\", \"uid\": \"95cdb174-e555-497d-9fc3-e9d6c9a05b53\"}, {\"mode\": \"lines\", \"name\": \"4%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.0408274413755714, 3.125958511085237, 4.2593331745470815, 5.445441531452388, 6.689431256441619, 7.997242620989924, 9.375780054997605, 10.833132796559536, 12.37886251288324, 14.024383870063652, 15.783476602960054, 17.672987685129698, 19.713815126505274, 21.932320859676782, 24.362418941571317, 27.048767740127303, 30.05185019801294, 33.456464288089755, 37.38680281163497, 42.03540662670101, 47.72483788314265, 55.059790496764684, 65.39782556827235, 83.07081325340205, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101], \"type\": \"scatter\", \"uid\": \"d01ae13c-5f13-4ac9-8458-e0610fb0a0ea\"}, {\"mode\": \"lines\", \"name\": \"6%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.0618939964764436, 3.1938521867940315, 4.405777542657981, 5.709833332003659, 7.121188047317667, 8.659094995891751, 10.348504939936118, 12.222562571712128, 14.326640476029088, 16.72520854388775, 19.514327728204563, 22.84639659120542, 26.985174278677775, 32.45041708777549, 40.51653063577149, 56.24173917965921, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101], \"type\": \"scatter\", \"uid\": \"18e76609-3566-476d-8d47-330675b93156\"}, {\"mode\": \"lines\", \"name\": \"10%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.10544871360158, 3.3412352360716455, 4.742254444079301, 6.359612423507469, 8.272540897341711, 10.613776133413358, 13.632153320849183, 17.886317030755077, 25.158857928096797, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101], \"type\": \"scatter\", \"uid\": \"e4e7186b-e43d-4f57-9834-b53c0dc360c4\"}, {\"mode\": \"lines\", \"name\": \"15%\", \"x\": [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], \"y\": [2.1628267805661325, 3.5520176514241695, 5.277537866144313, 7.556081836746261, 10.91896890928078, 17.47505074602704, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101], \"type\": \"scatter\", \"uid\": \"7b338702-28c3-4c02-b4b6-ee208951d840\"}], {\"margin\": {\"t\": 200}, \"title\": {\"text\": \"Size of fund given in years of expanses<br>versus<br>how long it will actually last before being depleted<br>given different investment return rates\", \"xref\": \"paper\"}, \"xaxis\": {\"title\": {\"text\": \"Fund size (years)\"}}, \"yaxis\": {\"range\": [1, 100], \"title\": {\"text\": \"Durability\"}}}, {\"showLink\": false, \"linkText\": \"Export to plot.ly\", \"plotlyServerURL\": \"https://plot.ly\"}); \n",
"}\n",
"});</script><script type=\"text/javascript\">window.addEventListener(\"resize\", function(){if (document.getElementById(\"0f8a2f3c-64f5-495f-b390-419b40e22ba2\")) {window._Plotly.Plots.resize(document.getElementById(\"0f8a2f3c-64f5-495f-b390-419b40e22ba2\"));};})</script>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"def durability_dist_per_i(i):\n",
" data = []\n",
" for year in range(2, 50):\n",
" try:\n",
" dur = how_long_porfolio_will_last(float(year), 1., i)\n",
" except (ValueError, ZeroDivisionError):\n",
" # when i is so big that we enter perpetual mode, we\n",
" # assign an arbitrary durability of 101 years\n",
" dur = 101\n",
" finally:\n",
" data.append((year, dur))\n",
" return list(zip(*data))\n",
"\n",
"def prepare_data_for_multiple_i(y_func):\n",
" traces = []\n",
" for i in INVESTMENT_RETURNS:\n",
" data = y_func(i)\n",
" trace = go.Scatter(\n",
" x = data[0],\n",
" y = data[1],\n",
" mode = 'lines',\n",
" name = f'{i:.0%}'\n",
" )\n",
" traces.append(trace)\n",
" return traces\n",
"\n",
"data = prepare_data_for_multiple_i(durability_dist_per_i)\n",
"title = (\n",
" 'Size of fund given in years of expanses<br>'\n",
" 'versus<br>how long it will actually last before '\n",
" 'being depleted<br>given different investment return rates'\n",
" )\n",
"layout = dict(title = dict(text=title, xref='paper'),\n",
" xaxis = dict(title = 'Fund size (years)'),\n",
" yaxis = dict(title = 'Durability', range=[1,100]),\n",
" margin = {'t': 200}\n",
" )\n",
"\n",
"fig = dict(data=data, layout=layout)\n",
"iplot(fig, filename='line-mode')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The time to accumulate the fund P0/p can be calculated in a similar way...\n",
"\n",
"> P0/p = r / (1-r) \\* M\n",
"\n",
"where *r* is the savings rate and *M* is the number of years worked. Now, if the funds are invested at a rate *i* and allowed to compound we get\n",
"\n",
"> P0/p = r / (1-r) \\* ((1+i)**M - 1) / i\n",
"\n",
"In traditional personal finance planning the time invested M is the most important\n",
"factor, with typical values around 30 or 40 years. Some people will be clever enough\n",
"to achieve superior investment returns i. We are not counting on this. In the case of early\n",
"retirement, M will be small, and we will presume that i is of the usual range, maybe around 6%.\n",
"The main lever in this queation is thus r/(1-r). For a tradiitonal savings rate r=0.1\n",
"the lever is r/(1-r)=0.11, whereas for an extreme savings rate r=0.75, the lever\n",
"r/(1-r)=3, which is 27 times higher! Even with a lot of time to compound and a market\n",
"outperformance of a few percent, it's hard to beat a factor of 27."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"# The time to accumulate the fund P0/p can be calculated in a similar way...\n",
"# P0/p = r / (1-r) * M\n",
"# where r is the savings rate and M is the number of years worked\n",
"# Now, if the funds are invested at a rate i and allowed to compound we get\n",
"# P0/p = r / (1-r) * ((1+i)**M - 1) / i\n",
"\n",
"def accumulated_fund(r, M, i):\n",
" \"\"\"Returns number of years of accumulated fund (X axis in the figure above)\"\"\"\n",
" return r/(1-r) * ((1+i)**M - 1)/i\n",
"\n",
"# In traditional personal finance planning the time invested M is the most important\n",
"# factor, with typical values around 30 or 40 years. Some people will be clever enough\n",
"# to achieve superior investment returns i. We are not counting on this. In the case of early\n",
"# retirement, M will be small, and we will presume that i is of the usual range, maybe around 6%.\n",
"# The main lever in this queation is thus r/(1-r). For a tradiitonal savings rate r=0.1\n",
"# the lever is r/(1-r)=0.11, whereas for an extreme savings rate r=0.75, the lever\n",
"# r/(1-r)=3, which is 27 times higher! Even with a lot of time to compound and a market\n",
"# outperformance of a few percent, it's hard to beat a factor of 27."
]
},
{
"cell_type": "code",
"execution_count": 83,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1.4092732400000012"
]
},
"execution_count": 83,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
">>> accumulated_fund(0.2, 5, 0.06)\n",
"1.4092732400000012\n",
"\n",
"# it means that if we save 20% of our income for 5 years with return rate of 6%,\n",
"# we would accumulate capital for a 1.4 years of living"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"36.110753093113516"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Now we want to ask how many years will it take to accumulate given fund?\n",
"\n",
"def time_to_accumulate_fund(p0, r, i):\n",
" # the formula is derived from the one used in `accumulated_fund` function\n",
" return log(1+i*(p0)*((1-r)/r))/log(1+i)\n",
"\n",
"# How many years to gather 30 years worth fund,\n",
"# given savings rate of 20% and investment return of 6%? \n",
"time_to_accumulate_fund(30, 0.2, 0.06)"
]
},
{
"cell_type": "code",
"execution_count": 84,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"mode": "lines",
"name": "1%",
"type": "scatter",
"uid": "93189c86-98f0-4bf3-9f92-92e04628dda2",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100
],
"y": [
344.135557412435,
276.7406182757755,
238.20753062831045,
211.46373777111853,
191.16022918889243,
174.9154073893288,
161.45962419345577,
150.03562376047245,
140.15545658871838,
131.48636351459788,
123.79134320578015,
116.89569190911321,
110.66698442285264,
105.00249671019489,
99.82097959024563,
95.05709388693843,
90.65753653655291,
86.57827645046318,
82.78253939463137,
79.239310933388,
75.92220550692258,
72.80859926967373,
69.87895622104566,
67.11629818449956,
64.50578333965996,
62.034367715375204,
59.69053082163515,
57.46405139620322,
55.34582269130065,
53.327699238585964,
51.40236888368286,
49.5632452633722,
47.80437693988478,
46.12037019909379,
44.506323127816856,
42.957769056578194,
41.470627821932794,
40.041163591650566,
38.66594822508341,
37.341829323612956,
36.06590227253428,
34.835485693912275,
33.64809982584642,
32.50144742181036,
31.39339682787485,
30.321966948463423,
29.285313855021982,
28.28171882833287,
27.309577655543766,
26.367391028405528,
25.453755910598602,
24.567357760081826,
23.706963507691654,
22.87141520622068,
22.05962427528947,
21.270566276807525,
20.5032761639537,
19.75684395360438,
19.030410778174343,
18.323165278057576,
17.6343403003826,
16.963209873733728,
16.30908643191898,
15.671318262860726,
15.04928716130723,
14.442406266362507,
13.850118066853398,
13.271892559333315,
12.70722554509235,
12.155637053932967,
11.616669883700531,
11.0898882456488,
10.57487650669163,
10.07123802045487,
9.578594039813165,
9.096582704283957,
8.624858096266456,
8.16308936066426,
7.710959882925188,
7.268166520975517,
6.834418886926295,
6.409438674788491,
5.99295903075923,
5.584723962934143,
5.184487787566212,
4.792014609231673,
4.407077832481056,
4.029459702750739,
3.658950874490232,
3.295350004623292,
2.938463369609166,
2.5881045045065423,
2.2440938625652915,
1.906258493984835,
1.574431742579847,
1.2484529591899847,
0.9281672307550783,
0.6134251240575079,
0.3040824432057482,
0
]
},
{
"mode": "lines",
"name": "2%",
"type": "scatter",
"uid": "728fe34c-99a0-4abb-97a5-098dafbb19f4",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100
],
"y": [
207.0931823138398,
172.42371718377396,
152.27953623264523,
138.08104695012312,
127.13951714360135,
118.25732874339872,
110.79564805232228,
104.37315859960205,
98.74391229829818,
93.73998523538026,
89.24161091760104,
85.16036424598894,
81.4290996519513,
77.99562872310125,
74.81858436077533,
71.86462245427147,
69.10647339963771,
66.5215514048012,
64.09094030302346,
61.79863981271834,
59.63099588976702,
57.576263721376954,
55.62426794281857,
53.766135223775564,
51.994081481288575,
50.30124085275689,
48.68152696492558,
47.12951944627942,
45.640370364112464,
44.20972653072116,
42.8336645547109,
41.5086362081605,
40.23142220398605,
38.9990928763102,
37.80897456264284,
36.658620723674474,
35.54578702150303,
34.46840972263751,
33.424586907391415,
32.41256205918795,
31.43070968104525,
30.47752264603246,
29.55160103680097,
28.651642268719005,
27.776432323471816,
26.92483794663586,
26.095799684795757,
25.288325656116218,
24.50148596359802,
23.734407673087272,
22.98627028891306,
22.25630166915515,
21.54377433027856,
20.848002097450568,
20.168337062467998,
19.50416681602587,
18.854911925181504,
18.220023630417412,
17.598981739769926,
16.99129270014208,
16.396487828220614,
15.814121685417973,
15.243770583006059,
14.685031205133336,
14.137519338753588,
13.600868700666974,
13.0747298529063,
12.558769198610582,
12.05266805133129,
11.55612177142752,
11.068838963836297,
10.590540732063761,
10.120959983741017,
9.659840783531703,
9.206937749574653,
8.76201548999879,
8.324848076364438,
7.895218551169506,
7.472918466814331,
7.0577474536482905,
6.649512814928478,
6.248029146706762,
5.853117980830154,
5.464607449391782,
5.082331969107119,
4.706131944215604,
4.3358534866207625,
3.97134815208509,
3.6124726913896112,
3.25908881545338,
2.9110629734858944,
2.5682661433163676,
2.2305736331087163,
1.8978648937301976,
1.5700233410962139,
1.2469361878630645,
0.9284942838865803,
0.6145919649057386,
0.3051269089495175,
0
]
},
{
"mode": "lines",
"name": "3%",
"type": "scatter",
"uid": "75d6cc44-a533-4241-b35a-ecb50156d194",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100
],
"y": [
152.27004558013923,
128.85780064373884,
115.17804895929862,
105.48295836886147,
97.97122070804416,
91.84048533622305,
86.66275402950606,
82.18255002610304,
78.23508560833977,
74.70784490783966,
71.52057496078987,
68.61401997005666,
65.94318045133149,
63.47307761367586,
61.175982585577984,
59.02954169732746,
57.01547110855283,
55.1186251194038,
53.326316719957944,
51.62781262328016,
50.01395162961093,
48.476851852619696,
47.009683079332156,
45.606487613527094,
44.26203771583605,
42.97172102073256,
41.731447590043786,
40.53757387817428,
39.38684004580588,
38.276317905092,
37.20336740344243,
36.16560001843848,
35.16084778719756,
34.18713696045336,
33.242665476620026,
32.325783609881185,
31.434977270296958,
30.56885353141365,
29.726128038084564,
28.905614008784166,
28.10621259610343,
27.326904408990853,
26.56674203267104,
25.824843408584243,
25.100385958352405,
24.392601353628628,
23.700770848466213,
23.024221103132426,
22.362320438553688,
21.7144754691812,
21.080128069305086,
20.45875263395974,
19.84985360074515,
19.252963203296275,
18.667639430892674,
18.093464171918423,
17.53004152164471,
16.97699623718501,
16.433972324525826,
15.900631744311783,
15.376653224606011,
14.861731170187507,
14.355574659116362,
13.857906518319924,
13.368462470847957,
12.886990348230821,
12.41324936206587,
11.947009429566561,
11.48805054834721,
11.036162216191993,
10.591142891979596,
10.152799494309209,
9.720946934707564,
9.295407682593693,
8.876011359443451,
8.462594359833094,
8.054999497253407,
7.653075672776661,
7.256677564829356,
6.865665338477757,
6.47990437277173,
6.099265004817305,
5.723622289361183,
5.35285577277258,
4.986849280399834,
4.6254907163632835,
4.2686718749216634,
3.916288262618292,
3.568238930476217,
3.2244263155686257,
2.8847560913427888,
2.549137026123621,
2.2174808492661753,
1.8897021244662575,
1.5657181297745388,
1.2454487438931117,
0.928816338363765,
0.6157456752853662,
0.30616381022362454,
0
]
},
{
"mode": "lines",
"name": "4%",
"type": "scatter",
"uid": "36ff1426-87f5-451c-8d7d-80ffae1ca4d7",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100
],
"y": [
122.02286243438569,
104.30727368388813,
93.92656624812516,
86.54886973230275,
80.81662279545375,
76.12513128029896,
72.15183279428864,
68.70418623544657,
65.65799855733457,
62.928471540684626,
60.45512199516807,
58.19329130392355,
56.10906515982988,
54.17608137882326,
52.37344169820869,
50.6842988903692,
49.09487296507967,
47.59374899956408,
46.17136506860959,
44.819631674782684,
43.5316441275018,
42.30146189325872,
41.123937034018674,
39.99457918532545,
38.90944811561578,
37.865067370396254,
36.8583542228468,
35.88656236998428,
34.94723468894299,
34.038164005711096,
33.15736029900017,
32.30302311270766,
31.473518214798094,
30.667357741614428,
29.883183221130956,
29.11975098831922,
28.375919599214498,
27.65063892374619,
26.942940655594402,
26.25193002374096,
25.5767785276175,
24.916717547806304,
24.27103270864365,
23.639058888980284,
23.02017579367951,
22.413804011887052,
21.81940149924528,
21.23646043048608,
20.664504376570225,
20.10308576702424,
19.551783603581637,
19.010201395843534,
18.47796529357923,
17.95472239360887,
17.440139202044207,
16.93390023508859,
16.435706743678985,
15.945275549045054,
15.462337977807136,
14.986638886573713,
14.517935767161015,
14.055997924567826,
13.600605720719887,
13.151549877768481,
12.70863083540254,
12.271658157225566,
11.840449981770043,
11.414832514180873,
10.994639555005186,
10.579712062884624,
10.1698977482645,
9.765050695516575,
9.3650310111238,
8.969704495799236,
8.578942338611265,
8.19262083136619,
7.8106211016591205,
7.43282886314771,
7.059134181732278,
6.6894312564416145,
6.323618213928361,
5.961596915571833,
5.6032727762714,
5.248554594090204,
4.897354389978745,
4.549587256870885,
4.205171217502118,
3.8640270903519185,
3.52607836315934,
3.1912510735041146,
2.8594736959847826,
2.530677035561172,
2.204794126661417,
1.88176013768344,
1.5615122805484927,
1.2439897249892333,
0.9291335172779056,
0.6168865031214448,
0.30719325446958556,
0
]
},
{
"mode": "lines",
"name": "6%",
"type": "scatter",
"uid": "bf3bc046-e2c2-4cb6-8189-65039d69d6fc",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100
],
"y": [
89.04410032021732,
77.0716525188861,
70.0360050201591,
65.02137951551406,
61.11400054086121,
57.90684634239562,
55.182797583545465,
52.812252016100445,
50.71161231898704,
48.823797723589344,
47.10809382370795,
45.534437662055474,
44.07999821159188,
42.7270277186159,
41.461456136449826,
40.271940112865565,
39.149200796372185,
38.08555120568429,
37.074551555223636,
36.110753093113516,
35.18950450288061,
34.30680338330774,
33.459180769437374,
32.64361024836611,
31.85743563987975,
31.09831286924686,
30.364162815812062,
29.65313274057415,
28.96356448518053,
28.29396806405937,
27.642999587994826,
27.009442693561912,
26.392192830782026,
25.790243896777536,
25.202676807197765,
24.62864967773148,
24.067389350899465,
23.518184052776565,
22.98037700346699,
22.453360836391592,
21.93657270650865,
21.429489987818275,
20.931626476919863,
20.4425290327901,
19.961774593937875,
19.48896752314784,
19.02373723752182,
18.565736087761007,
18.11463745583731,
17.67013404456608,
17.231936336264443,
16.79977120078132,
16.373380635813835,
15.952520624660561,
15.536960098469212,
15.126479991668909,
14.72087238067799,
14.319939697184642,
13.923494008338674,
13.531356357093722,
13.143356156721161,
12.759330634197099,
12.379124317756727,
12.002588564428747,
11.629581123816378,
11.259965734790025,
10.893611752107082,
10.530393800283285,
10.17019145231296,
9.812888931076532,
9.458374831488074,
9.106541861625061,
8.75728660125197,
8.41050927629955,
8.066113547995998,
7.724006315466359,
7.3840975307237935,
7.046300025072787,
6.710529346030677,
6.3767036039516265,
6.0447433276070655,
5.714571328039575,
5.386112570064045,
5.059294050841228,
4.734044684995144,
4.41029519578785,
4.087978011903032,
3.767027169424358,
3.447378218625804,
3.128968135219527,
2.811735235732652,
2.4956190967077543,
2.180560477443102,
1.8665012460081956,
1.5533843082875314,
1.241153539821842,
0.9297537202303093,
0.6191304700107367,
0.3092301895264858,
0
]
},
{
"mode": "lines",
"name": "10%",
"type": "scatter",
"uid": "5c1a44b9-dcae-42b9-8c19-4855b79c56a2",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100
],
"y": [
59.77423920720465,
52.431044449014394,
48.105747865376685,
45.015752251825056,
42.60240636291577,
40.61686819661446,
38.92639452974975,
37.451746537565484,
36.141810881838076,
34.96168527870091,
33.88647306639233,
32.89778932708371,
31.981670322986997,
31.127259887365305,
30.325950111836917,
29.570799929843208,
28.856130272463112,
28.17723511553261,
27.53017075386516,
26.911599188328736,
26.318669761699137,
25.74892835329521,
25.200246773434348,
24.670767193923375,
24.15885792809679,
23.66307788710266,
23.1821477460666,
22.714926354800113,
22.260391287961223,
21.81762269202514,
21.385789779968878,
20.964139468921815,
20.551986764821265,
20.148706580899834,
19.753726740407934,
19.366521963213966,
18.986608674364767,
18.61354050292277,
18.246904363343948,
17.88631703075507,
17.531422136808928,
17.181887525161148,
16.837402915648138,
16.497677834434217,
16.162439774111597,
15.831432553270172,
15.504414849634635,
15.181158884674225,
14.861449240769385,
14.545081794683426,
14.231862753328448,
13.921607779706234,
13.614141198507381,
13.30929527221336,
13.006909539706493,
12.706830210384762,
12.408909607628118,
12.113005656193069,
11.818981408740974,
11.526704607247604,
11.236047275510215,
10.946885339373956,
10.65909827165069,
10.372568759008054,
10.087182388370632,
9.802827350604122,
9.519394159451647,
9.236775383862438,
8.95486539200082,
8.67356010534937,
8.392756761427842,
8.112353683739421,
7.832250057630928,
7.5523457108140235,
7.272540897341713,
6.992736083869404,
6.712831737052499,
6.432728110944007,
6.152325033255584,
5.871521689334056,
5.590216402682607,
5.308306410820987,
5.02568763523178,
4.742254444079303,
4.457899406312797,
4.172513035675373,
3.8859835230327375,
3.598196455309472,
3.3090345191732116,
3.0183771874358225,
2.7261003859424506,
2.432076138490357,
2.136172187055307,
1.8382515842986635,
1.5381722549769332,
1.2357865224700664,
0.9309405961760464,
0.6234740149771947,
0.3132190413549768,
0
]
},
{
"mode": "lines",
"name": "15%",
"type": "scatter",
"uid": "189e6a23-b730-4d18-a53d-8b6058f862db",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100
],
"y": [
43.65594307453634,
38.64015122935974,
35.68228477442454,
33.56670494487194,
31.91243866635459,
30.549786137337342,
29.38822063543501,
28.373702489849038,
27.471372015474632,
26.657424502844197,
25.914878440917512,
25.231192874741694,
24.596841748301497,
24.004418088908967,
23.448047997182517,
22.922994147136233,
22.42537969893442,
21.95199124306772,
21.50013509095995,
21.06753046736267,
20.652228786064406,
20.25255171889054,
19.867043039555178,
19.49443072091769,
19.13359677163326,
18.783552989124786,
18.443421287890786,
18.11241760384142,
17.78983862101811,
17.475050746027044,
17.167480887502048,
16.866608696347665,
16.571959996697018,
16.283101193972787,
15.999634489791877,
15.721193767029067,
15.447441034564756,
15.178063341855347,
14.912770089790785,
14.651290677319706,
14.39337243376427,
14.13877879517241,
13.887287689892045,
13.638690104128111,
13.392788802814225,
13.149397184894779,
12.90833825522639,
12.669443697892891,
12.432553037883036,
12.19751287988273,
11.964176214446136,
11.73240178308282,
11.50205349487157,
11.272999888118726,
11.045113631346437,
10.81827105854625,
10.592351734183527,
10.367238043903248,
10.142814807279656,
9.918968909280782,
9.695588947392364,
9.472564891570373,
9.249787754372571,
9.0271492687616,
8.804541571177925,
8.581856887553247,
8.35898721997502,
8.135824031721604,
7.912257928365399,
7.688178332587586,
7.463473150261722,
7.238028425242339,
7.011727980136393,
6.78445304013602,
6.556081836746261,
6.326489187945152,
6.095546050958959,
5.8631190434133895,
5.629069928121764,
5.39325505618013,
5.155524762341382,
4.915722705815963,
4.67368514867179,
4.429240162851743,
4.182206755456783,
3.9323939003128614,
3.6795994618944987,
3.42360899534909,
3.164194403567879,
2.9011124288741414,
2.6341029528107343,
2.3628870725345186,
2.08716491624371,
1.8066131525917903,
1.5208821398110008,
1.2295926488011102,
0.9323320801069894,
0.6286500766817532,
0.31805341150392225,
0
]
}
],
"layout": {
"margin": {
"t": 200
},
"title": {
"text": "The time it takes to grow the fund to 30 years<br>as a function of savings rate",
"xref": "paper"
},
"xaxis": {
"range": [
0,
100
],
"title": {
"text": "Savings rate (%)"
}
},
"yaxis": {
"range": [
0,
80
],
"title": {
"text": "Working years"
}
}
}
},
"text/html": [
"<div id=\"e3ddfbe7-0108-4907-be27-8d0b1b5c19b7\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";\n",
"if (document.getElementById(\"e3ddfbe7-0108-4907-be27-8d0b1b5c19b7\")) {\n",
" Plotly.newPlot(\"e3ddfbe7-0108-4907-be27-8d0b1b5c19b7\", [{\"mode\": \"lines\", \"name\": \"1%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [344.135557412435, 276.7406182757755, 238.20753062831045, 211.46373777111853, 191.16022918889243, 174.9154073893288, 161.45962419345577, 150.03562376047245, 140.15545658871838, 131.48636351459788, 123.79134320578015, 116.89569190911321, 110.66698442285264, 105.00249671019489, 99.82097959024563, 95.05709388693843, 90.65753653655291, 86.57827645046318, 82.78253939463137, 79.239310933388, 75.92220550692258, 72.80859926967373, 69.87895622104566, 67.11629818449956, 64.50578333965996, 62.034367715375204, 59.69053082163515, 57.46405139620322, 55.34582269130065, 53.327699238585964, 51.40236888368286, 49.5632452633722, 47.80437693988478, 46.12037019909379, 44.506323127816856, 42.957769056578194, 41.470627821932794, 40.041163591650566, 38.66594822508341, 37.341829323612956, 36.06590227253428, 34.835485693912275, 33.64809982584642, 32.50144742181036, 31.39339682787485, 30.321966948463423, 29.285313855021982, 28.28171882833287, 27.309577655543766, 26.367391028405528, 25.453755910598602, 24.567357760081826, 23.706963507691654, 22.87141520622068, 22.05962427528947, 21.270566276807525, 20.5032761639537, 19.75684395360438, 19.030410778174343, 18.323165278057576, 17.6343403003826, 16.963209873733728, 16.30908643191898, 15.671318262860726, 15.04928716130723, 14.442406266362507, 13.850118066853398, 13.271892559333315, 12.70722554509235, 12.155637053932967, 11.616669883700531, 11.0898882456488, 10.57487650669163, 10.07123802045487, 9.578594039813165, 9.096582704283957, 8.624858096266456, 8.16308936066426, 7.710959882925188, 7.268166520975517, 6.834418886926295, 6.409438674788491, 5.99295903075923, 5.584723962934143, 5.184487787566212, 4.792014609231673, 4.407077832481056, 4.029459702750739, 3.658950874490232, 3.295350004623292, 2.938463369609166, 2.5881045045065423, 2.2440938625652915, 1.906258493984835, 1.574431742579847, 1.2484529591899847, 0.9281672307550783, 0.6134251240575079, 0.3040824432057482, 0.0], \"type\": \"scatter\", \"uid\": \"6676531f-3969-470e-81f2-473fa84c9eda\"}, {\"mode\": \"lines\", \"name\": \"2%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [207.0931823138398, 172.42371718377396, 152.27953623264523, 138.08104695012312, 127.13951714360135, 118.25732874339872, 110.79564805232228, 104.37315859960205, 98.74391229829818, 93.73998523538026, 89.24161091760104, 85.16036424598894, 81.4290996519513, 77.99562872310125, 74.81858436077533, 71.86462245427147, 69.10647339963771, 66.5215514048012, 64.09094030302346, 61.79863981271834, 59.63099588976702, 57.576263721376954, 55.62426794281857, 53.766135223775564, 51.994081481288575, 50.30124085275689, 48.68152696492558, 47.12951944627942, 45.640370364112464, 44.20972653072116, 42.8336645547109, 41.5086362081605, 40.23142220398605, 38.9990928763102, 37.80897456264284, 36.658620723674474, 35.54578702150303, 34.46840972263751, 33.424586907391415, 32.41256205918795, 31.43070968104525, 30.47752264603246, 29.55160103680097, 28.651642268719005, 27.776432323471816, 26.92483794663586, 26.095799684795757, 25.288325656116218, 24.50148596359802, 23.734407673087272, 22.98627028891306, 22.25630166915515, 21.54377433027856, 20.848002097450568, 20.168337062467998, 19.50416681602587, 18.854911925181504, 18.220023630417412, 17.598981739769926, 16.99129270014208, 16.396487828220614, 15.814121685417973, 15.243770583006059, 14.685031205133336, 14.137519338753588, 13.600868700666974, 13.0747298529063, 12.558769198610582, 12.05266805133129, 11.55612177142752, 11.068838963836297, 10.590540732063761, 10.120959983741017, 9.659840783531703, 9.206937749574653, 8.76201548999879, 8.324848076364438, 7.895218551169506, 7.472918466814331, 7.0577474536482905, 6.649512814928478, 6.248029146706762, 5.853117980830154, 5.464607449391782, 5.082331969107119, 4.706131944215604, 4.3358534866207625, 3.97134815208509, 3.6124726913896112, 3.25908881545338, 2.9110629734858944, 2.5682661433163676, 2.2305736331087163, 1.8978648937301976, 1.5700233410962139, 1.2469361878630645, 0.9284942838865803, 0.6145919649057386, 0.3051269089495175, 0.0], \"type\": \"scatter\", \"uid\": \"99969018-a72f-4e26-bfc1-c0ec841f4c46\"}, {\"mode\": \"lines\", \"name\": \"3%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [152.27004558013923, 128.85780064373884, 115.17804895929862, 105.48295836886147, 97.97122070804416, 91.84048533622305, 86.66275402950606, 82.18255002610304, 78.23508560833977, 74.70784490783966, 71.52057496078987, 68.61401997005666, 65.94318045133149, 63.47307761367586, 61.175982585577984, 59.02954169732746, 57.01547110855283, 55.1186251194038, 53.326316719957944, 51.62781262328016, 50.01395162961093, 48.476851852619696, 47.009683079332156, 45.606487613527094, 44.26203771583605, 42.97172102073256, 41.731447590043786, 40.53757387817428, 39.38684004580588, 38.276317905092, 37.20336740344243, 36.16560001843848, 35.16084778719756, 34.18713696045336, 33.242665476620026, 32.325783609881185, 31.434977270296958, 30.56885353141365, 29.726128038084564, 28.905614008784166, 28.10621259610343, 27.326904408990853, 26.56674203267104, 25.824843408584243, 25.100385958352405, 24.392601353628628, 23.700770848466213, 23.024221103132426, 22.362320438553688, 21.7144754691812, 21.080128069305086, 20.45875263395974, 19.84985360074515, 19.252963203296275, 18.667639430892674, 18.093464171918423, 17.53004152164471, 16.97699623718501, 16.433972324525826, 15.900631744311783, 15.376653224606011, 14.861731170187507, 14.355574659116362, 13.857906518319924, 13.368462470847957, 12.886990348230821, 12.41324936206587, 11.947009429566561, 11.48805054834721, 11.036162216191993, 10.591142891979596, 10.152799494309209, 9.720946934707564, 9.295407682593693, 8.876011359443451, 8.462594359833094, 8.054999497253407, 7.653075672776661, 7.256677564829356, 6.865665338477757, 6.47990437277173, 6.099265004817305, 5.723622289361183, 5.35285577277258, 4.986849280399834, 4.6254907163632835, 4.2686718749216634, 3.916288262618292, 3.568238930476217, 3.2244263155686257, 2.8847560913427888, 2.549137026123621, 2.2174808492661753, 1.8897021244662575, 1.5657181297745388, 1.2454487438931117, 0.928816338363765, 0.6157456752853662, 0.30616381022362454, 0.0], \"type\": \"scatter\", \"uid\": \"e8c93d2f-2e4b-40e5-8f32-dbf5b6b21f79\"}, {\"mode\": \"lines\", \"name\": \"4%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [122.02286243438569, 104.30727368388813, 93.92656624812516, 86.54886973230275, 80.81662279545375, 76.12513128029896, 72.15183279428864, 68.70418623544657, 65.65799855733457, 62.928471540684626, 60.45512199516807, 58.19329130392355, 56.10906515982988, 54.17608137882326, 52.37344169820869, 50.6842988903692, 49.09487296507967, 47.59374899956408, 46.17136506860959, 44.819631674782684, 43.5316441275018, 42.30146189325872, 41.123937034018674, 39.99457918532545, 38.90944811561578, 37.865067370396254, 36.8583542228468, 35.88656236998428, 34.94723468894299, 34.038164005711096, 33.15736029900017, 32.30302311270766, 31.473518214798094, 30.667357741614428, 29.883183221130956, 29.11975098831922, 28.375919599214498, 27.65063892374619, 26.942940655594402, 26.25193002374096, 25.5767785276175, 24.916717547806304, 24.27103270864365, 23.639058888980284, 23.02017579367951, 22.413804011887052, 21.81940149924528, 21.23646043048608, 20.664504376570225, 20.10308576702424, 19.551783603581637, 19.010201395843534, 18.47796529357923, 17.95472239360887, 17.440139202044207, 16.93390023508859, 16.435706743678985, 15.945275549045054, 15.462337977807136, 14.986638886573713, 14.517935767161015, 14.055997924567826, 13.600605720719887, 13.151549877768481, 12.70863083540254, 12.271658157225566, 11.840449981770043, 11.414832514180873, 10.994639555005186, 10.579712062884624, 10.1698977482645, 9.765050695516575, 9.3650310111238, 8.969704495799236, 8.578942338611265, 8.19262083136619, 7.8106211016591205, 7.43282886314771, 7.059134181732278, 6.6894312564416145, 6.323618213928361, 5.961596915571833, 5.6032727762714, 5.248554594090204, 4.897354389978745, 4.549587256870885, 4.205171217502118, 3.8640270903519185, 3.52607836315934, 3.1912510735041146, 2.8594736959847826, 2.530677035561172, 2.204794126661417, 1.88176013768344, 1.5615122805484927, 1.2439897249892333, 0.9291335172779056, 0.6168865031214448, 0.30719325446958556, 0.0], \"type\": \"scatter\", \"uid\": \"c6002fb3-64bc-41ce-9ce1-fa9769977e06\"}, {\"mode\": \"lines\", \"name\": \"6%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [89.04410032021732, 77.0716525188861, 70.0360050201591, 65.02137951551406, 61.11400054086121, 57.90684634239562, 55.182797583545465, 52.812252016100445, 50.71161231898704, 48.823797723589344, 47.10809382370795, 45.534437662055474, 44.07999821159188, 42.7270277186159, 41.461456136449826, 40.271940112865565, 39.149200796372185, 38.08555120568429, 37.074551555223636, 36.110753093113516, 35.18950450288061, 34.30680338330774, 33.459180769437374, 32.64361024836611, 31.85743563987975, 31.09831286924686, 30.364162815812062, 29.65313274057415, 28.96356448518053, 28.29396806405937, 27.642999587994826, 27.009442693561912, 26.392192830782026, 25.790243896777536, 25.202676807197765, 24.62864967773148, 24.067389350899465, 23.518184052776565, 22.98037700346699, 22.453360836391592, 21.93657270650865, 21.429489987818275, 20.931626476919863, 20.4425290327901, 19.961774593937875, 19.48896752314784, 19.02373723752182, 18.565736087761007, 18.11463745583731, 17.67013404456608, 17.231936336264443, 16.79977120078132, 16.373380635813835, 15.952520624660561, 15.536960098469212, 15.126479991668909, 14.72087238067799, 14.319939697184642, 13.923494008338674, 13.531356357093722, 13.143356156721161, 12.759330634197099, 12.379124317756727, 12.002588564428747, 11.629581123816378, 11.259965734790025, 10.893611752107082, 10.530393800283285, 10.17019145231296, 9.812888931076532, 9.458374831488074, 9.106541861625061, 8.75728660125197, 8.41050927629955, 8.066113547995998, 7.724006315466359, 7.3840975307237935, 7.046300025072787, 6.710529346030677, 6.3767036039516265, 6.0447433276070655, 5.714571328039575, 5.386112570064045, 5.059294050841228, 4.734044684995144, 4.41029519578785, 4.087978011903032, 3.767027169424358, 3.447378218625804, 3.128968135219527, 2.811735235732652, 2.4956190967077543, 2.180560477443102, 1.8665012460081956, 1.5533843082875314, 1.241153539821842, 0.9297537202303093, 0.6191304700107367, 0.3092301895264858, 0.0], \"type\": \"scatter\", \"uid\": \"cf977bae-0e74-42b5-859f-a8a1974e9bea\"}, {\"mode\": \"lines\", \"name\": \"10%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [59.77423920720465, 52.431044449014394, 48.105747865376685, 45.015752251825056, 42.60240636291577, 40.61686819661446, 38.92639452974975, 37.451746537565484, 36.141810881838076, 34.96168527870091, 33.88647306639233, 32.89778932708371, 31.981670322986997, 31.127259887365305, 30.325950111836917, 29.570799929843208, 28.856130272463112, 28.17723511553261, 27.53017075386516, 26.911599188328736, 26.318669761699137, 25.74892835329521, 25.200246773434348, 24.670767193923375, 24.15885792809679, 23.66307788710266, 23.1821477460666, 22.714926354800113, 22.260391287961223, 21.81762269202514, 21.385789779968878, 20.964139468921815, 20.551986764821265, 20.148706580899834, 19.753726740407934, 19.366521963213966, 18.986608674364767, 18.61354050292277, 18.246904363343948, 17.88631703075507, 17.531422136808928, 17.181887525161148, 16.837402915648138, 16.497677834434217, 16.162439774111597, 15.831432553270172, 15.504414849634635, 15.181158884674225, 14.861449240769385, 14.545081794683426, 14.231862753328448, 13.921607779706234, 13.614141198507381, 13.30929527221336, 13.006909539706493, 12.706830210384762, 12.408909607628118, 12.113005656193069, 11.818981408740974, 11.526704607247604, 11.236047275510215, 10.946885339373956, 10.65909827165069, 10.372568759008054, 10.087182388370632, 9.802827350604122, 9.519394159451647, 9.236775383862438, 8.95486539200082, 8.67356010534937, 8.392756761427842, 8.112353683739421, 7.832250057630928, 7.5523457108140235, 7.272540897341713, 6.992736083869404, 6.712831737052499, 6.432728110944007, 6.152325033255584, 5.871521689334056, 5.590216402682607, 5.308306410820987, 5.02568763523178, 4.742254444079303, 4.457899406312797, 4.172513035675373, 3.8859835230327375, 3.598196455309472, 3.3090345191732116, 3.0183771874358225, 2.7261003859424506, 2.432076138490357, 2.136172187055307, 1.8382515842986635, 1.5381722549769332, 1.2357865224700664, 0.9309405961760464, 0.6234740149771947, 0.3132190413549768, 0.0], \"type\": \"scatter\", \"uid\": \"f04a94e2-f738-47bb-ae43-1e6ef06a03c8\"}, {\"mode\": \"lines\", \"name\": \"15%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [43.65594307453634, 38.64015122935974, 35.68228477442454, 33.56670494487194, 31.91243866635459, 30.549786137337342, 29.38822063543501, 28.373702489849038, 27.471372015474632, 26.657424502844197, 25.914878440917512, 25.231192874741694, 24.596841748301497, 24.004418088908967, 23.448047997182517, 22.922994147136233, 22.42537969893442, 21.95199124306772, 21.50013509095995, 21.06753046736267, 20.652228786064406, 20.25255171889054, 19.867043039555178, 19.49443072091769, 19.13359677163326, 18.783552989124786, 18.443421287890786, 18.11241760384142, 17.78983862101811, 17.475050746027044, 17.167480887502048, 16.866608696347665, 16.571959996697018, 16.283101193972787, 15.999634489791877, 15.721193767029067, 15.447441034564756, 15.178063341855347, 14.912770089790785, 14.651290677319706, 14.39337243376427, 14.13877879517241, 13.887287689892045, 13.638690104128111, 13.392788802814225, 13.149397184894779, 12.90833825522639, 12.669443697892891, 12.432553037883036, 12.19751287988273, 11.964176214446136, 11.73240178308282, 11.50205349487157, 11.272999888118726, 11.045113631346437, 10.81827105854625, 10.592351734183527, 10.367238043903248, 10.142814807279656, 9.918968909280782, 9.695588947392364, 9.472564891570373, 9.249787754372571, 9.0271492687616, 8.804541571177925, 8.581856887553247, 8.35898721997502, 8.135824031721604, 7.912257928365399, 7.688178332587586, 7.463473150261722, 7.238028425242339, 7.011727980136393, 6.78445304013602, 6.556081836746261, 6.326489187945152, 6.095546050958959, 5.8631190434133895, 5.629069928121764, 5.39325505618013, 5.155524762341382, 4.915722705815963, 4.67368514867179, 4.429240162851743, 4.182206755456783, 3.9323939003128614, 3.6795994618944987, 3.42360899534909, 3.164194403567879, 2.9011124288741414, 2.6341029528107343, 2.3628870725345186, 2.08716491624371, 1.8066131525917903, 1.5208821398110008, 1.2295926488011102, 0.9323320801069894, 0.6286500766817532, 0.31805341150392225, 0.0], \"type\": \"scatter\", \"uid\": \"efe70ed0-48b1-4dd1-b5a3-1f0889aea4f8\"}], {\"margin\": {\"t\": 200}, \"title\": {\"text\": \"The time it takes to grow the fund to 30 years<br>as a function of savings rate\", \"xref\": \"paper\"}, \"xaxis\": {\"range\": [0, 100], \"title\": {\"text\": \"Savings rate (%)\"}}, \"yaxis\": {\"range\": [0, 80], \"title\": {\"text\": \"Working years\"}}}, {\"showLink\": false, \"linkText\": \"Export to plot.ly\", \"plotlyServerURL\": \"https://plot.ly\"}); \n",
"}\n",
"});</script><script type=\"text/javascript\">window.addEventListener(\"resize\", function(){if (document.getElementById(\"e3ddfbe7-0108-4907-be27-8d0b1b5c19b7\")) {window._Plotly.Plots.resize(document.getElementById(\"e3ddfbe7-0108-4907-be27-8d0b1b5c19b7\"));};})</script>"
],
"text/vnd.plotly.v1+html": [
"<div id=\"e3ddfbe7-0108-4907-be27-8d0b1b5c19b7\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";\n",
"if (document.getElementById(\"e3ddfbe7-0108-4907-be27-8d0b1b5c19b7\")) {\n",
" Plotly.newPlot(\"e3ddfbe7-0108-4907-be27-8d0b1b5c19b7\", [{\"mode\": \"lines\", \"name\": \"1%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [344.135557412435, 276.7406182757755, 238.20753062831045, 211.46373777111853, 191.16022918889243, 174.9154073893288, 161.45962419345577, 150.03562376047245, 140.15545658871838, 131.48636351459788, 123.79134320578015, 116.89569190911321, 110.66698442285264, 105.00249671019489, 99.82097959024563, 95.05709388693843, 90.65753653655291, 86.57827645046318, 82.78253939463137, 79.239310933388, 75.92220550692258, 72.80859926967373, 69.87895622104566, 67.11629818449956, 64.50578333965996, 62.034367715375204, 59.69053082163515, 57.46405139620322, 55.34582269130065, 53.327699238585964, 51.40236888368286, 49.5632452633722, 47.80437693988478, 46.12037019909379, 44.506323127816856, 42.957769056578194, 41.470627821932794, 40.041163591650566, 38.66594822508341, 37.341829323612956, 36.06590227253428, 34.835485693912275, 33.64809982584642, 32.50144742181036, 31.39339682787485, 30.321966948463423, 29.285313855021982, 28.28171882833287, 27.309577655543766, 26.367391028405528, 25.453755910598602, 24.567357760081826, 23.706963507691654, 22.87141520622068, 22.05962427528947, 21.270566276807525, 20.5032761639537, 19.75684395360438, 19.030410778174343, 18.323165278057576, 17.6343403003826, 16.963209873733728, 16.30908643191898, 15.671318262860726, 15.04928716130723, 14.442406266362507, 13.850118066853398, 13.271892559333315, 12.70722554509235, 12.155637053932967, 11.616669883700531, 11.0898882456488, 10.57487650669163, 10.07123802045487, 9.578594039813165, 9.096582704283957, 8.624858096266456, 8.16308936066426, 7.710959882925188, 7.268166520975517, 6.834418886926295, 6.409438674788491, 5.99295903075923, 5.584723962934143, 5.184487787566212, 4.792014609231673, 4.407077832481056, 4.029459702750739, 3.658950874490232, 3.295350004623292, 2.938463369609166, 2.5881045045065423, 2.2440938625652915, 1.906258493984835, 1.574431742579847, 1.2484529591899847, 0.9281672307550783, 0.6134251240575079, 0.3040824432057482, 0.0], \"type\": \"scatter\", \"uid\": \"6676531f-3969-470e-81f2-473fa84c9eda\"}, {\"mode\": \"lines\", \"name\": \"2%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [207.0931823138398, 172.42371718377396, 152.27953623264523, 138.08104695012312, 127.13951714360135, 118.25732874339872, 110.79564805232228, 104.37315859960205, 98.74391229829818, 93.73998523538026, 89.24161091760104, 85.16036424598894, 81.4290996519513, 77.99562872310125, 74.81858436077533, 71.86462245427147, 69.10647339963771, 66.5215514048012, 64.09094030302346, 61.79863981271834, 59.63099588976702, 57.576263721376954, 55.62426794281857, 53.766135223775564, 51.994081481288575, 50.30124085275689, 48.68152696492558, 47.12951944627942, 45.640370364112464, 44.20972653072116, 42.8336645547109, 41.5086362081605, 40.23142220398605, 38.9990928763102, 37.80897456264284, 36.658620723674474, 35.54578702150303, 34.46840972263751, 33.424586907391415, 32.41256205918795, 31.43070968104525, 30.47752264603246, 29.55160103680097, 28.651642268719005, 27.776432323471816, 26.92483794663586, 26.095799684795757, 25.288325656116218, 24.50148596359802, 23.734407673087272, 22.98627028891306, 22.25630166915515, 21.54377433027856, 20.848002097450568, 20.168337062467998, 19.50416681602587, 18.854911925181504, 18.220023630417412, 17.598981739769926, 16.99129270014208, 16.396487828220614, 15.814121685417973, 15.243770583006059, 14.685031205133336, 14.137519338753588, 13.600868700666974, 13.0747298529063, 12.558769198610582, 12.05266805133129, 11.55612177142752, 11.068838963836297, 10.590540732063761, 10.120959983741017, 9.659840783531703, 9.206937749574653, 8.76201548999879, 8.324848076364438, 7.895218551169506, 7.472918466814331, 7.0577474536482905, 6.649512814928478, 6.248029146706762, 5.853117980830154, 5.464607449391782, 5.082331969107119, 4.706131944215604, 4.3358534866207625, 3.97134815208509, 3.6124726913896112, 3.25908881545338, 2.9110629734858944, 2.5682661433163676, 2.2305736331087163, 1.8978648937301976, 1.5700233410962139, 1.2469361878630645, 0.9284942838865803, 0.6145919649057386, 0.3051269089495175, 0.0], \"type\": \"scatter\", \"uid\": \"99969018-a72f-4e26-bfc1-c0ec841f4c46\"}, {\"mode\": \"lines\", \"name\": \"3%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [152.27004558013923, 128.85780064373884, 115.17804895929862, 105.48295836886147, 97.97122070804416, 91.84048533622305, 86.66275402950606, 82.18255002610304, 78.23508560833977, 74.70784490783966, 71.52057496078987, 68.61401997005666, 65.94318045133149, 63.47307761367586, 61.175982585577984, 59.02954169732746, 57.01547110855283, 55.1186251194038, 53.326316719957944, 51.62781262328016, 50.01395162961093, 48.476851852619696, 47.009683079332156, 45.606487613527094, 44.26203771583605, 42.97172102073256, 41.731447590043786, 40.53757387817428, 39.38684004580588, 38.276317905092, 37.20336740344243, 36.16560001843848, 35.16084778719756, 34.18713696045336, 33.242665476620026, 32.325783609881185, 31.434977270296958, 30.56885353141365, 29.726128038084564, 28.905614008784166, 28.10621259610343, 27.326904408990853, 26.56674203267104, 25.824843408584243, 25.100385958352405, 24.392601353628628, 23.700770848466213, 23.024221103132426, 22.362320438553688, 21.7144754691812, 21.080128069305086, 20.45875263395974, 19.84985360074515, 19.252963203296275, 18.667639430892674, 18.093464171918423, 17.53004152164471, 16.97699623718501, 16.433972324525826, 15.900631744311783, 15.376653224606011, 14.861731170187507, 14.355574659116362, 13.857906518319924, 13.368462470847957, 12.886990348230821, 12.41324936206587, 11.947009429566561, 11.48805054834721, 11.036162216191993, 10.591142891979596, 10.152799494309209, 9.720946934707564, 9.295407682593693, 8.876011359443451, 8.462594359833094, 8.054999497253407, 7.653075672776661, 7.256677564829356, 6.865665338477757, 6.47990437277173, 6.099265004817305, 5.723622289361183, 5.35285577277258, 4.986849280399834, 4.6254907163632835, 4.2686718749216634, 3.916288262618292, 3.568238930476217, 3.2244263155686257, 2.8847560913427888, 2.549137026123621, 2.2174808492661753, 1.8897021244662575, 1.5657181297745388, 1.2454487438931117, 0.928816338363765, 0.6157456752853662, 0.30616381022362454, 0.0], \"type\": \"scatter\", \"uid\": \"e8c93d2f-2e4b-40e5-8f32-dbf5b6b21f79\"}, {\"mode\": \"lines\", \"name\": \"4%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [122.02286243438569, 104.30727368388813, 93.92656624812516, 86.54886973230275, 80.81662279545375, 76.12513128029896, 72.15183279428864, 68.70418623544657, 65.65799855733457, 62.928471540684626, 60.45512199516807, 58.19329130392355, 56.10906515982988, 54.17608137882326, 52.37344169820869, 50.6842988903692, 49.09487296507967, 47.59374899956408, 46.17136506860959, 44.819631674782684, 43.5316441275018, 42.30146189325872, 41.123937034018674, 39.99457918532545, 38.90944811561578, 37.865067370396254, 36.8583542228468, 35.88656236998428, 34.94723468894299, 34.038164005711096, 33.15736029900017, 32.30302311270766, 31.473518214798094, 30.667357741614428, 29.883183221130956, 29.11975098831922, 28.375919599214498, 27.65063892374619, 26.942940655594402, 26.25193002374096, 25.5767785276175, 24.916717547806304, 24.27103270864365, 23.639058888980284, 23.02017579367951, 22.413804011887052, 21.81940149924528, 21.23646043048608, 20.664504376570225, 20.10308576702424, 19.551783603581637, 19.010201395843534, 18.47796529357923, 17.95472239360887, 17.440139202044207, 16.93390023508859, 16.435706743678985, 15.945275549045054, 15.462337977807136, 14.986638886573713, 14.517935767161015, 14.055997924567826, 13.600605720719887, 13.151549877768481, 12.70863083540254, 12.271658157225566, 11.840449981770043, 11.414832514180873, 10.994639555005186, 10.579712062884624, 10.1698977482645, 9.765050695516575, 9.3650310111238, 8.969704495799236, 8.578942338611265, 8.19262083136619, 7.8106211016591205, 7.43282886314771, 7.059134181732278, 6.6894312564416145, 6.323618213928361, 5.961596915571833, 5.6032727762714, 5.248554594090204, 4.897354389978745, 4.549587256870885, 4.205171217502118, 3.8640270903519185, 3.52607836315934, 3.1912510735041146, 2.8594736959847826, 2.530677035561172, 2.204794126661417, 1.88176013768344, 1.5615122805484927, 1.2439897249892333, 0.9291335172779056, 0.6168865031214448, 0.30719325446958556, 0.0], \"type\": \"scatter\", \"uid\": \"c6002fb3-64bc-41ce-9ce1-fa9769977e06\"}, {\"mode\": \"lines\", \"name\": \"6%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [89.04410032021732, 77.0716525188861, 70.0360050201591, 65.02137951551406, 61.11400054086121, 57.90684634239562, 55.182797583545465, 52.812252016100445, 50.71161231898704, 48.823797723589344, 47.10809382370795, 45.534437662055474, 44.07999821159188, 42.7270277186159, 41.461456136449826, 40.271940112865565, 39.149200796372185, 38.08555120568429, 37.074551555223636, 36.110753093113516, 35.18950450288061, 34.30680338330774, 33.459180769437374, 32.64361024836611, 31.85743563987975, 31.09831286924686, 30.364162815812062, 29.65313274057415, 28.96356448518053, 28.29396806405937, 27.642999587994826, 27.009442693561912, 26.392192830782026, 25.790243896777536, 25.202676807197765, 24.62864967773148, 24.067389350899465, 23.518184052776565, 22.98037700346699, 22.453360836391592, 21.93657270650865, 21.429489987818275, 20.931626476919863, 20.4425290327901, 19.961774593937875, 19.48896752314784, 19.02373723752182, 18.565736087761007, 18.11463745583731, 17.67013404456608, 17.231936336264443, 16.79977120078132, 16.373380635813835, 15.952520624660561, 15.536960098469212, 15.126479991668909, 14.72087238067799, 14.319939697184642, 13.923494008338674, 13.531356357093722, 13.143356156721161, 12.759330634197099, 12.379124317756727, 12.002588564428747, 11.629581123816378, 11.259965734790025, 10.893611752107082, 10.530393800283285, 10.17019145231296, 9.812888931076532, 9.458374831488074, 9.106541861625061, 8.75728660125197, 8.41050927629955, 8.066113547995998, 7.724006315466359, 7.3840975307237935, 7.046300025072787, 6.710529346030677, 6.3767036039516265, 6.0447433276070655, 5.714571328039575, 5.386112570064045, 5.059294050841228, 4.734044684995144, 4.41029519578785, 4.087978011903032, 3.767027169424358, 3.447378218625804, 3.128968135219527, 2.811735235732652, 2.4956190967077543, 2.180560477443102, 1.8665012460081956, 1.5533843082875314, 1.241153539821842, 0.9297537202303093, 0.6191304700107367, 0.3092301895264858, 0.0], \"type\": \"scatter\", \"uid\": \"cf977bae-0e74-42b5-859f-a8a1974e9bea\"}, {\"mode\": \"lines\", \"name\": \"10%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [59.77423920720465, 52.431044449014394, 48.105747865376685, 45.015752251825056, 42.60240636291577, 40.61686819661446, 38.92639452974975, 37.451746537565484, 36.141810881838076, 34.96168527870091, 33.88647306639233, 32.89778932708371, 31.981670322986997, 31.127259887365305, 30.325950111836917, 29.570799929843208, 28.856130272463112, 28.17723511553261, 27.53017075386516, 26.911599188328736, 26.318669761699137, 25.74892835329521, 25.200246773434348, 24.670767193923375, 24.15885792809679, 23.66307788710266, 23.1821477460666, 22.714926354800113, 22.260391287961223, 21.81762269202514, 21.385789779968878, 20.964139468921815, 20.551986764821265, 20.148706580899834, 19.753726740407934, 19.366521963213966, 18.986608674364767, 18.61354050292277, 18.246904363343948, 17.88631703075507, 17.531422136808928, 17.181887525161148, 16.837402915648138, 16.497677834434217, 16.162439774111597, 15.831432553270172, 15.504414849634635, 15.181158884674225, 14.861449240769385, 14.545081794683426, 14.231862753328448, 13.921607779706234, 13.614141198507381, 13.30929527221336, 13.006909539706493, 12.706830210384762, 12.408909607628118, 12.113005656193069, 11.818981408740974, 11.526704607247604, 11.236047275510215, 10.946885339373956, 10.65909827165069, 10.372568759008054, 10.087182388370632, 9.802827350604122, 9.519394159451647, 9.236775383862438, 8.95486539200082, 8.67356010534937, 8.392756761427842, 8.112353683739421, 7.832250057630928, 7.5523457108140235, 7.272540897341713, 6.992736083869404, 6.712831737052499, 6.432728110944007, 6.152325033255584, 5.871521689334056, 5.590216402682607, 5.308306410820987, 5.02568763523178, 4.742254444079303, 4.457899406312797, 4.172513035675373, 3.8859835230327375, 3.598196455309472, 3.3090345191732116, 3.0183771874358225, 2.7261003859424506, 2.432076138490357, 2.136172187055307, 1.8382515842986635, 1.5381722549769332, 1.2357865224700664, 0.9309405961760464, 0.6234740149771947, 0.3132190413549768, 0.0], \"type\": \"scatter\", \"uid\": \"f04a94e2-f738-47bb-ae43-1e6ef06a03c8\"}, {\"mode\": \"lines\", \"name\": \"15%\", \"x\": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], \"y\": [43.65594307453634, 38.64015122935974, 35.68228477442454, 33.56670494487194, 31.91243866635459, 30.549786137337342, 29.38822063543501, 28.373702489849038, 27.471372015474632, 26.657424502844197, 25.914878440917512, 25.231192874741694, 24.596841748301497, 24.004418088908967, 23.448047997182517, 22.922994147136233, 22.42537969893442, 21.95199124306772, 21.50013509095995, 21.06753046736267, 20.652228786064406, 20.25255171889054, 19.867043039555178, 19.49443072091769, 19.13359677163326, 18.783552989124786, 18.443421287890786, 18.11241760384142, 17.78983862101811, 17.475050746027044, 17.167480887502048, 16.866608696347665, 16.571959996697018, 16.283101193972787, 15.999634489791877, 15.721193767029067, 15.447441034564756, 15.178063341855347, 14.912770089790785, 14.651290677319706, 14.39337243376427, 14.13877879517241, 13.887287689892045, 13.638690104128111, 13.392788802814225, 13.149397184894779, 12.90833825522639, 12.669443697892891, 12.432553037883036, 12.19751287988273, 11.964176214446136, 11.73240178308282, 11.50205349487157, 11.272999888118726, 11.045113631346437, 10.81827105854625, 10.592351734183527, 10.367238043903248, 10.142814807279656, 9.918968909280782, 9.695588947392364, 9.472564891570373, 9.249787754372571, 9.0271492687616, 8.804541571177925, 8.581856887553247, 8.35898721997502, 8.135824031721604, 7.912257928365399, 7.688178332587586, 7.463473150261722, 7.238028425242339, 7.011727980136393, 6.78445304013602, 6.556081836746261, 6.326489187945152, 6.095546050958959, 5.8631190434133895, 5.629069928121764, 5.39325505618013, 5.155524762341382, 4.915722705815963, 4.67368514867179, 4.429240162851743, 4.182206755456783, 3.9323939003128614, 3.6795994618944987, 3.42360899534909, 3.164194403567879, 2.9011124288741414, 2.6341029528107343, 2.3628870725345186, 2.08716491624371, 1.8066131525917903, 1.5208821398110008, 1.2295926488011102, 0.9323320801069894, 0.6286500766817532, 0.31805341150392225, 0.0], \"type\": \"scatter\", \"uid\": \"efe70ed0-48b1-4dd1-b5a3-1f0889aea4f8\"}], {\"margin\": {\"t\": 200}, \"title\": {\"text\": \"The time it takes to grow the fund to 30 years<br>as a function of savings rate\", \"xref\": \"paper\"}, \"xaxis\": {\"range\": [0, 100], \"title\": {\"text\": \"Savings rate (%)\"}}, \"yaxis\": {\"range\": [0, 80], \"title\": {\"text\": \"Working years\"}}}, {\"showLink\": false, \"linkText\": \"Export to plot.ly\", \"plotlyServerURL\": \"https://plot.ly\"}); \n",
"}\n",
"});</script><script type=\"text/javascript\">window.addEventListener(\"resize\", function(){if (document.getElementById(\"e3ddfbe7-0108-4907-be27-8d0b1b5c19b7\")) {window._Plotly.Plots.resize(document.getElementById(\"e3ddfbe7-0108-4907-be27-8d0b1b5c19b7\"));};})</script>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"p0 = 30 # number of fund's years to grow, play with this value if you want\n",
"\n",
"def working_years_dist_per_i(i, p0=30):\n",
" data = []\n",
" for r in range(1, 101, 1):\n",
" working_years = time_to_accumulate_fund(p0, r/100., i)\n",
" data.append((r, working_years))\n",
" return list(zip(*data))\n",
"\n",
"func = partial(working_years_dist_per_i, p0=p0)\n",
"\n",
"data = prepare_data_for_multiple_i(func)\n",
"title = (\n",
" f'The time it takes to grow the fund to {p0} years<br>'\n",
" 'as a function of savings rate'\n",
" )\n",
"layout = dict(title = dict(text=title, xref='paper'),\n",
" xaxis = dict(title = 'Savings rate (%)', range=[0, 100]),\n",
" yaxis = dict(title = 'Working years', range=[0,80]),\n",
" margin = {'t': 200}\n",
" )\n",
"\n",
"fig = dict(data=data, layout=layout)\n",
"iplot(fig, filename='line-mode')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Assuming that the life expectancy is 100 years and one is either financially independent or working to become so for the last 80 years of that time span (adjust the numbers as you see fit), then\n",
"\n",
"> 80 = N + M\n",
"\n",
"where N is the number of years living off your money and M is the number of years accumulating it. \n",
"\n",
"We can now plot the working time M as a function of the savings rate r to find out how many years are needed to work to accumulate enough money for a given rate of return i. This is the most important figure in this chapter. Specifically, it shows that high savings rates lead to extremely early financial independence. Conversely, the traditionally recomended savings rates mean working for 40 years or more, and they're very dependent on the return rate i. It also shows the difference between a savings rate of say 35%, which most people would consider to be high, and a savings rate of 70%. It shows what your savings rate r should be to retire in M years."
]
},
{
"cell_type": "code",
"execution_count": 59,
"metadata": {},
"outputs": [],
"source": [
"# N + M = 80\n",
"\n",
"def frange(x, y, jump=1.0):\n",
" \"\"\"Range for floats.\"\"\"\n",
" # source: https://stackoverflow.com/questions/7267226/range-for-floats\n",
"\n",
" i = 0.0\n",
" x = float(x) # Prevent yielding integers.\n",
" x0 = x\n",
" epsilon = jump / 2.0\n",
" yield x # yield always first value\n",
" while x + epsilon < y:\n",
" i += 1.0\n",
" x = x0 + i * jump\n",
" yield x\n",
"\n",
"def calculate_years_of_provision(p0, i, r):\n",
" \"\"\"Given the amount of fund (in years) calculate\n",
" how many years will it take to accumulate it\n",
" and how many years it will last for.\n",
" \"\"\"\n",
" n = how_long_porfolio_will_last(p0, 1., i)\n",
" m = time_to_accumulate_fund(p0, r, i)\n",
" return n + m\n",
"\n",
"def find_p0(years, i, r):\n",
" \"\"\"Determine value of optimal P0 for `years` left.\n",
" \n",
" We do it numerically i.e brute forcefuly\"\"\"\n",
" for p in frange(1,years+1, 0.01):\n",
" try:\n",
" res = calculate_years_of_provision(p, i, r)\n",
" if res >= years:\n",
" return p\n",
" except (ValueError, ZeroDivisionError):\n",
" return p\n",
" raise ValueError(f\"p0 not found: i={i}, r={r}\")\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 80,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"mode": "lines",
"name": "1%",
"type": "scatter",
"uid": "45f3ca4f-52df-48b1-83f7-93541a4e147a",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101
],
"y": [
74.03628014438084,
71.10749092512864,
69.77789758406395,
68.85349029821927,
67.11629818449954,
66.59959179791927,
65.38600777740695,
64.34697503038505,
63.42446954474894,
62.09689960838536,
61.36034893442765,
60.25617061863648,
59.61604182717965,
58.6484462410057,
57.741930708123526,
56.584901901393444,
55.7872315972475,
55.02117964647519,
54.031523417243314,
53.090951965834826,
52.19245519231321,
51.330242319117275,
50.499486918192595,
49.696133369037796,
48.916748138272006,
47.981110473677305,
47.24893226447508,
46.36984051261285,
45.51796956714048,
44.84076327275086,
44.02961521599931,
43.23866457865849,
42.46598882771082,
41.58097565240338,
40.844575103163244,
40.12162540882542,
39.29524009367555,
38.59973931172771,
37.806373520681596,
37.02945036817052,
36.368484693761424,
35.61747943103315,
34.8796229229752,
34.15395699103427,
33.439602000159844,
32.7357488107022,
31.95922752211925,
31.276897364212367,
30.60291090043818,
29.862045353791466,
29.205488093741874,
28.485718955113917,
27.844281952388034,
27.1431859598083,
26.514868961788682,
25.83033112881019,
25.154381171876125,
24.48653345451104,
23.826331978708673,
23.17334808397782,
22.527178356786248,
21.887442728219167,
21.253782740307628,
20.625859963771678,
20.003354551915123,
19.343265112285994,
18.732327851381534,
18.125914634153222,
17.48583493123516,
16.889245943288717,
16.261510416994007,
15.673706806569356,
15.057218834025191,
14.47726160642539,
13.871025992410104,
13.27025663981999,
12.701174509734345,
12.109307382027573,
11.522244457740735,
10.939777432367876,
10.382969170431698,
9.8078537340011,
9.236778548196567,
8.669567685376691,
8.106052372296125,
7.5460706031620886,
6.989466777194314,
6.436091358883347,
5.874085196938853,
5.327866587344482,
4.784447685208425,
4.243700650829498,
3.7055022837527964,
3.163517922670556,
2.631127945272256,
2.100931214085251,
1.569761249001368,
1.04466539654048,
0.5214436095802695,
0,
-0.518758039058313
]
},
{
"mode": "lines",
"name": "2%",
"type": "scatter",
"uid": "f8d9c116-9115-4d40-89fd-ac7723ed7848",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101
],
"y": [
72.0831778077469,
69.24236379353395,
68.01422213982265,
66.55760877855154,
64.9927072913962,
63.807775445097455,
62.456333411245204,
60.99016986486592,
59.75094685589582,
58.38882138319017,
57.19314046709436,
56.12481647471798,
54.92871183564387,
53.840708237266476,
52.84060887986467,
51.72282738345748,
50.685098187472924,
49.71508068695201,
48.63871360942185,
47.62637662779526,
46.669732205433256,
45.761789627533744,
44.75746989798108,
43.93545029878629,
43.01746727713775,
42.13816630356769,
41.29360730327579,
40.36370348405922,
39.58255376490556,
38.71745764845481,
37.882225465667695,
37.07433079975709,
36.29150971072315,
35.53172685746494,
34.79314677309576,
33.98258540028416,
33.28422714878277,
32.51597073147475,
31.852004130880918,
31.120422911907045,
30.406459363548077,
29.708968244854294,
29.026893732309762,
28.35926060118495,
27.705166438565385,
26.994354129861513,
26.36678829024224,
25.750382052648142,
25.080533828906027,
24.48625803471191,
23.84073824837948,
23.207259857209166,
22.642450348242647,
22.02969024693075,
21.427288084980145,
20.834739234658155,
20.251568023032974,
19.726834940448473,
19.159635315593526,
18.60056092356465,
18.004044955118893,
17.461500670851137,
16.925980506561746,
16.39716093562457,
15.874734618463926,
15.320010125570253,
14.810820910975362,
14.307173760632072,
13.808816801626369,
13.282247043452605,
12.795014422377252,
12.281581565536532,
11.804542686806125,
11.303308425263216,
10.835612740766859,
10.34571722487423,
9.886585249187215,
9.407238548752945,
8.933464887392196,
8.48642871891399,
8.022125139608374,
7.562873698868914,
7.108511260097256,
6.675738912527485,
6.229588248645151,
5.7878801156443185,
5.350474040896937,
4.917234595631739,
4.499451071418991,
4.073091000052041,
3.650525408611743,
3.231636599614566,
2.8163108522094134,
2.404438242141934,
1.9959124714313392,
1.5906307071409487,
1.1884934286686686,
0.7894042830253138,
0.3932699476066342,
0,
-0.39049320560132933
]
},
{
"mode": "lines",
"name": "3%",
"type": "scatter",
"uid": "c55f6bcd-0864-4125-9c7d-f0fa3e7ed4a1",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101
],
"y": [
70.886325965238,
68.02126856322926,
65.4282989484691,
63.55293370650099,
61.65507998789702,
59.979303861465986,
58.42393510635004,
56.718660054846545,
55.28625788710042,
53.6822571125394,
52.279394187152654,
51.034273361860045,
49.75945599448642,
48.454514218412264,
47.261285462209656,
46.162086762118555,
45.01203347883144,
43.9404927413849,
42.815261681341056,
41.75771379488471,
40.75995017047164,
39.81525348675081,
38.91786997147548,
37.95834595360321,
37.14444823265745,
36.2659718841263,
35.42379830658801,
34.520793686752256,
33.744424080282755,
32.995723722283564,
32.18529989222491,
31.402466688411046,
30.728417510772623,
29.993061500105227,
29.27989157614338,
28.587407668418447,
27.914238905713308,
27.259129460791286,
26.54857848842594,
25.92789910892865,
25.322053890730455,
24.662597201893696,
24.085370412116973,
23.45592275861497,
22.904101224999025,
22.30158521091721,
21.712202322033026,
21.135311666848228,
20.62777415355114,
20.072763450605006,
19.5285672995678,
18.9946884567923,
18.470658878839046,
17.956037498957496,
17.450408208762344,
16.953378022856484,
16.464575406912335,
15.983648752098574,
15.510264980790351,
15.044108270275135,
14.584878882706715,
14.132292090898732,
13.686077190717167,
13.207360954537839,
12.774302709993915,
12.346871072859974,
11.924843304253901,
11.474000210994694,
11.063294881836589,
10.657375968608946,
10.256057973993752,
9.829659035882594,
9.438133947518327,
9.023392211312922,
8.640983141919081,
8.262345283743135,
7.863314796619679,
7.492882463804221,
7.1039388727608035,
6.741159848852739,
6.38147592380187,
6.006119226946526,
5.653340817337632,
5.2867798335338465,
4.940450294452878,
4.582230923413218,
4.241925663064629,
3.891625199582703,
3.5456546757514364,
3.2141729831259407,
2.8755375449281417,
2.549137026123621,
2.2174808492661753,
1.8958278843482197,
1.5708178765574001,
1.2495245068202343,
0.9349236673320225,
0.6198132708419206,
0.3092114990807553,
0,
-0.3058562582567181
]
},
{
"mode": "lines",
"name": "4%",
"type": "scatter",
"uid": "27501da1-c821-4a60-bbc3-1405c26ef256",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101
],
"y": [
68.80734240457924,
65.3113825671162,
62.50433930113967,
59.96209522783091,
57.6356760199047,
55.54545721313085,
53.568463438071745,
51.79154082214734,
50.001534650751374,
48.451818516293706,
46.95888658081926,
45.50205261908727,
44.18693955995401,
42.873247515177304,
41.66664581475376,
40.442132688809664,
39.30286808418829,
38.23801576463697,
37.23855354393894,
36.296895987075786,
35.31074126400947,
34.375071394056015,
33.48492969125701,
32.63600755038398,
31.824537562898183,
31.047207675842234,
30.21693440128853,
29.501270684351972,
28.731078943425068,
27.9883489163783,
27.348905901358542,
26.65395963410993,
25.981181438477474,
25.329117445665126,
24.696442037849515,
24.081943299865618,
23.484510467879957,
22.90312305520152,
22.336841393574463,
21.719617090733525,
21.182327221847576,
20.657716684312152,
20.14509648803302,
19.583682053752906,
19.094430862019703,
18.615363104818417,
18.089450197778913,
17.630457680787913,
17.126007117298837,
16.685223180057474,
16.200455900737094,
15.776233899088501,
15.309574894119859,
14.900455037720228,
14.450503308539204,
14.055185482573748,
13.620689323318402,
13.238010644565447,
12.81784715161732,
12.40499960557809,
12.039921273819846,
11.639923926700018,
11.285056449653831,
10.897039629382654,
10.515241197233697,
10.174746296175352,
9.803768013404342,
9.438464122689057,
9.078668768209408,
8.755247470125823,
8.40495173163109,
8.059709302074186,
7.747232956150443,
7.410641253364003,
7.078701896960582,
6.75129153350955,
6.451955463975322,
6.132214592093866,
5.816661491615625,
5.50519072355026,
5.2172042883076335,
4.912564572535423,
4.611714396972843,
4.314562929329915,
4.021022562343659,
3.745347154257801,
3.457750140424567,
3.1735199089099138,
2.892580327406304,
2.614857815672119,
2.3494815850600745,
2.0769577304215123,
1.8074449532635881,
1.540878812822584,
1.27719691417291,
1.0163388225335126,
0.7613076104960629,
0.5049022749481284,
0.25115086032060635,
0,
-0.24860207952863497
]
},
{
"mode": "lines",
"name": "6%",
"type": "scatter",
"uid": "0fb02509-9080-4930-97a7-ee62854e5d16",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101
],
"y": [
63.89492690548186,
58.262821568515854,
54.04052614728848,
50.66148389678545,
47.87616106009669,
45.48602631486428,
43.31702557882478,
41.47983394780704,
39.68729633524192,
38.200818922547555,
36.77689820570718,
35.39272399711049,
34.21937382624153,
33.04934230251838,
31.96436315836662,
30.95314035530399,
30.006440675818638,
29.116621163165156,
28.192574250584958,
27.39978039756943,
26.64742532389232,
25.850787358323487,
25.16936157404263,
24.439650086183097,
23.81704552093011,
23.14360432113746,
22.49556920529727,
21.944965018381808,
21.34136927673747,
20.758192002608368,
20.26460869159577,
19.717363694312002,
19.186886136940952,
18.672174728434477,
18.172315272050337,
17.751662992190948,
17.27805765221269,
16.816992243369945,
16.367815192745198,
15.929924424952382,
15.562701966645243,
15.144749116440055,
14.736526816896058,
14.33758757349461,
13.947514065107075,
13.565916490830006,
13.192430202176665,
12.879463016236254,
12.520195959769621,
12.168076467259146,
11.822821370084267,
11.484163996956987,
11.151852916784472,
10.825650799042663,
10.505333378721245,
10.190688514532688,
9.881515330479285,
9.620244686094383,
9.320453007097782,
9.02558977190849,
8.735491964213288,
8.450004520343102,
8.168979820247486,
7.892277218555112,
7.619762611990646,
7.351308039817273,
7.086791314324664,
6.8260956786912965,
6.569109489823159,
6.315725924012179,
6.065842703472204,
5.819361842000211,
5.576189408179895,
5.362725351581645,
5.124894598243581,
4.890111854174274,
4.658297341588672,
4.429374370935565,
4.203269183524225,
3.979910804049558,
3.759230902277915,
3.5411636632191046,
3.325645665167323,
3.1126157650456334,
2.902014990535223,
2.6937864385133543,
2.4878751793623706,
2.2842281667471056,
2.08279415248997,
1.8835236062019165,
1.686368639353946,
1.4912829334979896,
1.2982216723679685,
1.1071414776120152,
0.9180003479253105,
0.7307576013698799,
0.5453738206831218,
0.3618108013912196,
0.18003150255651396,
0,
-0.17934875101169703
]
},
{
"mode": "lines",
"name": "10%",
"type": "scatter",
"uid": "1190ce34-60a8-4ece-a417-8e8a47e472c1",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101
],
"y": [
48.213326892977946,
41.54708702650688,
37.384540204657036,
34.45502073114762,
32.19994696887898,
30.27921480655762,
28.744475716069022,
27.334739357485123,
26.09022843591807,
24.976048062634092,
23.967309130271467,
23.045634439269303,
22.281381076245346,
21.494179132705984,
20.760636229421067,
20.07381971887694,
19.428059140716297,
18.818657274580307,
18.241679420269314,
17.693796790987737,
17.172168155603433,
16.674349039938182,
16.198221128139526,
15.741936700361316,
15.303874420278124,
14.882603799147548,
14.476856370065438,
14.085502107095794,
13.707529984199494,
13.342031831336943,
12.988188838666739,
12.645260204111777,
12.312573528352281,
11.989516644094389,
11.675530630040532,
11.370103809228771,
11.07276656984954,
10.78308687688381,
10.500666366856192,
10.225136937092502,
9.956157756193777,
9.693412634805536,
9.436607705799512,
9.185469371175959,
8.939742479712935,
8.699188704925135,
8.4635850974784,
8.232722790017364,
8.006405835545928,
7.784450163168301,
7.566682637243332,
7.352940207901207,
7.143069142478692,
6.9369243287960565,
6.734368642364779,
6.535272370613287,
6.339512688074467,
6.146973177216292,
5.957543390233305,
5.771118447667772,
5.5875986702073615,
5.406889240422064,
5.2288998915657725,
5.053544620884814,
4.880741425153389,
4.710412056399571,
4.542481795999937,
4.376879245509785,
4.213536132762932,
4.052387131922613,
3.8933696962960718,
3.7364239028415898,
3.58149230740022,
3.4285198097766183,
3.277453527875704,
3.1282426801753536,
2.9808384758813036,
2.8351940121694144,
2.691264177973556,
2.549005563825042,
2.408376377292536,
2.2693363636100776,
2.131846731115874,
1.995870081156179,
1.8613703421371077,
1.7283127074333795,
1.5966635768863426,
1.466390501645204,
1.3374621321247522,
1.2098481688706444,
1.0835193161394827,
0.958447238015625,
0.8346045169002088,
0.7119646142201054,
0.5905018332158858,
0.470191283678169,
0.3510088485111538,
0.2329311520109538,
0.11593552975422591,
0,
-0.11489676348564296
]
},
{
"mode": "lines",
"name": "15%",
"type": "scatter",
"uid": "43ff4d19-e8df-492c-92f1-f70982ecb25f",
"x": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101
],
"y": [
33.971534429582654,
29.002428626084477,
26.09168189311725,
24.02366257308688,
22.417404871468612,
21.103216444720164,
19.9905782124617,
19.025458335996188,
18.173005158753412,
17.409422202836538,
16.717736398695028,
16.085415449961367,
15.502942183787297,
14.962918743044728,
14.45948058445849,
13.987899987209929,
13.544309974585644,
13.125507267448212,
12.728808584559907,
12.351943845139626,
11.992975455204682,
11.650236387699888,
11.322282038003188,
11.007852333390701,
10.705841582482257,
10.41527424162917,
10.135285257295136,
9.86510398516157,
9.604040932354595,
9.351476748168524,
9.10685302064941,
8.869664534840673,
8.639452722680588,
8.41580009099904,
8.198325457417667,
7.986679857537022,
7.780543013009392,
7.579620270714943,
7.383639939591069,
7.192350964687397,
7.005520888467882,
6.822934057815034,
6.644390042036893,
6.469702232763203,
6.298696601198682,
6.131210591976693,
5.967092135982399,
5.806198767113463,
5.648396830116711,
5.493560768458373,
5.341572482716679,
5.1923207512787055,
5.045700706219324,
4.901613358172354,
4.759965164799066,
4.620667638139942,
4.483636986719644,
4.348793788778118,
4.216062693434828,
4.085372146968845,
3.956654141723543,
3.829843985428255,
3.70488008897657,
3.5817037709170587,
3.4602590771015507,
3.3404926141022933,
3.2223533951555234,
3.1057926975178067,
2.9907639302354103,
2.8772225114275742,
2.7651257542739236,
2.6544327609755025,
2.54510432402946,
2.437102834220305,
2.330392194786726,
2.2249377412731417,
2.1207061666201033,
2.0176654510878738,
1.9157847966437842,
1.8150345654763915,
1.7153862223288716,
1.6168122803704066,
1.5192862503482603,
1.4227825927847797,
1.327276673003091,
1.2327447187829552,
1.1391637804643624,
1.0465116933309655,
0.9547670421188154,
0.8639091275078714,
0.773917934464841,
0.6847741023159508,
0.5964588964373961,
0.5089541814596833,
0.42224239588972473,
0.3363065280616087,
0.25113009333341896,
0.1666971124534318,
0.0829920910244417,
0,
-0.08229374284904645
]
}
],
"layout": {
"margin": {
"t": 200
},
"title": {
"text": "The time it takes to grow the fund provided 73 years till death<br>as a function of savings rate",
"xref": "paper"
},
"xaxis": {
"range": [
0,
100
],
"title": {
"text": "Savings rate (%)"
}
},
"yaxis": {
"range": [
0,
83
],
"title": {
"text": "Working years"
}
}
}
},
"text/html": [
"<div id=\"01fd5811-e23f-4168-a7e3-a8f73299d8d5\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";\n",
"if (document.getElementById(\"01fd5811-e23f-4168-a7e3-a8f73299d8d5\")) {\n",
" Plotly.newPlot(\"01fd5811-e23f-4168-a7e3-a8f73299d8d5\", [{\"mode\": \"lines\", \"name\": \"1%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [74.03628014438084, 71.10749092512864, 69.77789758406395, 68.85349029821927, 67.11629818449954, 66.59959179791927, 65.38600777740695, 64.34697503038505, 63.42446954474894, 62.09689960838536, 61.36034893442765, 60.25617061863648, 59.61604182717965, 58.6484462410057, 57.741930708123526, 56.584901901393444, 55.7872315972475, 55.02117964647519, 54.031523417243314, 53.090951965834826, 52.19245519231321, 51.330242319117275, 50.499486918192595, 49.696133369037796, 48.916748138272006, 47.981110473677305, 47.24893226447508, 46.36984051261285, 45.51796956714048, 44.84076327275086, 44.02961521599931, 43.23866457865849, 42.46598882771082, 41.58097565240338, 40.844575103163244, 40.12162540882542, 39.29524009367555, 38.59973931172771, 37.806373520681596, 37.02945036817052, 36.368484693761424, 35.61747943103315, 34.8796229229752, 34.15395699103427, 33.439602000159844, 32.7357488107022, 31.95922752211925, 31.276897364212367, 30.60291090043818, 29.862045353791466, 29.205488093741874, 28.485718955113917, 27.844281952388034, 27.1431859598083, 26.514868961788682, 25.83033112881019, 25.154381171876125, 24.48653345451104, 23.826331978708673, 23.17334808397782, 22.527178356786248, 21.887442728219167, 21.253782740307628, 20.625859963771678, 20.003354551915123, 19.343265112285994, 18.732327851381534, 18.125914634153222, 17.48583493123516, 16.889245943288717, 16.261510416994007, 15.673706806569356, 15.057218834025191, 14.47726160642539, 13.871025992410104, 13.27025663981999, 12.701174509734345, 12.109307382027573, 11.522244457740735, 10.939777432367876, 10.382969170431698, 9.8078537340011, 9.236778548196567, 8.669567685376691, 8.106052372296125, 7.5460706031620886, 6.989466777194314, 6.436091358883347, 5.874085196938853, 5.327866587344482, 4.784447685208425, 4.243700650829498, 3.7055022837527964, 3.163517922670556, 2.631127945272256, 2.100931214085251, 1.569761249001368, 1.04466539654048, 0.5214436095802695, 0.0, -0.518758039058313], \"type\": \"scatter\", \"uid\": \"ca8bd11d-1b63-4035-8232-0f62c5329165\"}, {\"mode\": \"lines\", \"name\": \"2%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [72.0831778077469, 69.24236379353395, 68.01422213982265, 66.55760877855154, 64.9927072913962, 63.807775445097455, 62.456333411245204, 60.99016986486592, 59.75094685589582, 58.38882138319017, 57.19314046709436, 56.12481647471798, 54.92871183564387, 53.840708237266476, 52.84060887986467, 51.72282738345748, 50.685098187472924, 49.71508068695201, 48.63871360942185, 47.62637662779526, 46.669732205433256, 45.761789627533744, 44.75746989798108, 43.93545029878629, 43.01746727713775, 42.13816630356769, 41.29360730327579, 40.36370348405922, 39.58255376490556, 38.71745764845481, 37.882225465667695, 37.07433079975709, 36.29150971072315, 35.53172685746494, 34.79314677309576, 33.98258540028416, 33.28422714878277, 32.51597073147475, 31.852004130880918, 31.120422911907045, 30.406459363548077, 29.708968244854294, 29.026893732309762, 28.35926060118495, 27.705166438565385, 26.994354129861513, 26.36678829024224, 25.750382052648142, 25.080533828906027, 24.48625803471191, 23.84073824837948, 23.207259857209166, 22.642450348242647, 22.02969024693075, 21.427288084980145, 20.834739234658155, 20.251568023032974, 19.726834940448473, 19.159635315593526, 18.60056092356465, 18.004044955118893, 17.461500670851137, 16.925980506561746, 16.39716093562457, 15.874734618463926, 15.320010125570253, 14.810820910975362, 14.307173760632072, 13.808816801626369, 13.282247043452605, 12.795014422377252, 12.281581565536532, 11.804542686806125, 11.303308425263216, 10.835612740766859, 10.34571722487423, 9.886585249187215, 9.407238548752945, 8.933464887392196, 8.48642871891399, 8.022125139608374, 7.562873698868914, 7.108511260097256, 6.675738912527485, 6.229588248645151, 5.7878801156443185, 5.350474040896937, 4.917234595631739, 4.499451071418991, 4.073091000052041, 3.650525408611743, 3.231636599614566, 2.8163108522094134, 2.404438242141934, 1.9959124714313392, 1.5906307071409487, 1.1884934286686686, 0.7894042830253138, 0.3932699476066342, 0.0, -0.39049320560132933], \"type\": \"scatter\", \"uid\": \"da44f250-98d0-4154-a0d9-eb6b8dde9506\"}, {\"mode\": \"lines\", \"name\": \"3%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [70.886325965238, 68.02126856322926, 65.4282989484691, 63.55293370650099, 61.65507998789702, 59.979303861465986, 58.42393510635004, 56.718660054846545, 55.28625788710042, 53.6822571125394, 52.279394187152654, 51.034273361860045, 49.75945599448642, 48.454514218412264, 47.261285462209656, 46.162086762118555, 45.01203347883144, 43.9404927413849, 42.815261681341056, 41.75771379488471, 40.75995017047164, 39.81525348675081, 38.91786997147548, 37.95834595360321, 37.14444823265745, 36.2659718841263, 35.42379830658801, 34.520793686752256, 33.744424080282755, 32.995723722283564, 32.18529989222491, 31.402466688411046, 30.728417510772623, 29.993061500105227, 29.27989157614338, 28.587407668418447, 27.914238905713308, 27.259129460791286, 26.54857848842594, 25.92789910892865, 25.322053890730455, 24.662597201893696, 24.085370412116973, 23.45592275861497, 22.904101224999025, 22.30158521091721, 21.712202322033026, 21.135311666848228, 20.62777415355114, 20.072763450605006, 19.5285672995678, 18.9946884567923, 18.470658878839046, 17.956037498957496, 17.450408208762344, 16.953378022856484, 16.464575406912335, 15.983648752098574, 15.510264980790351, 15.044108270275135, 14.584878882706715, 14.132292090898732, 13.686077190717167, 13.207360954537839, 12.774302709993915, 12.346871072859974, 11.924843304253901, 11.474000210994694, 11.063294881836589, 10.657375968608946, 10.256057973993752, 9.829659035882594, 9.438133947518327, 9.023392211312922, 8.640983141919081, 8.262345283743135, 7.863314796619679, 7.492882463804221, 7.1039388727608035, 6.741159848852739, 6.38147592380187, 6.006119226946526, 5.653340817337632, 5.2867798335338465, 4.940450294452878, 4.582230923413218, 4.241925663064629, 3.891625199582703, 3.5456546757514364, 3.2141729831259407, 2.8755375449281417, 2.549137026123621, 2.2174808492661753, 1.8958278843482197, 1.5708178765574001, 1.2495245068202343, 0.9349236673320225, 0.6198132708419206, 0.3092114990807553, 0.0, -0.3058562582567181], \"type\": \"scatter\", \"uid\": \"fca9f4d6-a4b1-4257-98fc-bc5cd5396af3\"}, {\"mode\": \"lines\", \"name\": \"4%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [68.80734240457924, 65.3113825671162, 62.50433930113967, 59.96209522783091, 57.6356760199047, 55.54545721313085, 53.568463438071745, 51.79154082214734, 50.001534650751374, 48.451818516293706, 46.95888658081926, 45.50205261908727, 44.18693955995401, 42.873247515177304, 41.66664581475376, 40.442132688809664, 39.30286808418829, 38.23801576463697, 37.23855354393894, 36.296895987075786, 35.31074126400947, 34.375071394056015, 33.48492969125701, 32.63600755038398, 31.824537562898183, 31.047207675842234, 30.21693440128853, 29.501270684351972, 28.731078943425068, 27.9883489163783, 27.348905901358542, 26.65395963410993, 25.981181438477474, 25.329117445665126, 24.696442037849515, 24.081943299865618, 23.484510467879957, 22.90312305520152, 22.336841393574463, 21.719617090733525, 21.182327221847576, 20.657716684312152, 20.14509648803302, 19.583682053752906, 19.094430862019703, 18.615363104818417, 18.089450197778913, 17.630457680787913, 17.126007117298837, 16.685223180057474, 16.200455900737094, 15.776233899088501, 15.309574894119859, 14.900455037720228, 14.450503308539204, 14.055185482573748, 13.620689323318402, 13.238010644565447, 12.81784715161732, 12.40499960557809, 12.039921273819846, 11.639923926700018, 11.285056449653831, 10.897039629382654, 10.515241197233697, 10.174746296175352, 9.803768013404342, 9.438464122689057, 9.078668768209408, 8.755247470125823, 8.40495173163109, 8.059709302074186, 7.747232956150443, 7.410641253364003, 7.078701896960582, 6.75129153350955, 6.451955463975322, 6.132214592093866, 5.816661491615625, 5.50519072355026, 5.2172042883076335, 4.912564572535423, 4.611714396972843, 4.314562929329915, 4.021022562343659, 3.745347154257801, 3.457750140424567, 3.1735199089099138, 2.892580327406304, 2.614857815672119, 2.3494815850600745, 2.0769577304215123, 1.8074449532635881, 1.540878812822584, 1.27719691417291, 1.0163388225335126, 0.7613076104960629, 0.5049022749481284, 0.25115086032060635, 0.0, -0.24860207952863497], \"type\": \"scatter\", \"uid\": \"d5de436b-815b-4ddf-b09a-c8adef398ffa\"}, {\"mode\": \"lines\", \"name\": \"6%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [63.89492690548186, 58.262821568515854, 54.04052614728848, 50.66148389678545, 47.87616106009669, 45.48602631486428, 43.31702557882478, 41.47983394780704, 39.68729633524192, 38.200818922547555, 36.77689820570718, 35.39272399711049, 34.21937382624153, 33.04934230251838, 31.96436315836662, 30.95314035530399, 30.006440675818638, 29.116621163165156, 28.192574250584958, 27.39978039756943, 26.64742532389232, 25.850787358323487, 25.16936157404263, 24.439650086183097, 23.81704552093011, 23.14360432113746, 22.49556920529727, 21.944965018381808, 21.34136927673747, 20.758192002608368, 20.26460869159577, 19.717363694312002, 19.186886136940952, 18.672174728434477, 18.172315272050337, 17.751662992190948, 17.27805765221269, 16.816992243369945, 16.367815192745198, 15.929924424952382, 15.562701966645243, 15.144749116440055, 14.736526816896058, 14.33758757349461, 13.947514065107075, 13.565916490830006, 13.192430202176665, 12.879463016236254, 12.520195959769621, 12.168076467259146, 11.822821370084267, 11.484163996956987, 11.151852916784472, 10.825650799042663, 10.505333378721245, 10.190688514532688, 9.881515330479285, 9.620244686094383, 9.320453007097782, 9.02558977190849, 8.735491964213288, 8.450004520343102, 8.168979820247486, 7.892277218555112, 7.619762611990646, 7.351308039817273, 7.086791314324664, 6.8260956786912965, 6.569109489823159, 6.315725924012179, 6.065842703472204, 5.819361842000211, 5.576189408179895, 5.362725351581645, 5.124894598243581, 4.890111854174274, 4.658297341588672, 4.429374370935565, 4.203269183524225, 3.979910804049558, 3.759230902277915, 3.5411636632191046, 3.325645665167323, 3.1126157650456334, 2.902014990535223, 2.6937864385133543, 2.4878751793623706, 2.2842281667471056, 2.08279415248997, 1.8835236062019165, 1.686368639353946, 1.4912829334979896, 1.2982216723679685, 1.1071414776120152, 0.9180003479253105, 0.7307576013698799, 0.5453738206831218, 0.3618108013912196, 0.18003150255651396, 0.0, -0.17934875101169703], \"type\": \"scatter\", \"uid\": \"ceb14cc7-2d89-4ba4-b988-ea7dafa87da7\"}, {\"mode\": \"lines\", \"name\": \"10%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [48.213326892977946, 41.54708702650688, 37.384540204657036, 34.45502073114762, 32.19994696887898, 30.27921480655762, 28.744475716069022, 27.334739357485123, 26.09022843591807, 24.976048062634092, 23.967309130271467, 23.045634439269303, 22.281381076245346, 21.494179132705984, 20.760636229421067, 20.07381971887694, 19.428059140716297, 18.818657274580307, 18.241679420269314, 17.693796790987737, 17.172168155603433, 16.674349039938182, 16.198221128139526, 15.741936700361316, 15.303874420278124, 14.882603799147548, 14.476856370065438, 14.085502107095794, 13.707529984199494, 13.342031831336943, 12.988188838666739, 12.645260204111777, 12.312573528352281, 11.989516644094389, 11.675530630040532, 11.370103809228771, 11.07276656984954, 10.78308687688381, 10.500666366856192, 10.225136937092502, 9.956157756193777, 9.693412634805536, 9.436607705799512, 9.185469371175959, 8.939742479712935, 8.699188704925135, 8.4635850974784, 8.232722790017364, 8.006405835545928, 7.784450163168301, 7.566682637243332, 7.352940207901207, 7.143069142478692, 6.9369243287960565, 6.734368642364779, 6.535272370613287, 6.339512688074467, 6.146973177216292, 5.957543390233305, 5.771118447667772, 5.5875986702073615, 5.406889240422064, 5.2288998915657725, 5.053544620884814, 4.880741425153389, 4.710412056399571, 4.542481795999937, 4.376879245509785, 4.213536132762932, 4.052387131922613, 3.8933696962960718, 3.7364239028415898, 3.58149230740022, 3.4285198097766183, 3.277453527875704, 3.1282426801753536, 2.9808384758813036, 2.8351940121694144, 2.691264177973556, 2.549005563825042, 2.408376377292536, 2.2693363636100776, 2.131846731115874, 1.995870081156179, 1.8613703421371077, 1.7283127074333795, 1.5966635768863426, 1.466390501645204, 1.3374621321247522, 1.2098481688706444, 1.0835193161394827, 0.958447238015625, 0.8346045169002088, 0.7119646142201054, 0.5905018332158858, 0.470191283678169, 0.3510088485111538, 0.2329311520109538, 0.11593552975422591, 0.0, -0.11489676348564296], \"type\": \"scatter\", \"uid\": \"5bde3db9-95a6-4481-b6fb-1f68f223ad40\"}, {\"mode\": \"lines\", \"name\": \"15%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [33.971534429582654, 29.002428626084477, 26.09168189311725, 24.02366257308688, 22.417404871468612, 21.103216444720164, 19.9905782124617, 19.025458335996188, 18.173005158753412, 17.409422202836538, 16.717736398695028, 16.085415449961367, 15.502942183787297, 14.962918743044728, 14.45948058445849, 13.987899987209929, 13.544309974585644, 13.125507267448212, 12.728808584559907, 12.351943845139626, 11.992975455204682, 11.650236387699888, 11.322282038003188, 11.007852333390701, 10.705841582482257, 10.41527424162917, 10.135285257295136, 9.86510398516157, 9.604040932354595, 9.351476748168524, 9.10685302064941, 8.869664534840673, 8.639452722680588, 8.41580009099904, 8.198325457417667, 7.986679857537022, 7.780543013009392, 7.579620270714943, 7.383639939591069, 7.192350964687397, 7.005520888467882, 6.822934057815034, 6.644390042036893, 6.469702232763203, 6.298696601198682, 6.131210591976693, 5.967092135982399, 5.806198767113463, 5.648396830116711, 5.493560768458373, 5.341572482716679, 5.1923207512787055, 5.045700706219324, 4.901613358172354, 4.759965164799066, 4.620667638139942, 4.483636986719644, 4.348793788778118, 4.216062693434828, 4.085372146968845, 3.956654141723543, 3.829843985428255, 3.70488008897657, 3.5817037709170587, 3.4602590771015507, 3.3404926141022933, 3.2223533951555234, 3.1057926975178067, 2.9907639302354103, 2.8772225114275742, 2.7651257542739236, 2.6544327609755025, 2.54510432402946, 2.437102834220305, 2.330392194786726, 2.2249377412731417, 2.1207061666201033, 2.0176654510878738, 1.9157847966437842, 1.8150345654763915, 1.7153862223288716, 1.6168122803704066, 1.5192862503482603, 1.4227825927847797, 1.327276673003091, 1.2327447187829552, 1.1391637804643624, 1.0465116933309655, 0.9547670421188154, 0.8639091275078714, 0.773917934464841, 0.6847741023159508, 0.5964588964373961, 0.5089541814596833, 0.42224239588972473, 0.3363065280616087, 0.25113009333341896, 0.1666971124534318, 0.0829920910244417, 0.0, -0.08229374284904645], \"type\": \"scatter\", \"uid\": \"037373a7-481b-4a17-ac36-e13b4531cbab\"}], {\"margin\": {\"t\": 200}, \"title\": {\"text\": \"The time it takes to grow the fund provided 73 years till death<br>as a function of savings rate\", \"xref\": \"paper\"}, \"xaxis\": {\"range\": [0, 100], \"title\": {\"text\": \"Savings rate (%)\"}}, \"yaxis\": {\"range\": [0, 83], \"title\": {\"text\": \"Working years\"}}}, {\"showLink\": false, \"linkText\": \"Export to plot.ly\", \"plotlyServerURL\": \"https://plot.ly\"}); \n",
"}\n",
"});</script><script type=\"text/javascript\">window.addEventListener(\"resize\", function(){if (document.getElementById(\"01fd5811-e23f-4168-a7e3-a8f73299d8d5\")) {window._Plotly.Plots.resize(document.getElementById(\"01fd5811-e23f-4168-a7e3-a8f73299d8d5\"));};})</script>"
],
"text/vnd.plotly.v1+html": [
"<div id=\"01fd5811-e23f-4168-a7e3-a8f73299d8d5\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";\n",
"if (document.getElementById(\"01fd5811-e23f-4168-a7e3-a8f73299d8d5\")) {\n",
" Plotly.newPlot(\"01fd5811-e23f-4168-a7e3-a8f73299d8d5\", [{\"mode\": \"lines\", \"name\": \"1%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [74.03628014438084, 71.10749092512864, 69.77789758406395, 68.85349029821927, 67.11629818449954, 66.59959179791927, 65.38600777740695, 64.34697503038505, 63.42446954474894, 62.09689960838536, 61.36034893442765, 60.25617061863648, 59.61604182717965, 58.6484462410057, 57.741930708123526, 56.584901901393444, 55.7872315972475, 55.02117964647519, 54.031523417243314, 53.090951965834826, 52.19245519231321, 51.330242319117275, 50.499486918192595, 49.696133369037796, 48.916748138272006, 47.981110473677305, 47.24893226447508, 46.36984051261285, 45.51796956714048, 44.84076327275086, 44.02961521599931, 43.23866457865849, 42.46598882771082, 41.58097565240338, 40.844575103163244, 40.12162540882542, 39.29524009367555, 38.59973931172771, 37.806373520681596, 37.02945036817052, 36.368484693761424, 35.61747943103315, 34.8796229229752, 34.15395699103427, 33.439602000159844, 32.7357488107022, 31.95922752211925, 31.276897364212367, 30.60291090043818, 29.862045353791466, 29.205488093741874, 28.485718955113917, 27.844281952388034, 27.1431859598083, 26.514868961788682, 25.83033112881019, 25.154381171876125, 24.48653345451104, 23.826331978708673, 23.17334808397782, 22.527178356786248, 21.887442728219167, 21.253782740307628, 20.625859963771678, 20.003354551915123, 19.343265112285994, 18.732327851381534, 18.125914634153222, 17.48583493123516, 16.889245943288717, 16.261510416994007, 15.673706806569356, 15.057218834025191, 14.47726160642539, 13.871025992410104, 13.27025663981999, 12.701174509734345, 12.109307382027573, 11.522244457740735, 10.939777432367876, 10.382969170431698, 9.8078537340011, 9.236778548196567, 8.669567685376691, 8.106052372296125, 7.5460706031620886, 6.989466777194314, 6.436091358883347, 5.874085196938853, 5.327866587344482, 4.784447685208425, 4.243700650829498, 3.7055022837527964, 3.163517922670556, 2.631127945272256, 2.100931214085251, 1.569761249001368, 1.04466539654048, 0.5214436095802695, 0.0, -0.518758039058313], \"type\": \"scatter\", \"uid\": \"ca8bd11d-1b63-4035-8232-0f62c5329165\"}, {\"mode\": \"lines\", \"name\": \"2%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [72.0831778077469, 69.24236379353395, 68.01422213982265, 66.55760877855154, 64.9927072913962, 63.807775445097455, 62.456333411245204, 60.99016986486592, 59.75094685589582, 58.38882138319017, 57.19314046709436, 56.12481647471798, 54.92871183564387, 53.840708237266476, 52.84060887986467, 51.72282738345748, 50.685098187472924, 49.71508068695201, 48.63871360942185, 47.62637662779526, 46.669732205433256, 45.761789627533744, 44.75746989798108, 43.93545029878629, 43.01746727713775, 42.13816630356769, 41.29360730327579, 40.36370348405922, 39.58255376490556, 38.71745764845481, 37.882225465667695, 37.07433079975709, 36.29150971072315, 35.53172685746494, 34.79314677309576, 33.98258540028416, 33.28422714878277, 32.51597073147475, 31.852004130880918, 31.120422911907045, 30.406459363548077, 29.708968244854294, 29.026893732309762, 28.35926060118495, 27.705166438565385, 26.994354129861513, 26.36678829024224, 25.750382052648142, 25.080533828906027, 24.48625803471191, 23.84073824837948, 23.207259857209166, 22.642450348242647, 22.02969024693075, 21.427288084980145, 20.834739234658155, 20.251568023032974, 19.726834940448473, 19.159635315593526, 18.60056092356465, 18.004044955118893, 17.461500670851137, 16.925980506561746, 16.39716093562457, 15.874734618463926, 15.320010125570253, 14.810820910975362, 14.307173760632072, 13.808816801626369, 13.282247043452605, 12.795014422377252, 12.281581565536532, 11.804542686806125, 11.303308425263216, 10.835612740766859, 10.34571722487423, 9.886585249187215, 9.407238548752945, 8.933464887392196, 8.48642871891399, 8.022125139608374, 7.562873698868914, 7.108511260097256, 6.675738912527485, 6.229588248645151, 5.7878801156443185, 5.350474040896937, 4.917234595631739, 4.499451071418991, 4.073091000052041, 3.650525408611743, 3.231636599614566, 2.8163108522094134, 2.404438242141934, 1.9959124714313392, 1.5906307071409487, 1.1884934286686686, 0.7894042830253138, 0.3932699476066342, 0.0, -0.39049320560132933], \"type\": \"scatter\", \"uid\": \"da44f250-98d0-4154-a0d9-eb6b8dde9506\"}, {\"mode\": \"lines\", \"name\": \"3%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [70.886325965238, 68.02126856322926, 65.4282989484691, 63.55293370650099, 61.65507998789702, 59.979303861465986, 58.42393510635004, 56.718660054846545, 55.28625788710042, 53.6822571125394, 52.279394187152654, 51.034273361860045, 49.75945599448642, 48.454514218412264, 47.261285462209656, 46.162086762118555, 45.01203347883144, 43.9404927413849, 42.815261681341056, 41.75771379488471, 40.75995017047164, 39.81525348675081, 38.91786997147548, 37.95834595360321, 37.14444823265745, 36.2659718841263, 35.42379830658801, 34.520793686752256, 33.744424080282755, 32.995723722283564, 32.18529989222491, 31.402466688411046, 30.728417510772623, 29.993061500105227, 29.27989157614338, 28.587407668418447, 27.914238905713308, 27.259129460791286, 26.54857848842594, 25.92789910892865, 25.322053890730455, 24.662597201893696, 24.085370412116973, 23.45592275861497, 22.904101224999025, 22.30158521091721, 21.712202322033026, 21.135311666848228, 20.62777415355114, 20.072763450605006, 19.5285672995678, 18.9946884567923, 18.470658878839046, 17.956037498957496, 17.450408208762344, 16.953378022856484, 16.464575406912335, 15.983648752098574, 15.510264980790351, 15.044108270275135, 14.584878882706715, 14.132292090898732, 13.686077190717167, 13.207360954537839, 12.774302709993915, 12.346871072859974, 11.924843304253901, 11.474000210994694, 11.063294881836589, 10.657375968608946, 10.256057973993752, 9.829659035882594, 9.438133947518327, 9.023392211312922, 8.640983141919081, 8.262345283743135, 7.863314796619679, 7.492882463804221, 7.1039388727608035, 6.741159848852739, 6.38147592380187, 6.006119226946526, 5.653340817337632, 5.2867798335338465, 4.940450294452878, 4.582230923413218, 4.241925663064629, 3.891625199582703, 3.5456546757514364, 3.2141729831259407, 2.8755375449281417, 2.549137026123621, 2.2174808492661753, 1.8958278843482197, 1.5708178765574001, 1.2495245068202343, 0.9349236673320225, 0.6198132708419206, 0.3092114990807553, 0.0, -0.3058562582567181], \"type\": \"scatter\", \"uid\": \"fca9f4d6-a4b1-4257-98fc-bc5cd5396af3\"}, {\"mode\": \"lines\", \"name\": \"4%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [68.80734240457924, 65.3113825671162, 62.50433930113967, 59.96209522783091, 57.6356760199047, 55.54545721313085, 53.568463438071745, 51.79154082214734, 50.001534650751374, 48.451818516293706, 46.95888658081926, 45.50205261908727, 44.18693955995401, 42.873247515177304, 41.66664581475376, 40.442132688809664, 39.30286808418829, 38.23801576463697, 37.23855354393894, 36.296895987075786, 35.31074126400947, 34.375071394056015, 33.48492969125701, 32.63600755038398, 31.824537562898183, 31.047207675842234, 30.21693440128853, 29.501270684351972, 28.731078943425068, 27.9883489163783, 27.348905901358542, 26.65395963410993, 25.981181438477474, 25.329117445665126, 24.696442037849515, 24.081943299865618, 23.484510467879957, 22.90312305520152, 22.336841393574463, 21.719617090733525, 21.182327221847576, 20.657716684312152, 20.14509648803302, 19.583682053752906, 19.094430862019703, 18.615363104818417, 18.089450197778913, 17.630457680787913, 17.126007117298837, 16.685223180057474, 16.200455900737094, 15.776233899088501, 15.309574894119859, 14.900455037720228, 14.450503308539204, 14.055185482573748, 13.620689323318402, 13.238010644565447, 12.81784715161732, 12.40499960557809, 12.039921273819846, 11.639923926700018, 11.285056449653831, 10.897039629382654, 10.515241197233697, 10.174746296175352, 9.803768013404342, 9.438464122689057, 9.078668768209408, 8.755247470125823, 8.40495173163109, 8.059709302074186, 7.747232956150443, 7.410641253364003, 7.078701896960582, 6.75129153350955, 6.451955463975322, 6.132214592093866, 5.816661491615625, 5.50519072355026, 5.2172042883076335, 4.912564572535423, 4.611714396972843, 4.314562929329915, 4.021022562343659, 3.745347154257801, 3.457750140424567, 3.1735199089099138, 2.892580327406304, 2.614857815672119, 2.3494815850600745, 2.0769577304215123, 1.8074449532635881, 1.540878812822584, 1.27719691417291, 1.0163388225335126, 0.7613076104960629, 0.5049022749481284, 0.25115086032060635, 0.0, -0.24860207952863497], \"type\": \"scatter\", \"uid\": \"d5de436b-815b-4ddf-b09a-c8adef398ffa\"}, {\"mode\": \"lines\", \"name\": \"6%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [63.89492690548186, 58.262821568515854, 54.04052614728848, 50.66148389678545, 47.87616106009669, 45.48602631486428, 43.31702557882478, 41.47983394780704, 39.68729633524192, 38.200818922547555, 36.77689820570718, 35.39272399711049, 34.21937382624153, 33.04934230251838, 31.96436315836662, 30.95314035530399, 30.006440675818638, 29.116621163165156, 28.192574250584958, 27.39978039756943, 26.64742532389232, 25.850787358323487, 25.16936157404263, 24.439650086183097, 23.81704552093011, 23.14360432113746, 22.49556920529727, 21.944965018381808, 21.34136927673747, 20.758192002608368, 20.26460869159577, 19.717363694312002, 19.186886136940952, 18.672174728434477, 18.172315272050337, 17.751662992190948, 17.27805765221269, 16.816992243369945, 16.367815192745198, 15.929924424952382, 15.562701966645243, 15.144749116440055, 14.736526816896058, 14.33758757349461, 13.947514065107075, 13.565916490830006, 13.192430202176665, 12.879463016236254, 12.520195959769621, 12.168076467259146, 11.822821370084267, 11.484163996956987, 11.151852916784472, 10.825650799042663, 10.505333378721245, 10.190688514532688, 9.881515330479285, 9.620244686094383, 9.320453007097782, 9.02558977190849, 8.735491964213288, 8.450004520343102, 8.168979820247486, 7.892277218555112, 7.619762611990646, 7.351308039817273, 7.086791314324664, 6.8260956786912965, 6.569109489823159, 6.315725924012179, 6.065842703472204, 5.819361842000211, 5.576189408179895, 5.362725351581645, 5.124894598243581, 4.890111854174274, 4.658297341588672, 4.429374370935565, 4.203269183524225, 3.979910804049558, 3.759230902277915, 3.5411636632191046, 3.325645665167323, 3.1126157650456334, 2.902014990535223, 2.6937864385133543, 2.4878751793623706, 2.2842281667471056, 2.08279415248997, 1.8835236062019165, 1.686368639353946, 1.4912829334979896, 1.2982216723679685, 1.1071414776120152, 0.9180003479253105, 0.7307576013698799, 0.5453738206831218, 0.3618108013912196, 0.18003150255651396, 0.0, -0.17934875101169703], \"type\": \"scatter\", \"uid\": \"ceb14cc7-2d89-4ba4-b988-ea7dafa87da7\"}, {\"mode\": \"lines\", \"name\": \"10%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [48.213326892977946, 41.54708702650688, 37.384540204657036, 34.45502073114762, 32.19994696887898, 30.27921480655762, 28.744475716069022, 27.334739357485123, 26.09022843591807, 24.976048062634092, 23.967309130271467, 23.045634439269303, 22.281381076245346, 21.494179132705984, 20.760636229421067, 20.07381971887694, 19.428059140716297, 18.818657274580307, 18.241679420269314, 17.693796790987737, 17.172168155603433, 16.674349039938182, 16.198221128139526, 15.741936700361316, 15.303874420278124, 14.882603799147548, 14.476856370065438, 14.085502107095794, 13.707529984199494, 13.342031831336943, 12.988188838666739, 12.645260204111777, 12.312573528352281, 11.989516644094389, 11.675530630040532, 11.370103809228771, 11.07276656984954, 10.78308687688381, 10.500666366856192, 10.225136937092502, 9.956157756193777, 9.693412634805536, 9.436607705799512, 9.185469371175959, 8.939742479712935, 8.699188704925135, 8.4635850974784, 8.232722790017364, 8.006405835545928, 7.784450163168301, 7.566682637243332, 7.352940207901207, 7.143069142478692, 6.9369243287960565, 6.734368642364779, 6.535272370613287, 6.339512688074467, 6.146973177216292, 5.957543390233305, 5.771118447667772, 5.5875986702073615, 5.406889240422064, 5.2288998915657725, 5.053544620884814, 4.880741425153389, 4.710412056399571, 4.542481795999937, 4.376879245509785, 4.213536132762932, 4.052387131922613, 3.8933696962960718, 3.7364239028415898, 3.58149230740022, 3.4285198097766183, 3.277453527875704, 3.1282426801753536, 2.9808384758813036, 2.8351940121694144, 2.691264177973556, 2.549005563825042, 2.408376377292536, 2.2693363636100776, 2.131846731115874, 1.995870081156179, 1.8613703421371077, 1.7283127074333795, 1.5966635768863426, 1.466390501645204, 1.3374621321247522, 1.2098481688706444, 1.0835193161394827, 0.958447238015625, 0.8346045169002088, 0.7119646142201054, 0.5905018332158858, 0.470191283678169, 0.3510088485111538, 0.2329311520109538, 0.11593552975422591, 0.0, -0.11489676348564296], \"type\": \"scatter\", \"uid\": \"5bde3db9-95a6-4481-b6fb-1f68f223ad40\"}, {\"mode\": \"lines\", \"name\": \"15%\", \"x\": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 26.0, 27.0, 28.0, 29.0, 30.0, 31.0, 32.0, 33.0, 34.0, 35.0, 36.0, 37.0, 38.0, 39.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0, 46.0, 47.0, 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0, 59.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0, 66.0, 67.0, 68.0, 69.0, 70.0, 71.0, 72.0, 73.0, 74.0, 75.0, 76.0, 77.0, 78.0, 79.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0, 86.0, 87.0, 88.0, 89.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0, 96.0, 97.0, 98.0, 99.0, 100.0, 101.0], \"y\": [33.971534429582654, 29.002428626084477, 26.09168189311725, 24.02366257308688, 22.417404871468612, 21.103216444720164, 19.9905782124617, 19.025458335996188, 18.173005158753412, 17.409422202836538, 16.717736398695028, 16.085415449961367, 15.502942183787297, 14.962918743044728, 14.45948058445849, 13.987899987209929, 13.544309974585644, 13.125507267448212, 12.728808584559907, 12.351943845139626, 11.992975455204682, 11.650236387699888, 11.322282038003188, 11.007852333390701, 10.705841582482257, 10.41527424162917, 10.135285257295136, 9.86510398516157, 9.604040932354595, 9.351476748168524, 9.10685302064941, 8.869664534840673, 8.639452722680588, 8.41580009099904, 8.198325457417667, 7.986679857537022, 7.780543013009392, 7.579620270714943, 7.383639939591069, 7.192350964687397, 7.005520888467882, 6.822934057815034, 6.644390042036893, 6.469702232763203, 6.298696601198682, 6.131210591976693, 5.967092135982399, 5.806198767113463, 5.648396830116711, 5.493560768458373, 5.341572482716679, 5.1923207512787055, 5.045700706219324, 4.901613358172354, 4.759965164799066, 4.620667638139942, 4.483636986719644, 4.348793788778118, 4.216062693434828, 4.085372146968845, 3.956654141723543, 3.829843985428255, 3.70488008897657, 3.5817037709170587, 3.4602590771015507, 3.3404926141022933, 3.2223533951555234, 3.1057926975178067, 2.9907639302354103, 2.8772225114275742, 2.7651257542739236, 2.6544327609755025, 2.54510432402946, 2.437102834220305, 2.330392194786726, 2.2249377412731417, 2.1207061666201033, 2.0176654510878738, 1.9157847966437842, 1.8150345654763915, 1.7153862223288716, 1.6168122803704066, 1.5192862503482603, 1.4227825927847797, 1.327276673003091, 1.2327447187829552, 1.1391637804643624, 1.0465116933309655, 0.9547670421188154, 0.8639091275078714, 0.773917934464841, 0.6847741023159508, 0.5964588964373961, 0.5089541814596833, 0.42224239588972473, 0.3363065280616087, 0.25113009333341896, 0.1666971124534318, 0.0829920910244417, 0.0, -0.08229374284904645], \"type\": \"scatter\", \"uid\": \"037373a7-481b-4a17-ac36-e13b4531cbab\"}], {\"margin\": {\"t\": 200}, \"title\": {\"text\": \"The time it takes to grow the fund provided 73 years till death<br>as a function of savings rate\", \"xref\": \"paper\"}, \"xaxis\": {\"range\": [0, 100], \"title\": {\"text\": \"Savings rate (%)\"}}, \"yaxis\": {\"range\": [0, 83], \"title\": {\"text\": \"Working years\"}}}, {\"showLink\": false, \"linkText\": \"Export to plot.ly\", \"plotlyServerURL\": \"https://plot.ly\"}); \n",
"}\n",
"});</script><script type=\"text/javascript\">window.addEventListener(\"resize\", function(){if (document.getElementById(\"01fd5811-e23f-4168-a7e3-a8f73299d8d5\")) {window._Plotly.Plots.resize(document.getElementById(\"01fd5811-e23f-4168-a7e3-a8f73299d8d5\"));};})</script>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"years_till_death = 73 # number of years to live or N + M\n",
"\n",
"def working_years_dist_per_i(i, years):\n",
" data = []\n",
" for r in frange(1, 101):\n",
" p0 = find_p0(years, i, r/100.)\n",
" working_years = time_to_accumulate_fund(p0, r/100., i)\n",
" data.append((r, working_years))\n",
" return list(zip(*data))\n",
"\n",
"data = prepare_data_for_multiple_i(partial(working_years_dist_per_i, years=years_till_death))\n",
"title = (\n",
" f'The time it takes to grow the fund provided {years_till_death} years till death<br>'\n",
" 'as a function of savings rate'\n",
" )\n",
"layout = dict(title = dict(text=title, xref='paper'),\n",
" xaxis = dict(title = 'Savings rate (%)', range=[0, 100]),\n",
" yaxis = dict(title = 'Working years', range=[0,years_till_death + 10]),\n",
" margin = {'t': 200}\n",
" )\n",
"\n",
"fig = dict(data=data, layout=layout)\n",
"iplot(fig, filename='line-mode')"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment