rohanphadke commited on
Commit
6e49075
·
verified ·
1 Parent(s): e32d2bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -57,12 +57,13 @@ def plot_efficient_frontier(dataframes, names):
57
  ax.set_title('Efficient Frontier')
58
  st.pyplot(fig)
59
 
60
- st.header("Optimal Portfolio Weights:")
61
  optimal_weights = all_weights[max_sharpe_idx]
62
  st.subheader(f"Expected Annual Return: {max_sharpe_return:.2f}")
63
  st.subheader(f"Annual Volatility/Risk: {max_sharpe_volatility:.2f}")
 
64
  for i, name in enumerate(names):
65
- st.write(f"**{name}:** {optimal_weights[i]:.4f}")
66
 
67
 
68
  # Streamlit application layout
 
57
  ax.set_title('Efficient Frontier')
58
  st.pyplot(fig)
59
 
60
+
61
  optimal_weights = all_weights[max_sharpe_idx]
62
  st.subheader(f"Expected Annual Return: {max_sharpe_return:.2f}")
63
  st.subheader(f"Annual Volatility/Risk: {max_sharpe_volatility:.2f}")
64
+ st.subheader("Optimal Portfolio Weights:")
65
  for i, name in enumerate(names):
66
+ st.write(f"**{name}:** {100*optimal_weights[i]:.2f}%")
67
 
68
 
69
  # Streamlit application layout