Skip to content

Instantly share code, notes, and snippets.

@faisalnawazmir
Forked from fnneves/2.py
Created July 30, 2021 06:56
Show Gist options
  • Save faisalnawazmir/bce76aca837035ed632bd0290413fcda to your computer and use it in GitHub Desktop.
Save faisalnawazmir/bce76aca837035ed632bd0290413fcda 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