GARETH GRANTTECHNOLOGY · DATA · INNOVATION
Explore

35 / Forecasting

Seasonality and fitted seasonal forecasting

Seasonal forecasting uses patterns that recur over a known cycle, such as weekdays, quarters or months. A seasonal-naïve baseline repeats the corresponding past season; a fitted model can add trend or other known drivers when sufficient history and validation justify the extra structure.

AdvancedLive exploration + Python

The business question

How should recurring calendar patterns influence purchasing, staffing and capacity?

  • Plan for weekday or quarterly differences in service demand.
  • Separate recurring calendar variation from continuing growth when budgeting production.
  • Compare a transparent seasonal baseline with a fitted model before using forecasts in inventory or staffing decisions.

How the method works

A seasonal-naïve forecast repeats the latest observed value from the matching season. For quarterly data, next year’s first quarter starts from the most recent first-quarter observation. This is a strong baseline when a pattern repeats, and it avoids pretending that every increase is a new trend. Several full cycles are normally needed to distinguish recurring seasonality from one-off events.

A seasonal regression can represent time and calendar indicators explicitly. The example fits log demand using a linear time trend and three quarterly indicator variables, with quarter one as the reference. Exponentiating gives a fitted seasonal profile in demand units. With random log errors, that back-transformation generally targets a conditional median; a mean forecast needs a justified bias adjustment or predictive simulation.

This regression is distinct from Holt–Winters exponential smoothing and seasonal ARIMA. Holt–Winters updates level, trend and seasonality; SARIMA models seasonal and non-seasonal serial dependence after appropriate differencing. They are alternatives, not models fitted by the short example. Select methods through chronological validation at the actual horizon and include holiday shifts, stockouts or unusual business closures when relevant.

The calculation

Seasonal-naïve forecast_(T+h) = y_(T+h−m), for 1≤h≤m; seasonal regression: log(y_t) = b_0+b_1t+γ_2Q2_t+γ_3Q3_t+γ_4Q4_t+error_t
Read the symbols
SymbolMeaning
mSeason length, four periods for quarterly data.
TLast observation available at the forecast origin.
Q2_t, Q3_t, Q4_tQuarter indicators; quarter one is represented by the intercept.
b_1Time trend on the logarithmic scale.

A worked business example

ILLUSTRATIVE SCENARIO

Constructed quarterly demand deliberately combines a repeated seasonal profile with 10% annual growth.

Inputs

  • Year one: 100,120,90,150 units.
  • Year two: 110,132,99,165 units.
  • Year three, reserved initially as a holdout: 121,145.2,108.9,181.5 units.

Work through the numbers

  1. Fit the log-linear seasonal regression only to the first eight observations.
  2. A seasonal-naïve holdout forecast repeats year two; its four-quarter MAE is 12.65 units.
  3. The fitted regression captures the constructed growth and quarter pattern, producing an approximately zero holdout MAE.
  4. After evaluating, refit the same specification to all twelve observations: next four point forecasts are 133.10,159.72,119.79 and 199.65 units.
The example distinguishes a baseline that repeats a season from a fitted model that also represents growth.

A perfect result occurs because the data were designed from that structure. It is not evidence that the model will forecast real business demand perfectly. Three years of toy data cannot quantify the uncertainty from weather, promotions, disruptions or changing customer demand.

Explore the decision

Build a seasonal-naive benchmark. The live explorer has its own example inputs; it is separate from the worked calculation above.

Enable JavaScript to use this calculator. The worked example and executable Python remain available.

Apply it at work

  1. Define the calendar frequency, forecast horizon and decisions the forecasts must support.
  2. Plot several cycles, investigate known events and protect a later period for evaluation.
  3. Compare seasonal naïve with defensible fitted specifications using only information available at each origin.
  4. Refit the selected specification after evaluation, produce uncertainty-aware forecasts and monitor pattern changes.

Check these assumptions

  • Calendar periods and outcomes are consistently recorded, with missing periods distinguished from zero demand.
  • The observed seasonal pattern and trend are informative about the intended future period.
  • Future predictors such as quarter indicators are known at prediction time; unknown drivers require scenarios.
  • The logarithmic example requires strictly positive demand and a suitable interpretation of back-transformed forecasts.

Common mistakes and how to avoid them

  • Randomly mixing past and future rows during validation makes a seasonal forecast appear better informed than it really is.
  • Treating a holiday, strike or promotion as permanent seasonality can distort future resource plans.
  • Comparing a log-scale fit with a demand-scale cost without considering transformation and forecast uncertainty is misleading.

How this can help the business

  • Seasonal profiles can help schedule capacity before predictable busy periods while reducing routine overstaffing in quieter periods.
  • Inventory planning can separate a recurring seasonal peak from continuing growth and test both shortage and holding-cost consequences.
A decision rule to adapt

Prefer a fitted seasonal method only when it improves a relevant chronological baseline and its uncertainty, maintenance effort and operating assumptions are acceptable for the decision.

When to use another approach

Consider seasonal naïve, Holt–Winters/ETS, SARIMA or regression with holiday and promotion variables; intermittent and multiple-seasonal demand require specialised choices.

Reproduce the worked example in Python

The code is self-contained for this example. Dependencies and run instructions are included with the downloadable notebook.

Show executable code and recorded output
import numpy as np
from sklearn.linear_model import LinearRegression
sales = np.array([100,120,90,150,110,132,99,165,121,145.2,108.9,181.5])
time = np.arange(len(sales))
quarter = time % 4
features = np.column_stack([time, quarter==1, quarter==2, quarter==3])
model = LinearRegression().fit(features[:8], np.log(sales[:8]))
seasonal_naive = sales[4:8]
fitted_forecast = np.exp(model.predict(features[8:]))
print("Seasonal-naive holdout MAE:", round(np.abs(sales[8:]-seasonal_naive).mean(),3))
print("Seasonal-regression holdout MAE:", round(np.abs(sales[8:]-fitted_forecast).mean(),3))
final_model = LinearRegression().fit(features, np.log(sales))
future_time = np.arange(12,16)
future_quarter = future_time % 4
future = np.column_stack([future_time, future_quarter==1, future_quarter==2, future_quarter==3])
print("Next four forecasts:", np.round(np.exp(final_model.predict(future)),2).tolist())
print("Constructed example; a perfect holdout result is not a real-world accuracy claim.")

Recorded output

Seasonal-naive holdout MAE: 12.65
Seasonal-regression holdout MAE: 0.0
Next four forecasts: [133.1, 159.72, 119.79, 199.65]
Constructed example; a perfect holdout result is not a real-world accuracy claim.
Download all worked examples

Sources and further reading

Concepts are linked to primary teaching or technical sources. The business examples are illustrative applications, not reported client results.