Spaces:
Running
Running
Robert Castagna
commited on
Commit
·
4e3e4f6
1
Parent(s):
dcef436
add stdev
Browse files
pages/2_Portfolio_Builder.py
CHANGED
@@ -158,6 +158,7 @@ with st.form(key="selecting columns"):
|
|
158 |
|
159 |
# Portfolio volatility
|
160 |
portfolio_stddev = np.sqrt(np.dot(pd.Series(w1['weights']).T, np.dot(covariance, w1['weights'])))
|
|
|
161 |
|
162 |
# Sharpe Ratio, adjusted for the risk-free rate
|
163 |
sharpe_ratio = rp.RiskFunctions.Sharpe(
|
@@ -282,6 +283,7 @@ with st.form(key="selecting columns"):
|
|
282 |
|
283 |
# Portfolio volatility
|
284 |
portfolio_stddev = np.sqrt(np.dot(pd.Series(w['weights']).T, np.dot(covariance, w['weights'])))
|
|
|
285 |
|
286 |
# Sharpe Ratio, adjusted for the risk-free rate
|
287 |
sharpe_ratio = rp.RiskFunctions.Sharpe(
|
|
|
158 |
|
159 |
# Portfolio volatility
|
160 |
portfolio_stddev = np.sqrt(np.dot(pd.Series(w1['weights']).T, np.dot(covariance, w1['weights'])))
|
161 |
+
st.write('Portfolio Volatility: ', np.round(portfolio_stddev, 3))
|
162 |
|
163 |
# Sharpe Ratio, adjusted for the risk-free rate
|
164 |
sharpe_ratio = rp.RiskFunctions.Sharpe(
|
|
|
283 |
|
284 |
# Portfolio volatility
|
285 |
portfolio_stddev = np.sqrt(np.dot(pd.Series(w['weights']).T, np.dot(covariance, w['weights'])))
|
286 |
+
st.write('Portfolio Volatility: ', np.round(portfolio_stddev, 3))
|
287 |
|
288 |
# Sharpe Ratio, adjusted for the risk-free rate
|
289 |
sharpe_ratio = rp.RiskFunctions.Sharpe(
|