Robert Castagna commited on
Commit
4ad15ae
1 Parent(s): f9d5fa2
Files changed (1) hide show
  1. pages/2_Portfolio_Builder.py +2 -2
pages/2_Portfolio_Builder.py CHANGED
@@ -172,7 +172,7 @@ with st.form(key="selecting columns"):
172
 
173
  # Portfolio volatility
174
  portfolio_stddev = np.sqrt(np.dot(pd.Series(w1['weights']).T, np.dot(covariance, w1['weights'])))
175
- st.write('Portfolio Volatility: ', np.round(portfolio_stddev, 3))
176
 
177
  # Sharpe Ratio, adjusted for the risk-free rate
178
  sharpe_ratio = rp.RiskFunctions.Sharpe(
@@ -297,7 +297,7 @@ with st.form(key="selecting columns"):
297
 
298
  # Portfolio volatility
299
  portfolio_stddev = np.sqrt(np.dot(pd.Series(w['weights']).T, np.dot(covariance, w['weights'])))
300
- st.write('Portfolio Volatility: ', np.round(portfolio_stddev, 3))
301
 
302
  # Sharpe Ratio, adjusted for the risk-free rate
303
  sharpe_ratio = rp.RiskFunctions.Sharpe(
 
172
 
173
  # Portfolio volatility
174
  portfolio_stddev = np.sqrt(np.dot(pd.Series(w1['weights']).T, np.dot(covariance, w1['weights'])))
175
+ st.write('Portfolio Volatility: ', np.round(np.mean(portfolio_stddev), 3))
176
 
177
  # Sharpe Ratio, adjusted for the risk-free rate
178
  sharpe_ratio = rp.RiskFunctions.Sharpe(
 
297
 
298
  # Portfolio volatility
299
  portfolio_stddev = np.sqrt(np.dot(pd.Series(w['weights']).T, np.dot(covariance, w['weights'])))
300
+ st.write('Portfolio Volatility: ', np.round(np.mean(portfolio_stddev), 3))
301
 
302
  # Sharpe Ratio, adjusted for the risk-free rate
303
  sharpe_ratio = rp.RiskFunctions.Sharpe(