Time series forecasting is used to predict what will happen in the future. There are many reasons to forecast what will happen. Sometimes we need to forecast demand so that we can resource services at an appropriate level or may want to forecast when supplies are abundant so that we can purchase them at a favourable price. In an hospital emergency department we may want to forecast demand to ensure that sufficient staff are available to cope with arriving patients; a supermarket may want to forecast when products are most popular to manage stock levels; and, a commodities broker may want to forecast when prices will be high and low to maximise profit. Accurately forecasting the future is an essential part of everyday life.
Most activity is driven by behaviours in the underlying population or environment. Some of these behaviours will change in a predictable manner. We know that demand for ice cream will be higher when the weather is hotter; that people travel to work in the morning; and, food is more abundant after the autumn harvest. Identifying these predictable behaviours gives us the ability to forecast what will happen in the future.
The process of identifying behaviours within the time series is decomposition. This splits the time series into constituents components with common characteristics. Typical components are:
- Trend: The trend is the change in the average value of the time-series.
- Cyclical: Cyclical components are repeating components within the time-series that do not have a fixed frequency. Examples are typically driven by feedback within a system such as business cycles where periods of growth driven by investment are followed by periods of recession as poor investments are culled from the market.
- Seasonal: These are components with fixed periods of repetition, often repeating daily, weekly or annually.
- Residual: After removing the other components the residual is that component of the time-series which is noise and varies randomly.
There are multiple ways of forecasting each of these components forward many of them backed by years of research. Common forecasting approaches include exponential smoothing, ARIMA, GARCH, with or without various adjustments such as seasonal decomposition. Recently, significant advances have been made in algorithms, machine learning and artificial intelligence which has increased interest in time series forecasting. New tools such as NeuralProphet, Nixtla, Orbit and GluonTS make it even easier to create forecasts using these algorithms.
The biggest shift in forecasting is an increasing emphasis on probability-based forecasting. The simplest form of forecast, a point-based forecast, only provides an expectation of the most likely value at any time in the future. However, this single value cannot capture the range of possible values that may occur. It is more likely that a future value will have a range of possible values. Communicating this range to decision makers provides more information about the future risk and opportunity leading to better decisions.
Historically, time-series forecasting algorithms were either unable to create prediction intervals or produced intervals which were unsuitable for decision making. The algorithms either under-estimated the variance in the residual or assumed that the variance is normally distributed. Both lead to errors in the calculated prediction intervals, which can have serious consequences for organisations that rely upon them. Ideally, we want the prediction intervals from the model to be both valid and efficient; valid in the sense that a guaranteed percentage of values will fall within the prediction interval, and efficient because the width of the prediction interval is minimised.
Conformal prediction is a technique which is rapidly gaining popularity within the data science community. This calibrates the prediction intervals using the model and past data to guarantee that forecast values fall within the prediction intervals. Conformal prediction applied to time-series forecasting gives decision makers greater confidence that the prediction intervals provided with the forecast are meaningful and accurate.
What is in your future?
Time-series forecasting is a critical and important competence for most organisations. The ability to anticipate future demand, supply and pricing and any associated risk is essential for meeting both the expectations of customers and stakeholders. The range of tools and algorithms available to use an ever increasing pool of data continues to grow; with exciting developments in machine learning and probabilistic-forecasting.
Tanzo Creative continues to monitor the latest academic research and tools, adopting them in projects such as forecasting demand for acute hospital emergency departments, and demand for call-centre services. If you have a project then contact us to find out whether we have a solution for you.