Library · Metric

The seasonal naive forecast as a benchmark

The seasonal naive forecast for next Monday is last Monday's value. It has no parameter and no training, and on seasonal data it is hard to beat. A model that does not clearly beat it has not earned its cost.

By , published

Definition

With a seasonal period m (7 for daily data with a weekly pattern, 12 for monthly data with a yearly one), the forecast for any future period is the last observed value of the same season:

ft+h = yt+h−m (repeating the last full season)

It is the scale used by MASE for seasonal series: a MASE of 1 is the in-sample error of this forecast. The M4 competition, on 100,000 series, reported every method against simple benchmarks of this kind.

Worked example

Two hundred series of two years of daily sales are simulated, each with a weekly pattern and a level that wanders. Six forecasts are made for the next eight weeks of each series, and their errors are averaged.

import numpy as np

rng = np.random.default_rng(34)
n, h, runs = 730, 56, 200
t = np.arange(n + h)
weekly = np.array([0.8, 0.9, 1.0, 1.0, 1.2, 1.5, 0.6])[t % 7]
dow = np.eye(7)[t % 7]

def poly_forecast(train, degree):
    Z = np.column_stack([dow] + [(t / n) ** k for k in range(1, degree + 1)])
    beta = np.linalg.lstsq(Z[:n], train, rcond=None)[0]
    return Z[n:] @ beta

names = ["mean of the history", "naive (last value)", "seasonal naive (last week)",
         "mean of the last 4 weeks, by weekday", "day-of-week + trend, degree 2", "day-of-week + trend, degree 6"]
mase = np.zeros((runs, len(names)))
for r in range(runs):
    level = 100 + np.cumsum(rng.normal(0, 1.0, n + h))          # the level wanders
    y = level * weekly * rng.lognormal(0, 0.08, n + h)
    train, test = y[:n], y[n:]
    forecasts = [np.full(h, train.mean()), np.full(h, train[-1]), np.tile(train[-7:], h // 7),
                 np.tile(train[-28:].reshape(4, 7).mean(0), h // 7), poly_forecast(train, 2), poly_forecast(train, 6)]
    scale = np.mean(np.abs(train[7:] - train[:-7]))
    mase[r] = [np.mean(np.abs(test - f)) / scale for f in forecasts]
for name, m, w in zip(names, mase.mean(0), (mase <= mase[:, [2]]).mean(0)):
    print(f"{name:38s} mean MASE = {m:5.2f}   at least as good as seasonal naive in {w:4.0%} of series")

Output, produced by running the code above when this page was built:

mean of the history                    mean MASE =  2.81   at least as good as seasonal naive in   0% of series
naive (last value)                     mean MASE =  2.54   at least as good as seasonal naive in   0% of series
seasonal naive (last week)             mean MASE =  1.07   at least as good as seasonal naive in 100% of series
mean of the last 4 weeks, by weekday   mean MASE =  0.96   at least as good as seasonal naive in  70% of series
day-of-week + trend, degree 2          mean MASE =  1.23   at least as good as seasonal naive in  46% of series
day-of-week + trend, degree 6          mean MASE =  2.12   at least as good as seasonal naive in  18% of series

The seasonal naive forecast is far ahead of the mean and of the last value. The trend model with six polynomial terms fits the history closely and is about twice as bad on the next eight weeks: a polynomial extrapolates away from the data. The only forecast that beats the seasonal naive on average is another benchmark, the mean of the last four weeks by weekday.

Where it misleads

  • It carries the noise of one single season into every forecast. Averaging the last few seasons gives a steadier benchmark that is just as simple.
  • It ignores trend and calendar effects. Around public holidays, or for a product that grows fast, it is a weak opponent and beating it proves little.
  • On intermittent series it mostly repeats zeros, and the relevant control is the zero forecast and the mean of the history.
  • A model can beat the benchmark on average and lose to it on the items that matter. Report the share of series where the model wins, with a paired interval.

The benchmark must be scored under the same protocol as the model: same origins, same horizon, same data available, see walk-forward validation.

In our work

Every forecast we deliver is reported against simple controls scored on the same windows. In our studies the controls are a forecast of zero, the last value and a moving average, and each method is given as a paired difference against a reference.

References

  1. Hyndman, R. J., Athanasopoulos, G. (2021). Forecasting: principles and practice, 3rd edition. OTexts, Melbourne. otexts.com/fpp3
  2. Makridakis, S., Spiliotis, E., Assimakopoulos, V. (2020). The M4 competition: 100,000 time series and 61 forecasting methods. International Journal of Forecasting, 36(1), 54-74. doi:10.1016/j.ijforecast.2019.04.014
  3. Hyndman, R. J., Koehler, A. B. (2006). Another look at measures of forecast accuracy. International Journal of Forecasting, 22(4), 679-688. doi:10.1016/j.ijforecast.2006.03.001

Have a question like this one on your own data? Tell us what you need in a few lines.

Send us the brief

Related pages

  • MASE: mean absolute scaled errorMASE compares the absolute error of a forecast with the error a naive forecast made on the history. Below 1, the forecast beats that naive benchmark. On series that are mostly zeros, a forecast of zero gets the best score.
  • The zero forecast as a baselineA forecast of zero for every item and every period is useless for stock and has the best absolute error on most intermittent series. Including it in a comparison shows at once whether the error measure can be trusted.
  • Walk-forward validationWalk-forward validation, also called rolling-origin evaluation, repeats one honest experiment: train on everything before a date, forecast what comes after, move the date forward. Shuffled cross-validation does not respect that order.
All library pages