Contact us
Back to knowledgebase

Time Series

A time series is a sequence of observations indexed by time. In mainstream supply chain practice, it is also the starting point and the end product of planning. Past sales are laid out by item, location, and week. The forecaster fills in the weeks ahead. Purchasing and production draw up schedules to match, and management compares actual sales and shipments with the agreed curves. Behind this procedure lies a strong assumption. Once the company knows how many units it will sell in each period, the remaining task is to organize their supply. Much of what a buyer does for a living falls outside that assumption.1

One sales history on two scales

Four years of unit sales on linear and logarithmic vertical scales, with a magnified view of first-year sales by quarter.

The opening chart gives three views of growth. The linear scale shows how many more units the warehouse must handle. On a logarithmic scale, a rise from 10 to 20 has the same height as one from 100 to 200. Zero itself has no logarithm, a nuisance when plotting a spare part that sells on only a few days each year. The inset reveals variation that looks almost flat beside year four. Changing the scale lets a reader recover the early quarters. No change of scale can recover the orders behind them.

When the forecast becomes the plan

A familiar forecasting exercise gives the student three years of weekly sales with the last few weeks hidden. Success consists in recovering the missing numbers. In the equally familiar inventory exercise, expected demand is already printed at the top of the problem. The student must find the cheapest way to supply it. Put the two exercises together and they appear to cover the whole profession. The first student produces the figures the second student needs. Neither gets to ask whether the item should still be on sale, or what will happen to its sales if the company changes its price.

The same division of labor is built into planning software. A reporting system can produce ten thousand rows of weekly SKU sales. The forecasting engine returns ten thousand rows in the same format. In sales and operations planning (S&OP), the departments reconcile those rows into a common baseline. Finance can value it, the factory can reserve hours against it, and the next monthly meeting can review deviations. A sales manager who gets a higher figure approved may secure a larger share of a scarce production line. His argument with the forecaster can be entirely rational even if neither man has learned anything new about customers.2

Consider a retailer choosing a price for a backpack. He reckons he can sell 80 at $90 apiece or 100 at $65. At a landed cost of $50 each, the first offer yields $3,200 of gross margin and the second $1,500, assuming he buys just what he sells. Once a 100-unit sales target has been signed off, the markdown achieves perfect adherence at a cost of $1,700 in forgone margin. The mistake occurred before anybody scored the forecast. Sales at the two prices are answers to two different questions. The planning meeting asked for one number while the price was still open.3

A weather forecaster can publish his estimate without changing tomorrow’s temperature. The retailer who acts on his sales forecast changes the price his customers will see. Even two columns labeled “receipts” mean different things on either side of today. Last Friday’s receipts are facts. Next Friday’s expected receipts may include a noncancelable order in transit, a second that the supplier will let the buyer cancel until noon, and a third penciled in by the planner. All three fit in one cell. Only one requires a phone call before noon. A forecast precise to the nearest unit would still give the buyer no way to identify it.

How a transaction gets a date

“Units per day” sounds like a measurement. In a business system it is the answer to a query. A customer orders twelve seals on Monday for delivery on Wednesday and receives them on Friday. All twelve belong to Monday when measuring order intake, to Wednesday on the customer’s requirement schedule, and to Friday when reporting deliveries. Assign everything to the invoice date and a month-end billing run can appear to be a surge in demand. The accountant and the dispatcher can each have an accurate series while disagreeing about which month the seals belong in.

Even the arithmetic depends on the question. Shipments are a flow. Adding the daily counts produces the week’s shipments. Stock on hand is a balance. Five seals on Monday night and the same five on Tuesday night leave five available on Tuesday. Summing the snapshots counts the same stock twice. A percentage requires its denominator. A depot that fills one order out of one on Monday and nine out of nineteen on Tuesday has filled ten of twenty orders over the two days. Averaging the daily percentages would report nearly 74% instead of 50%.

What to draw between observations

A bar for twelve shipments says that twelve units left during the interval. A line drawn between Tuesday’s and Wednesday’s closing stock suggests a path the rack need never have followed. A warehouse can open with six seals, run out at noon, and close with six after the afternoon delivery. Joining the two balances with a horizontal line erases the hours when no order could ship. A step plot reconstructed from the issues and receipts can show them, as precisely as the posting times allow.

The choice of bucket matters even with perfect records. A promotion that runs over the last weekend of January can lift two monthly totals. A buyer looking at the monthly curve might see two months of healthy growth where the shop had four days of bargain hunters. The daily transactions still allow a monthly report when the accounts close. There is no corresponding operation on the two monthly totals that recovers the weekend.4

Twelve requests or one order?

A parts depot has six pump seals on the shelf and requests for twelve. No more stock will arrive before dispatch. If twelve workshops each order one seal, the depot can serve six of them today. If one contractor needs the dozen to overhaul a machine, he may refuse a partial shipment. Both order books show twelve units due.

Six seals fill six of twelve individual packages. The same six seals occupy only half of one twelve-seal overhaul kit. With whole orders required, the first packing bench can dispatch six units and the second none.

For the individual orders, the seventh seal serves one more customer. For the overhaul, the seventh seal releases nothing today, while the twelfth releases all twelve. A forecast that assigns a 100% probability to daily demand of twelve units is quite consistent with either situation. Putting a probability distribution around the daily total cannot identify the size of an order. The order lines once contained that information.5

A daily count of orders would distinguish these two cases. Yet two orders for six apiece and two orders for one and eleven give identical totals for both units and orders. With six seals on hand, the first order book can ship six and the second just one. Both examples assume the depot records incoming requests. If it keeps only dispatch notes, the original twelve-unit overhaul order can disappear from the history altogether.

There is a longer-lived risk in the same example. If one maintenance contractor accounts for all twelve seals every week, losing his contract can turn a fast mover into dead stock overnight. If a dozen unrelated workshops each take one, the loss of one account has a different consequence. Counting orders helps with dispatch. Keeping the customer identifier helps with the exposure on the next purchase. Twelve invoices raised by the same contractor do not diversify that exposure.6

Across products, the receipt itself matters. A gasket sold with a pump can account for very little revenue and still be the reason a customer takes a complete pump order elsewhere. Separate histories for pumps and gaskets conceal which items shared a basket. Keeping the basket makes joint purchases observable. To estimate the sales lost when the gasket was missing, the retailer also needs evidence about availability and what similar customers bought when both items were offered.

A buyer places two orders for twelve seals, one on Monday and one on Thursday. Twelve arrive the following Monday and twelve the following Thursday. The buyer now has two perfectly accurate daily series, one for orders and one for receipts. What lead times did the supplier achieve?

Order slips on days zero and three connect to crates on days seven and ten. Above the dates, both journeys take seven days. Below, order B reaches the dock first in four days, while order A takes ten.

Both histories average seven days. Only one has ever delivered in four. Matching each arrival to the oldest open order manufactures two punctual deliveries if the second order actually overtook the first. In that case, a buyer waiting for the first order on the second Monday still had three days to wait. Adding more decimal places to the average achieves little. The purchase-order line referenced on the goods receipt settles the question.

Today’s open orders matter just as much. Suppose a supplier has delivered nine orders in four days each and a tenth, placed twelve days ago, is still outstanding. A chart indexed by receipt date will faithfully report four days for every completed order. The buyer already knows something else about the tenth delivery. Its lead time exceeds every value on the chart. An estimate of the remaining wait should use the twelve days already elapsed. Silently dropping open orders makes a deteriorating supplier look reliable just when the buyer needs to act.7

What yesterday’s curve can predict

Two features of commercial histories are usually worth the forecaster’s attention. The first is momentum. If a shop has been selling twenty seals a week, its own recent sales provide a better starting estimate than the average across every spare part it carries. The second is the calendar. Workshops order on working days, stores trade on Saturdays, and a warehouse with a Friday dispatch cutoff carries late orders into Monday. Seasonal effects can often be estimated across shops or related parts, even when a particular part has seen only one winter.8

There is a limit to what another lag or a more elaborate trend can extract. A supplier’s notice that a seal will be withdrawn in June can be worth more to its buyer than ten years of sales. A week before the depot introduced the part, a week in stock with no takers, and a week after the depot stopped carrying it can all end up as a zero in the same spreadsheet. Only in the middle week did customers have the opportunity to buy.

Once forecasting has come to mean forecasting unit sales, an improvement usually means a smaller error on the same set of numbers. A dispatcher may have a quite different use for a forecast. Suppose two suppliers each have a 50% chance of having one pallet ready for Friday’s truck. Every pallet released must ship that day. The dispatcher has one space booked. On Thursday he can reserve a second for $30. An unreserved second space costs $100 on Friday. Whether the reservation pays depends on how the suppliers get their goods through inspection.

Release rule Both ready Net saving
Both or neither 50% +$20
Exactly one 0% −$30

Under the shared inspection, the reservation saves $100 on half the Fridays and costs $30 every time. Under the single-slot rule, the second space always travels empty. Even the expected load is identical at one pallet. Drawing each pallet’s readiness independently would give a 25% chance of needing the space, too low to justify the reservation. That calculation would turn down a booking worth $20 on average under the shared inspection. A probabilistic forecast can preserve the dependency by drawing the inspection outcome once for the whole truck.9

The dispatcher can test the booking rule on later Fridays. For each Thursday, make the reservation using only information then available and price it against Friday’s actual releases. The release notices matter here. A manifest for a truck with one space shows at most one pallet, however often two were ready.

What belongs in the planning software

Start at the commitment the company can still change. On Thursday the dispatcher can buy one more space on Friday’s truck. To value it, he needs the possible inspection outcomes and the freight bill for each booking under each outcome. Expected weekly pallet volume is easy to calculate afterward. Starting with that volume and trying to work backward to a reservation is how the two very different suppliers end up looking identical.

For the seals, the corresponding records are the customer’s order lines and terms for partial delivery. For inbound stock they are the purchase orders, their open balances, and the receipts booked against them. With those records, a buyer can ask an everyday question such as what it would cost to complete an overhaul order by Friday. Once everything has been reduced to daily totals, the software can answer a much larger number of less interesting questions about the shape of the curve.

Lokad’s first commercial forecasting engine, launched in 2008, chose a forecasting method for each series. One more day of sales could tip the selection from one method to another and abruptly change the forecast for an otherwise uneventful item. Stabilizing the selection could address that defect. No choice among those methods could tell the depot which orders had to ship whole. The engine was retired in 2020.10

A time-series database can store the weekly charts efficiently. Trouble begins when the planning interface accepts only an item code, a date, and a quantity. A planner who then keeps a separate spreadsheet of overdue orders, large customers, and shared loads is reconstructing facts the company had before the data reached the forecasting engine. Keeping those facts upstream is a better use of engineering effort than asking the planner to correct the curve by hand.11

Sources


  1. Introduction to Supply Chain, §7.2.2, “Time-series paradigm,” and §7.2.4, “Limits of planning.” ↩︎

  2. Introduction to Supply Chain, §7.2.3, “Planning through time-series,” and §7.2.5, “Bureaucratic appeal.” ↩︎

  3. Time in Supply Chain: Why the Future Is Not a Mirror of the Past develops the distinction between a past observation and a future commitment. See also §7.4.8, “Functional forecasts,” in Introduction to Supply Chain. ↩︎

  4. Weekly/Monthly Aggregation Is a Lossy Process traces two apparently strong months back to short sales spikes. ↩︎

  5. The Tyranny of Time Series examines baskets, repeat customers, and capacity shared between orders. ↩︎

  6. Risks in Supply Chain Management discusses the inventory exposure when a major customer leaves. ↩︎

  7. Lead Time Forecasting discusses variability in supplier deliveries. ↩︎

  8. Introduction to Supply Chain, §7.4.1, “Momentum and cyclicities.” ↩︎

  9. Introduction to Supply Chain, §7.4.7, “High-dimensional forecasts.” The lecture Structured Predictive Modeling for Supply Chain covers forecasting targets beyond demand. ↩︎

  10. Classic Time-Series Forecasts (2008) documents the engine’s model selector and the reasons for its retirement. ↩︎

  11. Beyond Time-Series relates the limits of the planning software to the continued use of spreadsheets. ↩︎