Building a Modular Demand Forecast: How We Made Testing New Ideas a Breeze

Jessie van Schijndel20 Oct 2026

Problem

Picnic, an online grocer, schedules drivers and orders stock from one forecast: customer deliveries per hub and delivery date, up to 14 days ahead. The old model relied on confirmed deliveries (orders already placed) as its strongest feature. That made it a black box that was hard to backtest, so each idea needed weeks of shadow deployment. It also fell whenever a delivery window closed for lack of capacity, yet the business needs unconstrained demand.

Example from the article: A closed slot stops the growth of confirmed orders and drags the old forecast down. When Monday morning is full, some customers order for Monday afternoon instead, which inflates demand there.

Solution in brief

Remove confirmed deliveries from the model and rebuild their signal from a median "α curve": the share of final deliveries confirmed at each hour before cutoff. A remainder model corrects the forecast toward the orders actually received. Non-negative least squares (NNLS) strips closures and spillover out of history to give unconstrained targets, and every part can be rebuilt historically, so backtests run at scale.

Questions this case answers
  • How to forecast the demand that would have occurred without capacity limits when the history only records constrained, partly censored outcomes
  • How to replace a strong but non-reproducible input feature with explainable components so that every model change can be backtested at scale
  • How to forecast unconstrained demand when order windows close and confirmed orders understate what customers wanted
  • How to make a forecasting model backtestable so a new idea can be evaluated in hours instead of weeks of shadow deployment

Tools and methods

  • Temporal Fusion Transformer (TFT) — base multi-horizon forecaster
  • Time-Series Dense Encoder (TiDE) — cheaper model, used as a five-model ensemble
  • Modelled α curve — median share-confirmed curve per hub, weekday and daypart
  • Remainder model — corrects the forecast with actual orders
  • NNLS — reconstructs unconstrained demand and spillover
  • Backtesting (WAPE, WPE) — evaluation against the unconstrained target
Continue reading — it's free

Google or a one-time email code. No password.