Skip to content

Fix risk estimation using data before its arrival - #35

Merged
PureSaber merged 2 commits into
mainfrom
codex/barra-pit-admission
Oct 13, 2026
Merged

PureSaber merged 2 commits into
mainfrom
codex/barra-pit-admission

Conversation

@PureSaber

@PureSaber PureSaber commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Daily bars and exposure fields with explicit late arrival times were relabeled as available at market close, allowing an evening price to affect an earlier risk estimate. The adapter now preserves price, feature, and entitlement availability, requires both return endpoints to have arrived, and applies the lookback after filtering available observations.

Existing callers without availability columns retain the assumed-close behavior, now explicitly labeled and documented as insufficient for historical PIT certification. No model parameters or production risk limits change.

Validation: 281 tests passed, 85.19% total coverage, Ruff passed. Eight new regression cases cover evening arrivals, late prior-price corrections, future feature values, late entitlements, invalid timestamps, and legacy parity. A separate adversarial comparison against the pre-fix main revision confirms that altering a not-yet-arrived price changes the old estimate but leaves the repaired estimate unchanged.

@PureSaber
PureSaber merged commit 1a93773 into main Oct 13, 2026
8 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