Perpetuities - Arithmetic Progression¶
TmVal’s Annuity
class can also handle perpetuities with payments of increasing arithmetic progression:
Examples¶
Suppose we have a perpetuity-immediate with an initial end-of-year payment of 100. Subsequent end-of-year payments increase 100 each year forever. If the interest rate is 5% compounded annually, what’s the present value?
To solve this problem, we need the special value np.Inf
from NumPy to specify an infinite term, passing term=np.Inf
to TmVal’s Annuity
class.
In [1]: import numpy as np
In [2]: from tmval import Annuity
In [3]: ann = Annuity(
...: amount=100,
...: gr=.05,
...: term=np.Inf,
...: aprog=100
...: )
...:
In [4]: print(ann.pv())
41999.99999999993
What if we have a perpetuity-due instead?
In [5]: ann2 = Annuity(
...: amount=100,
...: gr=.05,
...: term=np.Inf,
...: aprog=100,
...: imd='due'
...: )
...:
In [6]: print(ann2.pv())
44099.99999999993