fix: add first-skip-reason logging to backtest replay for debugging
This commit is contained in:
@@ -190,6 +190,17 @@ class BacktestReplay:
|
||||
}
|
||||
portfolio_state.active_pool -= cost
|
||||
portfolio_state.open_position_count += 1
|
||||
elif act_count == 0 and not hasattr(self, '_first_skip_logged'):
|
||||
# Log the first skip reason for debugging
|
||||
logger.warning(
|
||||
"Backtest first skip: ticker=%s reason=%s conf=%.2f price=%.2f pool=%.2f",
|
||||
decision.ticker,
|
||||
decision.skip_reason,
|
||||
rec.get("confidence", 0.0),
|
||||
rec.get("current_price", 0.0),
|
||||
portfolio_state.active_pool,
|
||||
)
|
||||
self._first_skip_logged = True
|
||||
|
||||
if day_recs:
|
||||
logger.info(
|
||||
|
||||
Reference in New Issue
Block a user