{"id":1218,"date":"2010-07-21T16:00:12","date_gmt":"2010-07-21T23:00:12","guid":{"rendered":"https:\/\/www.reenigne.org\/blog\/?p=1218"},"modified":"2011-08-08T11:40:51","modified_gmt":"2011-08-08T18:40:51","slug":"time-derivative-accounting","status":"publish","type":"post","link":"https:\/\/www.reenigne.org\/blog\/time-derivative-accounting\/","title":{"rendered":"Time derivative accounting"},"content":{"rendered":"<p>Sometimes I think it would make things simpler if, when I logged onto my bank's website, there were two sorts of transactions listed. One would the normal sort: \"x dollars paid to y on date z\". The other sort would be \"x dollars per month paid to y since date z\". For example, my monthly mortgage payment would be listed as a single transaction, not a separate one each month.<\/p>\n<p>Certain calculations are much easier when done with time derivative values. For example, interest on my mortgage accumulates daily but the payments are monthly, so to figure out what is actually owed at any time requires a lengthy spreadsheet or complicated program. If the interest accumulated continuously, and the payment also happened continuously, the calculations would be much simpler.<\/p>\n<p>Normally, interest is specified as a percentage by which a debt grows. But to know what that really means, you have to specify how long it takes to grow by that much - this can lead to confusion (deliberate or accidental). It would be much better if interest was specified as a growth constant <img src='https:\/\/s0.wp.com\/latex.php?latex=f&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f' title='f' class='latex' \/> (with standard units of Hz, bizarrely enough), such that if you have a debt <img src='https:\/\/s0.wp.com\/latex.php?latex=x_0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x_0' title='x_0' class='latex' \/> at time 0 and changes only because of interest (no payments or fees) then after time <img src='https:\/\/s0.wp.com\/latex.php?latex=t&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='t' title='t' class='latex' \/> the debt will have grown to <img src='https:\/\/s0.wp.com\/latex.php?latex=xe%5E%7Btf%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='xe^{tf}' title='xe^{tf}' class='latex' \/>. If you are also making payments at the rate of <img src='https:\/\/s0.wp.com\/latex.php?latex=r&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r' title='r' class='latex' \/> per unit time, then the debt <img src='https:\/\/s0.wp.com\/latex.php?latex=x&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x' title='x' class='latex' \/> is given by the differential equation <img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%5Cfrac%7Bdx%7D%7Bdt%7D+%3D+xf+-+r&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle \\frac{dx}{dt} = xf - r' title='\\displaystyle \\frac{dx}{dt} = xf - r' class='latex' \/> which has the solution<\/p>\n<img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+x+%3D+%5Cfrac%7Br%7D%7Bf%7D+%2B+%28x_0+-+%5Cfrac%7Br%7D%7Bf%7D%29e%5E%7Bft%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle x = \\frac{r}{f} + (x_0 - \\frac{r}{f})e^{ft}' title='\\displaystyle x = \\frac{r}{f} + (x_0 - \\frac{r}{f})e^{ft}' class='latex' \/>\n<p>Hence one can easily solve for the time it takes to repay the loan:<\/p>\n<img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+t+%3D+%5Cfrac%7Blog%28-%5Cfrac%7Br%7D%7Bx_0f+-+r%7D%29%7D%7Bf%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle t = \\frac{log(-\\frac{r}{x_0f - r})}{f}' title='\\displaystyle t = \\frac{log(-\\frac{r}{x_0f - r})}{f}' class='latex' \/>\n<p>Or you can solve for the repayment rate if you want to repay the loan in a specific amount of time:<\/p>\n<img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+r+%3D+%5Cfrac%7Bx_0fe%5E%7Bft%7D%7D%7Be%5E%7Bft%7D+-+1%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle r = \\frac{x_0fe^{ft}}{e^{ft} - 1}' title='\\displaystyle r = \\frac{x_0fe^{ft}}{e^{ft} - 1}' class='latex' \/>\n<p>Similarly, one can do calculations around retirement savings. Suppose you have <img src='https:\/\/s0.wp.com\/latex.php?latex=x_0&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x_0' title='x_0' class='latex' \/> in retirement savings today and the inflation growth constant is <img src='https:\/\/s0.wp.com\/latex.php?latex=i&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='i' title='i' class='latex' \/>. If you are saving at a rate of <img src='https:\/\/s0.wp.com\/latex.php?latex=r+e%5E%7Bit%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='r e^{it}' title='r e^{it}' class='latex' \/> and investing in something with a growth rate of <img src='https:\/\/s0.wp.com\/latex.php?latex=f&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='f' title='f' class='latex' \/>, and you want to retire when you can maintain an income of <img src='https:\/\/s0.wp.com\/latex.php?latex=y+e%5E%7Bit%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='y e^{it}' title='y e^{it}' class='latex' \/>.<\/p>\n<p>The amount you need in savings at retirement is <img src='https:\/\/s0.wp.com\/latex.php?latex=x&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='x' title='x' class='latex' \/> in:<\/p>\n<img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%5Cfrac%7Bdx%7D%7Bdt%7D+%3D+xf+-+ye%5E%7Bit%7D+%3D+xi&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle \\frac{dx}{dt} = xf - ye^{it} = xi' title='\\displaystyle \\frac{dx}{dt} = xf - ye^{it} = xi' class='latex' \/>\n<p>Plugging this into the equation for the savings rate while working:<\/p>\n<img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%5Cfrac%7Bdx%7D%7Bdt%7D+%3D+xf+%2B+re%5E%7Bit%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle \\frac{dx}{dt} = xf + re^{it}' title='\\displaystyle \\frac{dx}{dt} = xf + re^{it}' class='latex' \/>\n<p>Gives:<\/p>\n<img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+y+%3D+r%2B%28x_0%28f-i%29-r%29e%5E%7B%28f-i%29t%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle y = r+(x_0(f-i)-r)e^{(f-i)t}' title='\\displaystyle y = r+(x_0(f-i)-r)e^{(f-i)t}' class='latex' \/>\n<p>Solving for retirement time:<\/p>\n<img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+t+%3D+%5Cfrac%7B%5Clog%28%5Cfrac%7B-r%7D%7Bx_0%28f-i%29-r%7D%29%7D%7Bf-i%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle t = \\frac{\\log(\\frac{-r}{x_0(f-i)-r})}{f-i}' title='\\displaystyle t = \\frac{\\log(\\frac{-r}{x_0(f-i)-r})}{f-i}' class='latex' \/>\n<p>Or savings rate:<\/p>\n<img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+r+%3D+%5Cfrac%7Be%5E%7Bft%7Dx_0%28f-i%29%7D%7B-e%5E%7Bit%7D%2Be%5E%7Bft%7D%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\\displaystyle r = \\frac{e^{ft}x_0(f-i)}{-e^{it}+e^{ft}}' title='\\displaystyle r = \\frac{e^{ft}x_0(f-i)}{-e^{it}+e^{ft}}' class='latex' \/>\n<p>Of course, all that assumes you can get a fixed rate of return and that inflation stays constant. In reality, these variables are constantly changing. There's also the matter of risk to consider - trading off means for variances, but you get the idea.<\/p>\n<p>The current inflation rate is about 300 picoHertz. The highest recorded hyperinflation is about 6000000 picoHertz (6 microHertz).<\/p>\n<p>How should payment rates be specified in user interfaces? \"Dollars per month\" is probably the most meaningful multiplier - to make it consistent we should use a standard average month length of 2629746 seconds. Current balance would be updated continuously supposing that the paying of salary and recurring bills could also be paid continuously. One would want to take care to set limits on the payment rate for bills (just as one does with direct debits) so that a mistake at the gas company doesn't instantly wipe out your savings.<\/p>\n<p>Further derivatives could be taken into account so that one could pay exponentially increasing bills like the retirement savings above without making any adjustments. The ultimate outcome of this would be to link everything to inflation and display\/specify amounts in \"year 2000 dollars\" (for example) - in other words, the <a href=\"https:\/\/www.reenigne.org\/blog\/magic-inflation-linked-currency\">Inflation-linked currency I've written about before<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes I think it would make things simpler if, when I logged onto my bank's website, there were two sorts of transactions listed. One would the normal sort: \"x dollars paid to y on date z\". The other sort would be \"x dollars per month paid to y since date z\". For example, my monthly [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[],"class_list":["post-1218","post","type-post","status-publish","format-standard","hentry","category-economics"],"_links":{"self":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/comments?post=1218"}],"version-history":[{"count":7,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1218\/revisions"}],"predecessor-version":[{"id":1336,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/posts\/1218\/revisions\/1336"}],"wp:attachment":[{"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/media?parent=1218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/categories?post=1218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reenigne.org\/blog\/wp-json\/wp\/v2\/tags?post=1218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}