Last active
June 15, 2022 16:55
-
-
Save rian-dolphin/dc8601ca071fbcb577d3205d55b9c824 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-- Find index of max sharpe portfolio | |
max_sharpe_index = np.argmax(mean_variance_pairs[:,0]/mean_variance_pairs[:,1]**0.5) | |
#-- Add max sharpe portfolio as a seperate point to the plot | |
fig.add_trace(go.Scatter(x=mean_variance_pairs[max_sharpe_index,1]**0.5, y=mean_variance_pairs[max_sharpe_index,0], | |
marker=dict(color='red', size=14), | |
mode='markers')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment