Skip to content

Enforce point-in-time availability in factor reports - #20

Merged
PureSaber merged 1 commit into
mainfrom
codex/pit-factor-history-20261001
Oct 1, 2026
Merged

PureSaber merged 1 commit into
mainfrom
codex/pit-factor-history-20261001

Conversation

@PureSaber

Copy link
Copy Markdown
Owner

factor_report could previously compute a historical signal from values that arrived after that session, while sparse observations could compress rolling windows and signal delays.

Changes:

  • rebuild late-data signals from rows visible at each daily 23:59 UTC decision time while retaining the single-pass fast path for timely panels
  • evaluate rolling dependencies and signal delays on the complete supplied session grid so missing or late sessions remain unavailable
  • validate the session-date contract and document the point-in-time semantics
  • add regressions for delayed availability, sparse rolling windows, cross-sectional ranks, and signal-delay gaps

Validation:

  • python -m ruff check src tests
  • python -m ruff format --check src tests
  • python -m pytest -q: 182 passed, coverage 88.61%
  • existing downstream validation after the same fix: quant-pipeline 27 passed; A-share research workbench 21 passed

Constraint:
When available_at is absent, the report retains its documented descriptive end-of-day assumption. Strict PIT use requires actual availability timestamps and a complete exchange session calendar.

@PureSaber PureSaber left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

独立代码审查:3061b1cc60ff4860d7d358d213c35806f22a57f3

已独立核对历史可得性、完整交易日网格、warmup遮罩、截面信号和延迟信号路径,并读取对应回归测试及182项完整测试结果。晚到输入不能进入历史决策;缺失交易日不再压缩窗口。未发现阻塞问题。23:59UTC为本日级接口明确约定;缺少available_at时仍只能作描述性研究。

此为独立agent代码审查记录;合并仍须通过该提交的全部CI与仓库required checks,不替代或绕过GitHub保护规则。

@PureSaber
PureSaber merged commit a26c758 into main Oct 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant