Skip to content
ML Academy

Time series and forecasting · insight-0224

Handle weekly data's non-integer annual season with Fourier terms or STL

Evidence type
documented fact
Difficulty
medium
Roles
Data scientist, Data analyst
Industries
retail, insurance, aviation

Summary: situation, action, reason, boundary

  1. Situation

    A weekly demand series is fitted with a 52-period seasonal model, and the holiday peaks drift by a week every few years.

  2. Action

    Use Fourier terms with the fractional period, STL decomposition with a non-seasonal model on the adjusted series, or calendar features such as week-of-holiday instead of week number.

  3. Reason

    Weekly data have a large, non-integer seasonal period that most classical methods cannot handle directly.

  4. Boundary

    Weekly retail, staffing, insurance claims, and aggregated airline bookings.

Symptom or risk

A year has about 52.18 weeks, so an integer period slowly misaligns the annual pattern and peak-week forecasts are off.

Exceptions

For short horizons in stable periods, a 52-week seasonal naive can still be a reasonable baseline.

Trade-offs

Fourier terms give a smooth season that may miss sharp holiday spikes; add holiday dummies.

Pitfalls

Aggregating daily data into weeks that start on different weekdays across systems.

Lessons and concepts

Claims and their sources