Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -309,7 +309,7 @@ if run_analysis:
|
|
| 309 |
continue
|
| 310 |
|
| 311 |
try:
|
| 312 |
-
rolling_spreads = edge_rolling(ohlc, window=
|
| 313 |
except Exception as e:
|
| 314 |
st.error("Error computing rolling spread.")
|
| 315 |
continue
|
|
@@ -319,7 +319,7 @@ if run_analysis:
|
|
| 319 |
|
| 320 |
volume = data['Volume']
|
| 321 |
returns = ohlc['Close'].pct_change()
|
| 322 |
-
rolling_vol = returns.rolling(window=
|
| 323 |
upper_band = ohlc['Close'] * (1 + rolling_spreads / 2)
|
| 324 |
lower_band = ohlc['Close'] * (1 - rolling_spreads / 2)
|
| 325 |
|
|
|
|
| 309 |
continue
|
| 310 |
|
| 311 |
try:
|
| 312 |
+
rolling_spreads = edge_rolling(ohlc, window=15, min_periods=10, sign=False)
|
| 313 |
except Exception as e:
|
| 314 |
st.error("Error computing rolling spread.")
|
| 315 |
continue
|
|
|
|
| 319 |
|
| 320 |
volume = data['Volume']
|
| 321 |
returns = ohlc['Close'].pct_change()
|
| 322 |
+
rolling_vol = returns.rolling(window=15).std()
|
| 323 |
upper_band = ohlc['Close'] * (1 + rolling_spreads / 2)
|
| 324 |
lower_band = ohlc['Close'] * (1 - rolling_spreads / 2)
|
| 325 |
|