What is time series forecasting?
Time series forecasting is the task of predicting future values of a quantity, such as demand, electricity load or cash flow, from past values measured at regular intervals and related factors.
Unlike ordinary regression, where examples are often treated as independent, time series values depend on each other, carry trend and seasonality and must be split by time without shuffling. Anomaly detection finds unexpected points in a series rather than forecasting.
- Topic
- Machine learning, models and training
- Also known as
- Forecasting
How time series forecasting works
- The series is examined by decomposing it into trend, seasonal and remainder components.
- Statistical methods such as exponential smoothing and ARIMA, machine learning such as gradient boosting or deep learning models are used.
- External factors such as holidays, campaigns or weather can be added as features.
- Models are tested from rolling origins using only data up to each point and reported with prediction intervals.
In more detail
Evaluation metrics and probabilistic validation
Forecasting models are evaluated with scale-aware or scale-free metrics such as MAE, RMSE, MASE and WAPE, because percentage metrics like MAPE break down when actual values approach or equal zero. For prediction intervals and risk planning, probabilistic metrics such as pinball (quantile) loss and CRPS measure how well uncertainty is calibrated.
Multi-step strategies and hierarchical reconciliation
Multi-step forecasting follows either a recursive strategy that feeds each predicted step back as input or a direct strategy that trains a separate model or output per horizon; the choice trades error accumulation against model complexity. In enterprise planning, forecasts across hierarchies such as SKU, store and region also undergo hierarchical reconciliation so lower-level sums match top-level targets.
Leakage from external drivers, lag features and stationarity
When adding exogenous variables such as weather or promotions, training and backtesting should use the forecasts that were available at prediction time rather than realised future values; otherwise target leakage inflates accuracy. Lag, rolling-window and differencing features, along with stationarity checks, reduce spurious correlations in trending series.
Time series foundation models and zero-shot forecasting
Pre-trained time series foundation models (TSFMs) such as Chronos, TimesFM and Moirai enable zero-shot or few-shot forecasting on new series with little historical data. In on-premise deployments, they serve as strong cold-start baselines, though domain-specific fine-tuning or gradient-boosted models with rich tabular features still often win when long, structured company history exists.
Commonly confused terms
| Term | How it differs |
|---|---|
| Nowcasting | Nowcasting estimates the current period or the very recent past from high-frequency leading indicators before official figures are published, whereas time series forecasting predicts values for future periods. |
Why time series forecasting matters for on-premises AI
Time series forecasting underpins planning in sectors such as energy, retail, telecoms and finance. Complex models are not always better: a study testing transformer-based models proposed for long-term forecasting found simple one-layer linear models beat them on all nine real datasets. Later patch-based Transformers largely closed the gap, yet starting from a simple baseline and proving a complex model against it remains good practice. Series behaviour changes over time, so models must be monitored and retrained.
For hourly load forecasting, an electricity distributor uses a seasonal statistical model as baseline, then compares a gradient boosting model with weather and holiday features from rolling origins, reporting both with prediction intervals.
Common questions
Why is time series data not split randomly?
Random splits put future values in training, inflating results. Splits follow time.
Is deep learning always better for time series forecasting?
No. Research shows simple linear and statistical models often match or beat complex ones.
Related terms
Sources
- Hyndman and Athanasopoulos, Forecasting: Principles and Practice
- Zeng et al., Are Transformers Effective for Time Series Forecasting?, 2022
In the glossary: Glossary, R to Z