Files
NexQuant/rdagent
TPTBusiness 78fb607dbe fix(factors): detect and correct look-ahead bias in daily-constant factors
Daily factors (e.g. daily_log_return) carried same-day close data at 00:00,
giving the model end-of-day information at bar open — a classic look-ahead bias
that produced spurious IC=0.25 and Sharpe=24 with 98% win rate.

Changes:
- factor_runner.py: add _shift_daily_constant_factor_if_needed() that detects
  factors where >90% of days have a single unique intraday value, then shifts
  them by 1 trading day before IC computation
- prompts.yaml: add rule #7 instructing LLM to always shift(1) daily aggregates
  before forward-filling to minute bars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 09:34:06 +02:00
..