Contact us
Back to knowledgebase

Seasonality

Seasonality is a recurring calendar pattern in demand, supply, or another business activity. In retail, a season often outlasts the products sold during it. A forecast for a new item can draw on the timing of earlier seasons even when there is little reason to expect the same sales volume.

Four shipment histories

The original chart shows weekly shipments from a large European retailer’s warehouse. Each row follows one product on its own quantity scale. Red records shipments, purple shows the forecast made at the time, and the gray vertical lines mark January 1.1

Four warehouse shipment histories on separate scales. The first three span several January markers. The fourth begins just before the last January, leaving no previous year to compare.

The first three products have 159 weeks of history apiece. Cover the forecast in the fourth row and there is scarcely half a year to go on. A demonstration restricted to items with three winters on record would exclude precisely the products for which a buyer has the least experience. Even for an established item, a peak in this chart dates the filling of store shelves. Shoppers may have come weeks later.

Which calendar governs the transaction?

Business records also follow the hour, the day of the week, and the day of the month. A sandwich counter has its lunch rush. A grocer may do his best retail trade on Saturdays while his wholesale customers collect on weekdays. At month-end, a sales department chasing its targets can put a week’s orders on the road in two days. The transport manager has every reason to book the trucks. A retailer who extrapolates household consumption from those shipments may spend the first week of the next month working off the excess.2

A branch selling 10 units a day, Monday through Saturday, records 240 units in a 28-day February and 270 in a 31-day March with four Sundays. The extra 12.5% is real merchandise to be supplied. All three extra trading days belong in the March forecast, but there is no reason to raise the daily sales rate. A Sunday closure belongs in the calendar too. A zero in the till at a closed shop says little about what it would sell if it opened.

Moving holidays

Easter Sunday fell on March 31 in 2024, April 20 in 2025, and April 5 in 2026 in the Western calendar. Put the same three seasons of gift-box sales on a March–April calendar and the peaks fall weeks apart. Count back from Easter and they coincide on the preceding Saturday. Their heights still differ.

Three illustrative years of gift-box sales peak on March 30, April 19, and April 4. Aligning the same daily sales to Easter places all three peaks on the preceding Saturday, at 74, 63, and 81 boxes.

How much of the peak belongs to Easter? Saturday may already be the shop’s busiest day. Ordinary Saturdays with comparable opening hours give a reference for measuring the extra Easter trade. Applying a weekend multiplier to the entire observed peak would count Saturday twice.

Easter is quasi-seasonal. Its date moves, but the confectioner can enter next year’s date in his forecast today. He then needs to estimate how early the buying starts and how abruptly it ends. The calendar must be local. Mother’s Day differs between countries, and school holidays can differ across the street if it marks a district boundary. Even December 24 gives a shop quite different trading hours when it falls on a Sunday.

The date of spring’s first hot weekend is another matter. Suppose it brings 60 extra sales at a garden center and is equally likely to fall in either of two weeks. The average is 30 extra units in each week. Give each week an independent 50% chance of a rush, however, and a quarter of the simulated springs have two first hot weekends. Another quarter have none. A probabilistic forecast can draw the date once and put all 60 sales in that week. Once the rush has passed, the buyer can take it out of the following week’s order. A local weather forecast may arrive in time to transfer stock between stores, months after the factory order was due.3

What a seasonal index measures

A seasonal index expresses sales at one point in the cycle as a multiple of the underlying sales level. A shop that ordinarily sells 20 boxes a week expects 30 in a week with an index of 1.5. Working backward, 30 sales that week give a deseasonalized estimate of 20. Taking the observed 30 as the new level and applying the multiplier again would give 45.

The classical calculation estimates the level with a moving average over a full year, divides each observation by its local level, and averages the ratios for comparable weeks. The resulting indices are scaled to average one over the cycle. This fixes an ambiguity in the units. Fifteen boxes times 2 explains the same 30 sales as twenty times 1.5. Keeping the level and calendar separate also lets a forecaster revise one without discarding the other. If a competing shop closes, the surviving shop may gain customers and still do the same proportion of its trade at Christmas.4

For an Easter-only collection, a summer sales rate of zero makes a poor denominator. Estimate the total trade over the selling season and the share that falls in each week. If the collection will sell 200 boxes and 40% go in the final week, that leaves 80 boxes for that week. A late Easter can move those 80 into April without adding a single sale.

Suppose a ski shop discounts its jackets every February, sells them at full price the rest of the winter, and sees sales double during the sale. How many jackets would it sell at full price next February? Attributing the whole increase to the month fits the record just as well as attributing it all to the discount. Ten more winters on the same pricing schedule would leave the question open. A branch that delayed its sale by two weeks could be worth more to the forecaster than all ten. Style age poses the same difficulty if every jacket in the record launched in September.

A stockout hides the height of a peak. A shop puts twelve Easter boxes on display and sells the last one at noon. The till records twelve whether customers wanted twelve or thirty. Given the daily count and a sellout flag, that day’s contribution to the likelihood is the probability that demand reached at least twelve. The hour of the last sale is worth keeping. A shelf emptied at noon leaves more trade unobserved than one emptied five minutes before closing. Treating twelve as exact demand teaches the model the capacity of the shelf. Dropping every sellout removes some of the busiest days from the sample.

Borrowing a season for a new product

Recording the fourth product in the shipment chart by the day would give more rows and still no second winter. The rest of the catalog offers evidence the item’s own history lacks. Last year’s gift box may have disappeared, but people still buy chocolate for the same occasion.5

A shop sells eight boxes of a new design four weeks before Easter. It has two comparisons from last year, when all lines stayed in stock at regular prices. Established gift boxes rose from 10 sales to 30 by the final week. Everyday bars held steady at 90, so the whole aisle went from 100 to 120. Those ninety bar sales make the aisle look reassuringly stable. They also give everyday chocolate buyers most of the weight in a forecast for an Easter gift.

Two forecasts start at eight gift boxes sold four weeks before Easter. The gift-box profile triples to 24 in the final week. The flatter whole-aisle profile reaches 9.6.

Pooling lets the new box start with the gift family’s profile, then acquire its own as sales accumulate. A buyer can maintain one calendar of holidays and closures through several changes of assortment. A separate Easter setting for every SKU would have to be guessed afresh with each launch.

There is a limit to what the family profile can tell the buyer. It gives 24 expected sales for the new box. If the principal novelty is the wrapping, some of those customers would have bought the old box. Leaving the old design’s forecast intact budgets for both purchases.6

In the Walmart M5 Uncertainty competition, Lokad used department sales within each store to estimate weekday and month-of-year factors. Even an item that sold only occasionally could borrow a Saturday effect from its neighbors. The resulting forecasts placed first at the item–store level and sixth overall. M5 scored sales. With no stock records, it could give no credit for correctly anticipating customers who went away empty-handed.7

Learning the indices with autodiff

In Envision, Lokad’s supply chain programming language, an autodiff block can fit one index per family and week before Easter. Each row of Obs records one item in one shop for a week it spent in stock at its regular price. The baseline is given and positive. It is the number of units the shop would expect at the reference week’s rate over the same number of trading days.8

table Slots = by [Obs.Family, Obs.WeeksBeforeEaster]
Slots.Base = sum(Obs.Baseline)
Slots.Sold = sum(Obs.Sold)

autodiff Slots epochs:400 with
  params Slots.LogIndex auto(0, 0)
  expected = Slots.Base * exp(Slots.LogIndex)
  return expected - Slots.Sold * Slots.LogIndex

Slots.Index = exp(Slots.LogIndex)

The index starts at one. The return line gives the Poisson loss up to a constant. Its derivative with respect to the log index is expected units minus units sold, so the fit balances those totals within each group. Two gift lines with baselines of 2 and 18 boxes sell 6 and 18. Together they give an index of 24/20 = 1.2. Averaging their individual multipliers, 3 and 1, would predict 40 boxes where the shop sold 24. The pooled estimate still gives the smaller line only 2.4 boxes. A discrepancy that persists over several Easters is grounds for splitting the group.

Here division gives the answer directly. Automatic differentiation becomes useful when daily sales must teach the model an item’s level, the shop’s weekday effect, and the family’s Easter profile together. Envision differentiates the whole expression. Each profile needs a reference, since doubling the item levels and halving all the Easter multipliers leaves the forecasts unchanged. For a family with just one pre-Easter week and no sales, the loss above drives the index toward zero. A penalty on the squared log index pulls it back toward one. A single quiet week then carries less weight in next Easter’s forecast.

The last order before the peak

Two cartons can spend exactly two days on a truck and have very different lead times. The difference is the wait for dispatch. A holiday closure at the supplier can cost the buyer his last full-price selling week.9

The gift-box supplier below takes orders until noon on Friday, dispatches on Tuesday, and delivers on Thursday. In 2026 it skips the March 31 dispatch. Waiting one week to order delays delivery by two weeks, from March 26 to April 9. The shop clears its Easter stock after Saturday, April 4.

A March 20 order arrives March 26. The March 27 order misses the canceled March 31 dispatch, ships April 7, and arrives April 9. Both trips take two days. Only the first arrives before the April 4 selling deadline.

What is the last carton worth? Twelve boxes cost $60 landed. Each fetches $9 before Easter and $2 on clearance. Suppose eight customers would still want a box after the stock already on hand sells out. In time for those customers, the carton brings in $80 and earns $20. Late, it brings in $24 and loses $36. With those two possible payoffs, the buyer needs a better than 9 in 14 chance of getting the carton there in time, about 64%.

Suppose there are eight extra buyers on three Easters in four and none on the fourth. The carrier also delivers on time three years in four. Those two figures alone cannot tell the buyer whether to order.

Late delivery Cartons earning $20 Mean profit per carton
Quiet year 3 of 4 +$6
Busy year 2 of 4 −$8

In the second case two cartons go straight to clearance. One reaches the shop after its customers have left. The other arrives on time in a year when nobody wants it. For this purchase, whether the Easter rush also holds up the truck is worth investigating.

Testing a season at the order date

A backtest of the March 20 order can use the dispatch calendar and other information the shops had by that Friday. Fit the annual profile on earlier Easters. For a new design, choose its peers with the assortment information available at launch, then reveal only the sales already in the till by the order date. A random split of transactions lets sales from the very Easter under examination into the fit. Five hundred shops in a region all lived through the same unusually warm Easter.

Run the purchase twice on that Friday’s information, once with the Easter profile and once using the same recent sales rate without it. If both runs order the same cartons, a closer forecast earns the buyer nothing on this occasion. Where the orders differ, price the extra cartons through clearance. A carton left on the shelf has an observable markdown cost. The sales a larger order might have captured after a stockout still have to be estimated.

Sources


  1. Seasonality Illustrated gives the original shipment chart and explains the choice of the fourth product. ↩︎

  2. Introduction to Supply Chain, §7.4.1, “Momentum and cyclicities”. Weekly/Monthly Aggregation Is a Lossy Process discusses what disappears when transactions are bucketed. ↩︎

  3. How to Forecast Seasonality discusses seasons that start or finish early. See also Introduction to Supply Chain, §5.4.6.2, “Weather data”. ↩︎

  4. Probabilistic Exponential Smoothing for Explainable AI discusses retaining a seasonal profile when a disruption invalidates another part of a model. ↩︎

  5. Width vs. Depth: Rotate Your Sales Forecasts by 90 Degrees develops the case for looking across an assortment. ↩︎

  6. Forecasting New Products discusses cannibalization between collections. ↩︎

  7. Rafael de Rezende, Katharina Egert, Ignacio Marin, and Guilherme Thompson, “A white-boxed ISSM approach to estimate uncertainty distributions of Walmart sales,” International Journal of Forecasting, DOI 10.1016/j.ijforecast.2021.11.006. The M5 lecture explains the calendar factors. The competition report describes the data. ↩︎

  8. The lecture Structured Predictive Modeling for Supply Chain shows how to share calendar effects across items. The Envision demand forecasting workshop fits seasonal profiles and item-level parameters together. ↩︎

  9. Why You Should Forecast Lead Times discusses recurrent supplier delays around Chinese New Year and their consequences for purchase orders. ↩︎