We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef83f39 commit 45fa313Copy full SHA for 45fa313
Tutorials/Efficient Frontier with Sharpe Ratio.py
@@ -55,7 +55,7 @@
55
'Sharpe Ratio': sharpe_ratio}
56
57
# extend original dictionary to accomodate each ticker and weight in the portfolio
58
-for counter,symbol in enumerate(selected):
+for counter,symbol in enumerate(cov_annual.columns):
59
portfolio[symbol+' Weight'] = [Weight[counter] for Weight in stock_weights]
60
61
# make a nice dataframe of the extended dictionary
@@ -74,4 +74,4 @@
74
plt.xlabel('Volatility (Std. Deviation)')
75
plt.ylabel('Expected Returns')
76
plt.title('Efficient Frontier')
77
-plt.show()
+plt.show()
0 commit comments