Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. plt.clf()
  2. fig, ax = plt.subplots(1,1, figsize=(12,9))
  3. _ = plt.gcf().subplots_adjust(bottom=0.2)
  4. x = [np.mean(ca_e), np.mean(ca_rp)]
  5. y = [np.mean(ct_e), np.mean(ct_rp)]
  6. txt = ['efficient', 'risk-parity']
  7. marker = ['*', 'o']
  8. for i, txt in enumerate(txt):
  9. _ = plt.scatter(x[i], y[i], color = colors[i], marker = marker[i],
  10. s = 40)
  11. _ = plt.annotate('{} ({:.2f}, {:.2f})'.format(txt, x[i], y[i]), (x[i]+0.01, y[i]+0.01))
  12. _ = plt.xlim(0,0.5)
  13. _ = plt.ylim(0,0.5)
  14. _ = plt.xlabel("Cross-asset weights' volatility (std)", fontsize = 9)
  15. _ = plt.ylabel("Cross-time weights' volatility (std)", fontsize = 9)
  16. _ = plt.title("Mapping portfolios' weights volatility")
  17. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement