Skip to content

Instantly share code, notes, and snippets.

@Zmey56
Created May 11, 2022 21:12
Show Gist options
  • Save Zmey56/9625291e540deae6704f6db7a38027f8 to your computer and use it in GitHub Desktop.
Save Zmey56/9625291e540deae6704f6db7a38027f8 to your computer and use it in GitHub Desktop.
fig, axs = plt.subplots(figsize=(15,10))
(cum_daily_return.multiply(weights_min_vol, axis=1).sum(axis=1) - 1).plot(label = 'Minimum volatility')
(cum_daily_return.multiply(weights_opt_sr, axis=1).sum(axis=1) - 1).plot(label = 'Maximum Sharp')
(cum_daily_return.multiply(weights_div, axis=1).sum(axis=1) - 1).plot(label = 'Maximum Diversification')
(cum_daily_return.multiply(weights_max_ret, axis=1).sum(axis=1) - 1).plot(label = 'Maximum Returns')
plt.title('2021 year')
plt.ylim(0)
plt.legend()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment