numpy-financial
numpy-financial copied to clipboard
Adding Profitability Index computation (PI)
Hello!
I added PI value calculator as a function which returns the profitability of a project.
Reference: https://en.wikipedia.org/wiki/Profitability_index
Interpretation: PI > 1: project is acceptable PI < 1: project is unacceptable PI = 1: neutral.
Thanks for the review!
There is a mistake in the code, should be: return ((future_cashflow / (1+rate)**np.arange(1, len(future_cashflow)+1)).sum(axis=0)) / -initial_inv