fix: backtest simulation uses ET timezone for trading window

The simulated timestamp was 10:00 UTC (6:00 AM ET) which is outside
the trading window. Changed to 11:00 AM ET so backtested decisions
actually pass the trading window check.
This commit is contained in:
Celes Renata
2026-04-15 21:48:32 +00:00
parent 70bad7709a
commit 69eb366bf9
+4 -2
View File
@@ -109,12 +109,14 @@ class BacktestReplay:
# Process recommendations for this day
for rec in day_recs:
# Set a timestamp within trading window for evaluation
# Use 11:00 AM ET (within trading window) for simulation
from services.trading.trading_window import ET
sim_time = datetime(
current_date.year,
current_date.month,
current_date.day,
10, 0, 0,
tzinfo=timezone.utc,
11, 0, 0,
tzinfo=ET,
)
decision = engine.evaluate_recommendation(