Annuity Equation
Annuity Equation¶
While we could find the value of an annuity in a manual manner like above, there is actually an equation which will give us the correct present value.
$$ PV = P \cdot \frac{1-(1+r)^n}{r}$$
where
$ PV = \text{Present Value} $
$ P = \text{Payment} $
$ r = \text{Discount Rate} $
$ n = \text{Number of Periods} $
In [6]:
#There is an equation which represents the present value of an annuity
#P is payment, n is the number of years, and r is our discount rate
def annuity_TVM(P, n, r):
annuity_factor = (1-(1+r)**-n)/r
PV = annuity_factor * P
return PV
print(annuity_TVM(100,5,.05))
The Annuity Factor¶
The annuity factor can be thought of as a multiplier to the payments. In the case that the rate is 0%, the annuity factor is going to be n (the total number of payments) because there is no discounting. As r becomes larger and larger the annuity factor shrinks because the payments are worth less and less. Let's find what the annuity factor will be with 10 years and different values of r.
In [7]:
#Annuity factors discount the number of payments we get
#Look at how the factors vary based on different discount rates
rates = [0,.02,.05,.1]
n = 10
for r in rates:
if r==0:
annuityFactor = n
else:
annuityFactor = (1-(1+r)**-n)/r
print(annuityFactor)