Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +1 -2
src/streamlit_app.py
CHANGED
|
@@ -235,9 +235,8 @@ if st.button("Run Hybrid Backtest"):
|
|
| 235 |
test_df['Position_Size'] = (1.0 / test_df['Risk_Ratio']).clip(upper=1.0, lower=0.0)
|
| 236 |
|
| 237 |
# Override: If HMM says CRASH, Size = 0
|
| 238 |
-
test_df['Uptrend'] = test_df['Close'] > test_df['EMA_Long']
|
| 239 |
test_df['Position_Size'] = np.where(
|
| 240 |
-
test_df['Regime'] == high_vol_state
|
| 241 |
0.0,
|
| 242 |
test_df['Position_Size']
|
| 243 |
)
|
|
|
|
| 235 |
test_df['Position_Size'] = (1.0 / test_df['Risk_Ratio']).clip(upper=1.0, lower=0.0)
|
| 236 |
|
| 237 |
# Override: If HMM says CRASH, Size = 0
|
|
|
|
| 238 |
test_df['Position_Size'] = np.where(
|
| 239 |
+
test_df['Regime'] == high_vol_state ,
|
| 240 |
0.0,
|
| 241 |
test_df['Position_Size']
|
| 242 |
)
|