PeriodWindow.build#

classmethod PeriodWindow.build(*, start, end, dates, in_window, eval_end)[source]#

Derive both date ranges from the window mask and the carry-out end.

Parameters:
start, endpd.Timestamp

Bounds of the period itself.

datespd.DatetimeIndex

The full fitted date axis.

in_windownp.ndarray

Boolean mask over dates selecting the window.

eval_endpd.Timestamp

Last date to sum: end itself when carryover is excluded, and otherwise as far as the carry-out reaches, which is end plus the window’s l_max for a bounded reach and the last fitted date for a reach the axis could not bound.

Returns:
PeriodWindow

The window, with its evaluation subset intersected against it so the two cannot disagree.