Schema: eine gemessene Zeitreihe wird in drei übereinander dargestellte Kurven zerlegt – langfristiger Trend, wiederkehrende Saisonkurve und unregelmäßiges Rauschen.

Time Series

A time series is a sequence of measurements recorded one after another at fixed points in time, such as the daily closing price of a stock. Because the order of the values carries meaning, such data requires its own analysis and forecasting methods.

A time series is a sequence of measurements recorded at consecutive points in time. One example is the outdoor temperature, read every day at noon. Another is the closing price of a stock on every trading day. What matters is that each value belongs to a timestamp and the order must not be swapped. This is precisely what distinguishes a time series from an ordinary table. In a list of students with their heights, the order plays no role. For temperatures over the course of a year, however, a scrambled order no longer makes any sense.

Why order changes everything

Values in a time series almost always depend on their predecessors. Tomorrow’s temperature is usually close to today’s. A shop’s revenue in December tends to resemble last December more than last June. This dependency is called autocorrelation. It is the reason why many standard statistical methods cannot simply be applied here.

Time series are practically important above all because people want to use them to look into the future. Grid operators need to know how much electricity will be needed tomorrow at 6 p.m. An online retailer wants to estimate how many winter jackets to stock in October. A bank checks whether the price movement of a security is still within normal range. All of these questions rely on time series data.

A common mistake is to read causes directly out of a time series. Two curves can run parallel for years without one causing the other. Rising ice cream sales and rising numbers of sunburns are both tied to the weather, not to each other. In time series analysis, such a case is called a spurious correlation.

Telling trend, season, and noise apart

The usual first step is to decompose a time series into its components. The trend is the long-term direction, for example electricity consumption rising over years. Seasonality is a regularly recurring pattern, for example higher consumption every winter. What remains afterward is called the residual or noise. This decomposition makes it visible whether an increase is real or merely due to the season.

For forecasting there are two families of methods. Classical statistical models such as ARIMA prescribe a formula in which the next value is calculated from the previous values. They require little data and are easy to follow. Machine learning models instead learn the pattern themselves from many examples. These include neural networks specifically built for sequences.

A strict rule applies when evaluating such models. Only data from the past may be used for training, and testing must be done on later time periods. Anyone who randomly picks points from the middle gives the model a glimpse of the future. The result then looks excellent but fails in real-world use. Experts call this data leakage, meaning leaked information.

From the fitness tracker to the inflation forecast

In everyday life, almost every connected device generates time series. A smartwatch stores heart rate every second. A solar inverter on the roof logs power output. A phone records battery level throughout the day. The graphs in these apps are nothing other than time series displayed visually.

In economic news, time series are the basis of almost all the figures mentioned. Inflation rates, unemployment rates, and incoming orders are collected monthly and compared with the previous month or the same month a year earlier. The qualifier seasonally adjusted means that the recurring annual pattern has been factored out.

In industry, time series serve predictive maintenance. Sensors measure a machine’s vibration and temperature, and a model raises an alarm if the pattern deviates from the norm. Data centers that monitor server load work in a similar way. For some time now, there have also been foundation models for time series: large pretrained models that deliver forecasts for new datasets without having been specifically trained for them.

Subscribe free. Unsubscribe the second it sucks.

High-signal news across AI, business, UX, and tech. Every morning.