MathB.in
New
Demo
Tutorial
About
Problem set-up: After $n$ days, $A(n)$ is the amount in account A, $B(n)$ is the amount in account B. Interest is earnt on account A the rate of $r$ per day (eg $r=\frac{5 \%}{365} = 0.000137$), and accrues in account B. After $n$ days, the entire balance of B is transferred to A and a fee of $f$ is deducted from A. $B(0)=0$ We want to maximise $A(T)$ for some fixed time period $T$ by our choice of $n$. Solution: Just before the $j$th transfer, $B(jn) = r\cdot n \cdot A((j-1)n)$ So, just after the $j$th transfer, $A(jn)=(1+rn) \cdot A((j-1)n)-f$ This means: $A(n) = (1+rn)\cdot A(0)-f$ $A(2n) = (1+rn)^2 \cdot A(0) - (1+rn) \cdot f-f$ ... $A(jn)=(1+rn)^j \cdot A(0) - [(1+rn)^{j-1} + (1+rn)^{j-2} + ... (1+rn) + 1 ] \cdot f$ So $A(jn) = (1+rn)^j \cdot A(0) - \frac {(1+rn)^j - 1}{rn} \cdot f$ Assume we have a fixed time horizon of $T$ days. So $jn = T$. (In theory, $n$ needs to divide $T$ so that $j$ (= $T/n$) is an integer, for a fair comparison between different choices of $n$, but as long as $T$ is large compared to $n$ this shouldn't make much difference). $A(T)=(1+rn)^{T/n}\cdot A(0) - \frac {(1+rn)^{T/n} - 1}{rn} \cdot f$ We want to choose $n$ which maximises this. Rearranging then using binomial expansion, $A(T) = (A(0)-\frac{f}{rn})(1+rn)^{T/n}+\frac{f}{rn}$ $A(T) = (A(0)-\frac{f}{rn})(1+\frac{T}{n}rn+\frac12\frac{T}{n}(\frac{T}{n}-1)(rn)^2+\frac16\frac{T}{n}(\frac{T}{n}-1)(\frac{T}{n}-2)(rn)^3+...)+\frac{f}{rn}$ After a bit of rearranging and because $r$ will generally be small, so ignore terms $r^3$ and higher, $A(T)$ is approximated by $g(n)= [A(0)(1+Tr+\frac12T^2r^2)+\frac12Trf+\frac12T^2r^2f]-\frac1n \cdot[Tf+\frac12T^2rf+\frac16T^3r^2f] - n \cdot [\frac12Tr^2A(0)+\frac13Tr^2f]$ $g(n)$ takes the form $a-\frac{b}{n} - cn$ where $b$ and $c$ are positive constants: $b = Tf+\frac12T^2rf+\frac16T^3r^2f$ and $c = \frac12Tr^2A(0)+\frac13Tr^2f$ By considering $g(n)$ as a continuous function and solving $g'(n)=0$ we get $n_{\text{optimal}}^2 = \frac{b}{c}$ so we want $n$ to be as close to the following value as possible: $\large \sqrt{\frac{f\cdot(6+3Tr+T^2r^2)}{r^2\cdot(3A(0)+2f)}}$ which for small $r$ and small $f$ (relative to $A(0)$) can be approximated by $\large \sqrt{\frac{f \cdot (Tr+2)}{r^2 \cdot A(0)}}$
ERROR: JavaScript must be enabled to render input!
Fri, 28 May 2021 20:39 GMT