STOP 16 / 31Build a season out of waves.
Layout
STOP 16 · Models

Build a season out of waves.

EXPLORE~6 min
Back to route map
  • Long seasonal periods can require many parameters if every seasonal position gets its own state.
  • Fourier terms describe smooth repeating shapes using pairs of sine and cosine waves.
Fourier terms: concepts and Northstar examples. Illustrative Northstar examples, not measured business results.
ConceptWhat it meansNorthstar example
K controls flexibility.
  • One pair gives one smooth wave.
  • More harmonics can represent more complex repeating patterns, but too many can fit noise.
  • Select K using time-aware evaluation.

Northstar can start with a few smooth annual waves, then add harmonics only if time-aware tests show that the extra seasonal flexibility helps.

Different periods can coexist.
  • Use weekly and annual Fourier terms together in a regression when appropriate.
  • The annual pattern is generally smoother than a sharp event spike.

Use weekly waves and annual waves together to describe different repeating shopping patterns in the same daily sales series.

Events are not just smooth waves.
  • Black Friday moves and is sharply localized.
  • An event indicator with lead/lag windows is often clearer than adding many annual harmonics.

Use a named event window for the sharp Black Friday lift instead of adding many smooth annual waves to chase its spike.

season(t) = Σ [aₖ sin(2πkt/m) + bₖ cos(2πkt/m)]
FIG 16.1

Add waves, add flexibility

WHAT THIS SHOWS

A Fourier regression represents a repeating seasonal profile as an intercept plus sine and cosine pairs. Start with the reconstruction above; then compare how the same choice behaves when Northstar has only one year of history instead of five.

The question it answers: How can a handful of waves rebuild a whole year's shape, and when do extra waves start fitting noise?

1 · Rebuild the yearly shape by adding waves

The waves being added · first 3 of 6

Individual Fourier waves fitted to the average Northstar week-20061.5-6687.26687.220061.5JanAprJulOctDec
Wave 1Wave 2Wave 3

Added together · fitted annual shape

Known annual shape compared with the Fourier reconstruction$69k$85k$101k$118kJanAprJulOctDec
Known shapeFourier fit
Harmonics K3
Fit RMSE vs known shape$1,444
R² vs known shape0.987
Waves in the known shape4

2 · With little data, extra harmonics fit noise

Seasonal model

Fitted to 3 years of weekly sales

Fourier fit to Northstar weekly sales with different amounts of history$61k$83k$105k$126kYear 1Year 2Year 3
Observed salesKnown shape6-wave fit

Next year · forecast against the known shape

Next-year Fourier forecast compared with the known Northstar shape$68k$85k$101k$118kJanAprJulOctDec
Known next year6-wave next-year forecast
In-sample RMSE$4,155
Next-year RMSE$1,512
3-wave next-year RMSE$1,444
6-wave next-year RMSE$1,512
VerdictSelected model fits this history but forecasts worse

More history is stabilizing the fit. Keep checking next-year error, not only the in-sample line.

Fine print & method

Constructed weekly sales with a known annual shape containing four harmonic pairs, plus deterministic Gaussian noise. Fits are ordinary least squares on past weeks only; the next-year score compares each fitted shape with the noise-free known shape. The first panel fits the average weekly profile over three years. With one year, six pairs overfit; with five, the true fourth wave is estimated better while spurious higher waves shrink. This demonstrates model selection, not a production forecast. A moving event such as Black Friday still needs an explicit event feature; a fixed annual wave cannot know its date.

CHECK YOURSELF · CHOOSE AN ANSWER

What generally happens as the number of Fourier pairs K increases?

Your learning note

Private · just for you