Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plt.clf()
- fig, ax = plt.subplots(1,1, figsize=(12,9))
- _ = plt.gcf().subplots_adjust(bottom=0.2)
- x = [np.mean(ca_e), np.mean(ca_rp)]
- y = [np.mean(ct_e), np.mean(ct_rp)]
- txt = ['efficient', 'risk-parity']
- marker = ['*', 'o']
- for i, txt in enumerate(txt):
- _ = plt.scatter(x[i], y[i], color = colors[i], marker = marker[i],
- s = 40)
- _ = plt.annotate('{} ({:.2f}, {:.2f})'.format(txt, x[i], y[i]), (x[i]+0.01, y[i]+0.01))
- _ = plt.xlim(0,0.5)
- _ = plt.ylim(0,0.5)
- _ = plt.xlabel("Cross-asset weights' volatility (std)", fontsize = 9)
- _ = plt.ylabel("Cross-time weights' volatility (std)", fontsize = 9)
- _ = plt.title("Mapping portfolios' weights volatility")
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement