1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| import numpy as np
fv = np.fv(0.01, 5, -100, -1000) print(round(fv, 2))
pv = np.pv(0.01, 5, -100, fv) print(pv)
npv = np.npv(0.01, [ -1000, -100, -100, -100, -100, -100]) print(round(npv, 2)) fv = np.fv(0.01, 5, 0, npv) print(round(fv, 2))
irr = np.irr([-1000, 100, 200, 300, 400, 500]) print(round(irr, 2)) npv = np.npv(irr, [-1000, 100, 200, 300, 400, 500]) print(npv)
pmt = np.pmt(0.01, 5, 1000) print(round(pmt, 2))
nper = np.nper(0.01, pmt, 1000) print(int(nper))
rate = np.rate(nper, pmt, 1000, 0) print(round(rate, 2))
|