Skip to content
ML Academy

Time series and forecasting · insight-1205

End each backtest origin on a complete aggregation period

Evidence type
practitioner heuristic
Difficulty
easy
Roles
Data scientist, Data analyst, ML engineer
Industries
retail, aviation, e-commerce

Summary: situation, action, reason, boundary

  1. Situation

    Daily bookings are rolled up to weeks, and the cutoff falls on a Wednesday; the training week's total contains three days and the test week begins mid-week.

  2. Action

    Align every cutoff with the end of the coarsest aggregation period used by features or targets (week, month, fiscal period). If the business runs on a different week boundary, use that one.

  3. Reason

    Aggregates are only defined on complete periods. A cutoff inside a period either truncates the last value or lets post-cutoff days enter a feature.

  4. Boundary

    Multi-granularity pipelines: daily data with weekly or monthly features, fiscal calendars, 4-4-5 retail months.

Symptom or risk

A partial last period looks like a demand drop to the model, and a week total that straddles the cutoff mixes known and unknown days.

Exceptions

Daily models with no coarser features need no alignment.

Trade-offs

Fewer possible origins; production forecasts issued mid-period need an explicit partial-period feature instead.

Pitfalls

Aligning the training window but not the label window, so the first test week is only partly scored.

Example

Hypothetical: a Wednesday origin with weekly features sees a half-week of 300 bookings against a usual 700; a naive model reads that as a 57% collapse.

Lessons and concepts