标签:
%matplotlib qt4
%matplotlib inline
import scipy as sp
from matplotlib.pyplot import *
cashflows=[-100,50,60,70]
rate=[]
npv=[]
x=(0,0.7)
y=(0,0)
for i in range(1,70):
rate.append(0.01*i)
npv.append(sp.npv(0.01*i,cashflows[1:])+cashflows[0])
plot(rate,npv),plot(x,y)
show()
标签:
原文地址:http://www.cnblogs.com/midforest/p/4969358.html