I am using numpy library for doing simple IRR calculations using the irr function. So for example, if I want to find the IRR of a cash flow, I do the following
In [16]:
import numpy as np
cf = np.array([-100,10,10,100])
print np.irr(a)
0.0688601791248
But, I am looking for a way to do the NPV for a perpetuity. My cash flow would be -100, 10....
Has anyone done this before
PV=C/i
Where C = amount of cash flows
i = effective periodic interest rate or rate of return