Time-series forecasting is the use of models that read numbers recorded over time, such as daily sales, to estimate what those numbers will be in the coming days, weeks or months. Companies use it to plan demand, stock and cash. A dashboard can show what sold last week. A forecast estimates what will sell next week.
A time series is a list of readings, each stamped with the time it was taken. The page on time series data explains the idea. A forecasting model looks for three kinds of pattern in it. The trend is the slow rise or fall over months. Seasonality is a pattern that repeats, such as higher sales every summer or every Sunday. Events are one-off effects, such as a festival, a price cut or a transport strike. The model learns how much each pattern added in the past, and carries the patterns forward into the coming weeks.
Imagine a dairy company in Ahmedabad that sells curd and buttermilk through 40 depots across Gujarat. Curd stays fresh for only a few days. If a depot receives too little, shops run out on a hot afternoon. If it receives too much, the extra curd is thrown away.
The company's data warehouse holds four years of daily sales for each product at each depot. That is 40 depots, two products and about 1,460 days, which comes to over 1 lakh numbers. The forecasting tool adds the daily temperature and the dates of past price changes and festivals. For the depot in Surat, the model finds that buttermilk sales rise about 6% for each degree above 35°C, and about 15% on Sundays.
Every evening, the model forecasts the next 14 days for each depot. It gives a range, not a single number. For the Surat depot next Tuesday, it estimates 9,200 litres of buttermilk. It also says that sales will very likely fall between 8,400 and 10,100 litres. For buttermilk, which sells out fast in the heat, the planning team sends enough for the upper end of the range. For a product that spoils quickly, it sends closer to the middle.
How does the company know that the model is any good? It tests the model on the past. It hides the last three months of sales, asks the model to forecast them and compares the forecast with what actually sold. This is called backtesting.
Other teams then use the same forecasts. Supply-chain planning uses them to decide how much milk to process each day. Financial planning and analysis (FP&A) turns the expected sales into expected cash. Banks use the same method to estimate how much cash each ATM will need. The general idea of predicting sales is called demand forecasting.
How is this different from automated machine learning (AutoML)? AutoML builds a prediction model from any table of data. Time-series forecasting tools are built for one kind of data: numbers in time order, where yesterday's value helps to predict tomorrow's.