Geometric gradient/series problem
Stuck at figuring out a formula/common ratio for the following
Amount = A
draw = d
int = i
inf = f
term = n
YeBal1 = A( 1 + i)^1 - d(1 + f)^1
YeBal2 = (A( 1 + i)^1 - d(1 + f)^1) * (1 + i)) - d(1 + f)^2
YeBal3 = [(A( 1 + i)^2 - d(1 + f)^2) * (1 + i)) - d(1 + f)^2] * (1 + i) - d(1 + f)^3
Every following year YeBal of the previous year becomes the Amount after subtracting d(1 + f)^n. This is where I get lost. If d was constant it is a simple problem.
YeBal1 = A( 1 + i)^1 - d(1 + f)^1
YeBal2 = YeBal(1 + i) - d(1 + f)^2
YeBal3 = YeBal2(1 + i) - d(1 + f)^3
. . . The above is very easy to solve it in Excel. It would be very useful to have a formula for a python app.