Skip to content

Instantly share code, notes, and snippets.

@fnneves
Created October 11, 2018 00:01
Show Gist options
  • Save fnneves/18461d680ee1fb28b69f9db34d8964b5 to your computer and use it in GitHub Desktop.
Save fnneves/18461d680ee1fb28b69f9db34d8964b5 to your computer and use it in GitHub Desktop.
markowitz
plt.figure(figsize=(12,8))
plt.scatter(vol_arr, ret_arr, c=sharpe_arr, cmap='viridis')
plt.colorbar(label='Sharpe Ratio')
plt.xlabel('Volatility')
plt.ylabel('Return')
plt.scatter(max_sr_vol, max_sr_ret,c='red', s=50) # red dot
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment