Chocolate Easter eggs arrive on a grocer’s shelf about five weeks before the holiday. They get promoted in the final week and disappear again soon after. Easter moves from year to year, so the whole season shifts with it. It is a short window, and the few days before Easter and the holiday weekend itself are where the money is made.
Now suppose the eggs sold out in that final week before Easter, which is exactly what happens when a promotion works better than the buyer planned for. The till records a strong first day and then very little, because there is nothing left to sell. The customers who came in on the Friday and Saturday before Easter wanted eggs just as much as the ones who came at the start of the week, but they left no trace in the data. When next year’s forecast reads that history, it sees a promotion that barely moved, plans a modest order, and the shelf empties again. Each stockout shrinks the record of what customers wanted, and the next forecast orders against that smaller record. The shelf then empties sooner the year after, so the loop tightens with every season.
At The Forecasting Company we build t0, a foundation model for time series, and this loop is something we see in the sales histories our retail customers send us. Statisticians call the underlying problem demand censoring, since the available stock censors the demand you would otherwise observe, and it is costly precisely because stockouts land on the days that carry the most demand. The quieter days around them are the ones with stock available, so any attempt to fill the gap from those days understates what really happened.
We have taught t0 to read one extra column, a flag marking the days when the shelf was empty, and to treat the sales on those days as the least the demand could have been rather than as the demand itself. The chart below shows what that changes for one simulated store, over two sold-out Easters and the forecast for the third.
How much will customers want this Easter?
Chocolate Easter eggs, 200 g · simulated store
Easter 2023
Easter 2024
Easter 2025: history, then the forecast
In this store the buyer did what buyers do. In 2023 the promotion opened with 791 eggs sold and the shelf bare by the evening of the first day. The deliveries that followed sold out within hours, and the till ended the promotion week with 2,361 eggs recorded against 9,908 that customers wanted. In 2024 the opening order covered the first day, with 669 eggs sold to the 669 customers who wanted them. The shelf still ran empty on each of the six trading days that followed, and the till closed the week with 2,119 eggs against 8,174. Both models know when the 2025 promotion will run and what the prices will be, so the difference between their forecasts comes entirely from how they read that history. Chronos-2, even after imputing the sold-out days itself, forecasts about 390 eggs a day for the final week before Easter. t0 reads the recorded days as floors rather than peaks and forecasts around 700 a day, against the 850 or so that customers turn out to want. That is the difference between a buyer who orders for the promotion that actually happens and one who orders for the promotion the till remembers.
How t0 learned to read the flag
Retail forecasting teams already have ways of dealing with stockouts. Some remove the affected days or fill them with an estimate taken from comparable weekdays, and others use a forecasting model to impute the missing demand, forecasting each stockout day from the days before it and then treating those estimates as the history to forecast from. These approaches work well on products with plenty of clean history to draw on. They struggle when the informative days are the ones that sold out, because there is nothing left to borrow from, and a model imputing the first sold-out Easter has never seen an uncensored Easter for that product, so its estimate is modest and the following year inherits it.
We took a different route and taught t0 the meaning of the flag during pre-training. Across its training dataset, we artificially capped stretches of ordinary time series, marked the capped values, and trained the model to recover what lay underneath. At inference, a flagged observation tells t0 that demand was at least as high as the recorded sales, and the surrounding history and the known promotions and prices give it the context to work out how much higher. For a retailer this amounts to one boolean column alongside the sales history, which most inventory systems can produce, and nothing needs to be retrained or reconstructed on the customer’s side.
With the flag, t0 anticipated 76% of promotion-day demand. The best competitor pipeline anticipated 60%.
How much of the promotion the forecast saw coming
To measure the effect beyond one store, we built a simulated retail world with seasonal demand driven by prices and promotions, in which every store orders from its recorded sales with lead times and safety stock, so stockouts emerge naturally whenever an order turns out to be too small. Because the simulator also records what customers wanted, every forecast can be judged against demand, even on the days when the shelf was empty. The Easter eggs belong to a set of six calendar products, along with Halloween pumpkins, Christmas panettone and raclette, summer ice cream and a summer drink, each sold in twenty-five stores with two years of history in which every season sold out.
We compared t0 with Chronos-2 and TimesFM-3, giving every model the same promotion calendar and prices as known-future inputs, and we gave each competitor every stockout treatment a retailer might apply, from the raw sales to a history in which the model itself has imputed the stockout days. Every model, t0 included, was also told which days the product was not on sale at all, since any assortment system records this, so no model had to learn the off-season from ten months of zeros. We also tried the obvious shortcuts of handing the stockout flag to Chronos-2 and TimesFM-3 as one more input column, or of marking the stockout days as missing, and neither helped. A model that has never been trained on what such a flag means treats it as noise, so the value lies in a model that has learned to read the column.
For each model, the chart adds up the median forecast over every promotion day of the 150 store-products and divides it by what customers actually wanted on those days, so a large store weighs more than a small one. A forecast that overshoots would score above 100%, and no model here does.
How much of the promotion did each forecast see coming?
150 simulated calendar store-products · share of promotion-day demand in the central forecast
From raw sales, Chronos-2 and TimesFM-3 see 26% of the promotion coming and t0 sees 34%. The best imputation we could give Chronos-2 and TimesFM-3 lifts them to 60% and 53%. t0 with the flag sees 76% of it. Scored on the full forecast distribution over the following four weeks, t0 with the flag made 27% less forecast error on these products than t0 on raw sales. Measured against that same baseline, the best competitor pipeline, TimesFM-3 on a history it imputed itself, made 15% less.
The same reading of the flag helps on everyday products whose promotions sell out, even when the rest of the history is clean. The second store sells a sparkling lemonade all year round, and both of its earlier promotions, in April and July, emptied the shelf before they ended. For the promotion in early February, Chronos-2 forecasts a little under a thousand packs a day, which is about the best ordinary day the till saw, and t0 forecasts around 1,700 of the 1,900 or so that customers turn out to want.
What happens when the lemonade goes on promotion?
Sparkling lemonade, 1.5 L · simulated store
April 2023
July 2023
February 2024: history, then the forecast
What it puts on the shelf
Forecast accuracy is not what a category manager is paid on, so we let the forecasts drive the orders. Buyers order against a service level rather than against the average or median forecasted sales. On the 150 calendar store-products we therefore ran the replenishment policy itself for six weeks around each event, starting three weeks before it and building stock over the two weeks ahead of the season. Orders followed the 95% quantile of each forecast, with the same demand, lead times, safety stock and ordering rule for every model. TimesFM-3 could only be ordered against its 90% quantile, because its published inference stops there, which is itself a telling limitation for retail use. Each model re-forecast every day from the sales its own orders had produced, so better anticipation put more stock on the shelf, which in turn let the following days’ demand show through.
How much of the promotion-day demand reached the shelf?
150 simulated store-products · promotion days, within six weeks of replenishment around the event · same ordering policy at a 95% service level
The store's own rule, ordering from last week's sales, served 43% of promotion-day demand and sits below the scale shown.
With t0 told which days were stockouts, the shelves served 91% of the demand on promotion days, against 81% for Chronos-2 whatever we did to its history, 73 to 76% for TimesFM-3, and 43% for a simple reorder rule based on last week’s sales. Over the whole six weeks the same order holds, 92% against 84%, 77 to 80% and 54%. A model shown the true demand served 97 to 99%, which is the most this ordering policy allows, so the flag carried these stores more than half of the way from the best competitor to a perfect forecast. Imputing the stockout days made little difference to the competitors here, because a good ordering policy already reacts to a sell-out the next morning. What it cannot do on its own is plan for a promotion its forecast has never seen at full size, and that is exactly what the flag gives t0.
What this means for a retailer
We built the meaning of an empty shelf into the foundation model itself, so the capability comes with t0 and travels to every series a customer sends us, and all it asks for is a flag that inventory records already contain.