saadrizvi09 commited on
Commit
4f45ede
·
verified ·
1 Parent(s): aa88517

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +1 -2
src/streamlit_app.py CHANGED
@@ -245,8 +245,7 @@ if st.button("Run Honest Backtest"):
245
  pred_vol = svr_model.predict(svr_feat_scaled)[0]
246
  honest_predicted_vols.append(pred_vol)
247
 
248
- # --- Fix 1: Calculate EMAs properly in walk-forward ---
249
- # Calculate EMAs using only the history up to current day
250
  test_df.loc[test_df.index[i], 'EMA_Short'] = history_slice['Close'].ewm(span=12).mean().iloc[-1]
251
  test_df.loc[test_df.index[i], 'EMA_Long'] = history_slice['Close'].ewm(span=26).mean().iloc[-1]
252
 
 
245
  pred_vol = svr_model.predict(svr_feat_scaled)[0]
246
  honest_predicted_vols.append(pred_vol)
247
 
248
+ # Calculated EMAs using only the history up to current day
 
249
  test_df.loc[test_df.index[i], 'EMA_Short'] = history_slice['Close'].ewm(span=12).mean().iloc[-1]
250
  test_df.loc[test_df.index[i], 'EMA_Long'] = history_slice['Close'].ewm(span=26).mean().iloc[-1]
251