Skip to content

PIT Vintage Utilities

alphaforge.pit.vintage

Vintage selection and lookahead validation utilities.

Moved from nowcast-data to alphaforge as generic PIT infrastructure.

select_vintage_for_asof(vintages: list[date | datetime | pd.Timestamp], asof_date: date | datetime | pd.Timestamp) -> date | datetime | pd.Timestamp | None

Select the latest vintage not after asof_date.

Returns None if no vintage is available before asof_date.

validate_no_lookahead(vintage_date: date | datetime | pd.Timestamp, asof_date: date | datetime | pd.Timestamp) -> bool

Return True if vintage_date <= asof_date (no lookahead bias).