numeraire.core.data.VintagedBlock#
- class numeraire.core.data.VintagedBlock(table: DataFrame, *, series: list[str] | None = None, lag: int = 1, name: str | None = None, ref_col: str = 'ref_date', vintage_col: str = 'vintage')[source]#
Bases:
objectA vintaged (point-in-time) block: a
(ref_date x vintage)panel resolved byasof.Built from a tidy table
[ref_date, vintage, <series...>](e.g. what a FRED-MD build yields).asof(t)returns the real-time edge: among vintages available att(vintagemonth +lag<=t’s month), the most recentref_date’s value taken from its latest available vintage. Revisions are respected — an earlier vintage’s number is used until a later one is available, so no future revision leaks in.lag(whole months, default 1) is the availability buffer. Thevintagelabel already is the release month, so one month suffices; sweep it up for a more conservative real-time cut.- __init__(table: DataFrame, *, series: list[str] | None = None, lag: int = 1, name: str | None = None, ref_col: str = 'ref_date', vintage_col: str = 'vintage') None[source]#
Methods
__init__(table, *[, series, lag, name, ...])asof(t)Real-time vector at
t: latest ref_date's value from its latest available vintage.is_ready(t)Whether any vintage is available at
t(False before the first release + lag).truncate(end)A copy holding only vintages released by
end(vintagemonth <=endmonth).Attributes
Feature (series) names of this block.
- is_ready(t: object) bool[source]#
Whether any vintage is available at
t(False before the first release + lag).
- asof(t: object) NDArray[float64][source]#
Real-time vector at
t: latest ref_date’s value from its latest available vintage.
- truncate(end: object) VintagedBlock[source]#
A copy holding only vintages released by
end(vintagemonth <=endmonth).