Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- w = max_ret_MVO(returns, cust_ind, names,0.05,10000)
- print w
- sp5 = np.load("SP500.npy")
- sp5 = sp5[1:]
- plt.plot(sp5)
- dee = np.sum((p2*w.reshape((len(p2),-1))), axis = 0)[1:]
- multiplier = sp5[0]/dee[0]
- plt.plot(dee*multiplier)
- #print multiplier
- plt.xlabel('Weeks into the year')
- plt.ylabel('Price')
- plt.title('DFY output performance vs S&P500')
- plt.legend(["S&P500", "DFY Output"], loc = 0)
- plt.show()
- #Just Plotting price for one
- #print names[0]
- #plt.plot(p2[0])
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement