Time-Series Forecasting Algorithms logopeterindia.netForecasting Algorithms
Home / Data Analytics / Time-Series Forecasting Algorithms
Data analytics · 2026

Time-Series Forecasting Algorithms

From a seasonal naive baseline to ARIMA, gradient boosting and pretrained foundation models: how each algorithm works, where it shines, what to watch for and how to judge a forecast.

18Algorithms
5Families
7Python libraries
01Baselines

Naive, seasonal naive & drift

Forecast the last value, the value from the same season last cycle, or the last value plus the average historical change.

Strength
Zero tuning, instant, and a benchmark every other model must beat.
Watch out
Cannot capture trend changes or relationships between series.
Best for
Setting a baseline and sanity-checking fancier models.
02Baselines

Moving average & decomposition

Smooths a series, or splits it into trend, seasonal and remainder components (classical and STL decomposition) that can each be forecast.

Strength
Explains what is driving the series; STL handles changing seasonality.
Watch out
Plain moving averages lag turning points and give no real forecast on their own.
Best for
Exploring patterns and removing seasonality before modelling.
03Statistical

Exponential smoothing (SES, Holt, Holt-Winters, ETS)

Weights recent observations more heavily. Holt adds a trend, Holt-Winters adds seasonality, and ETS frames the family as state-space models with prediction intervals.

Strength
Strong, fast, interpretable; often wins on short, regular business series.
Watch out
One series at a time; weak with many external drivers.
Best for
Monthly or weekly demand, sales and inventory forecasts.
04Statistical

ARIMA & seasonal ARIMA (SARIMA)

Models a series from its own past values (autoregression) and past errors (moving average) after differencing to remove trend. SARIMA adds seasonal terms.

Strength
Flexible, well understood, supports regressors (ARIMAX) and intervals.
Watch out
Needs stationarity and careful order selection; struggles with long or multiple seasonalities.
Best for
Single series with autocorrelation, such as demand, traffic or prices.
05Statistical

Dynamic harmonic regression & TBATS

Uses Fourier terms to represent long or multiple seasonal cycles, with ARIMA errors on top. TBATS is a related automatic approach for complex seasonality.

Strength
Handles daily and weekly cycles together, or very long seasonal periods.
Watch out
Seasonal pattern is assumed fixed unless the model is refreshed.
Best for
Hourly or daily data such as electricity load and call volumes.
06Statistical

Vector autoregression (VAR)

Forecasts several related series together, with each one explained by the past of all the others.

Strength
Captures feedback between series; good for small systems.
Watch out
Parameters grow quickly with the number of series.
Best for
Linked economic or operational indicators.
07Statistical

Prophet

An additive model of trend, seasonality and holiday effects fitted with a Bayesian-style procedure, designed for business series with strong calendar effects.

Strength
Easy to use, tolerates gaps and outliers, supports holidays and changepoints.
Watch out
Not always the most accurate; needs tuning for abrupt regime changes.
Best for
Daily business metrics with holidays and several seasonalities.
08Machine learning

Gradient boosting (XGBoost, LightGBM)

Turns forecasting into tabular regression using lagged values, rolling statistics, calendar features and external drivers as inputs.

Strength
Handles many series and many features; strong on large retail-style datasets.
Watch out
Needs careful feature engineering and a validation scheme that respects time order; cannot extrapolate trends beyond training range.
Best for
Many related series with promotions, prices and other covariates.
09Machine learning

Neural network autoregression (NNAR)

A feed-forward network that predicts the next value from lagged inputs, optionally with seasonal lags.

Strength
Captures non-linear patterns with a simple architecture.
Watch out
Less interpretable and needs enough data.
Best for
Non-linear single series where classical models underperform.
10Deep learning

LSTM & GRU

Recurrent networks that keep a hidden state across time steps and learn long-range dependencies from sequences.

Strength
Flexible; handle multivariate inputs and variable-length history.
Watch out
Need substantial data and tuning; often no better than simpler models on small datasets.
Best for
Multivariate sensor and event data with non-linear dynamics.
11Deep learning

DeepAR

An autoregressive recurrent network trained across many related series that outputs a probability distribution for each step.

Strength
Probabilistic forecasts and shared learning across series, including cold-start items.
Watch out
Needs many related series; training cost.
Best for
Large product catalogues and demand planning with uncertainty.
12Deep learning

N-BEATS

A deep stack of fully connected blocks that forecast and subtract their contribution, with optional trend and seasonality blocks for interpretability.

Strength
Strong accuracy without recurrence or attention; interpretable variant.
Watch out
Univariate by design; hyperparameter sensitive.
Best for
Univariate benchmarks and large collections of series.
13Deep learning

Temporal Fusion Transformer (TFT)

An attention-based model that combines static, known-future and observed inputs and reports which variables and time steps mattered.

Strength
Multi-horizon, multivariate, with built-in interpretability and quantile outputs.
Watch out
Heavy to train and tune.
Best for
Forecasts with many covariates, such as retail with promotions and calendars.
14Deep learning

Transformers for long horizons (Informer, PatchTST)

Efficient attention models for long input and output windows. PatchTST splits each series into patches and treats them as tokens.

Strength
Good at long-horizon forecasting on large datasets.
Watch out
Research found simple linear models can match transformers on some benchmarks, so compare against them.
Best for
Long-horizon forecasting on large multivariate datasets.
15Foundation models

Chronos

A pretrained model family that tokenises values and forecasts with a language-model architecture, giving zero-shot predictions on new series.

Strength
No training needed for a first forecast; probabilistic output.
Watch out
Large model; accuracy on your data still needs validation.
Best for
Cold-start series and quick prototypes.
16Foundation models

TimesFM

A decoder-only foundation model pretrained on a large corpus of time series for zero-shot forecasting.

Strength
Zero-shot forecasts across domains and frequencies.
Watch out
Pretrained and general-purpose, so validate its zero-shot accuracy on your own data.
Best for
Zero-shot baselines across many series.
17Foundation models

Moirai

A universal forecasting transformer trained on a large archive of time series and designed to handle any frequency and number of variables.

Strength
Handles varied frequencies and multivariate inputs in one model.
Watch out
Large and compute-hungry.
Best for
Mixed-frequency, multivariate zero-shot forecasting.
18Foundation models

Lag-Llama

An open decoder-only foundation model for probabilistic univariate forecasting that uses lagged values as covariates.

Strength
Probabilistic zero-shot forecasts and fine-tuning.
Watch out
Univariate; early-stage ecosystem.
Best for
Probabilistic forecasting with limited local data.

Choosing an algorithm

A starting point, not a rule. Always compare against a baseline.

Short, regular series with trend and seasonalityExponential smoothing (ETS) or ARIMA
Daily business data with holidays and promotionsProphet, or gradient boosting with calendar features
Many related series (retail, telecom)Gradient boosting, DeepAR or N-BEATS
Multiple seasonal cycles (hourly demand)Dynamic harmonic regression or TBATS
Rich covariates and long horizonsTemporal Fusion Transformer or PatchTST
No history or a new seriesFoundation models such as Chronos or TimesFM
Any project, at the startA seasonal naive baseline, then compare

Judging a forecast

Evaluate on data the model has not seen, ordered in time.

MAEMean absolute error. Easy to read, in the same units as the data.
RMSERoot mean squared error. Penalises large misses more heavily.
MAPE / sMAPEPercentage errors. Intuitive, but unstable when actual values are near zero.
MASEScales error against a naive forecast so results compare across series.
Pinball / CRPSScore probabilistic forecasts and prediction intervals, not just point values.

Use rolling-origin cross-validation so each test set lies after its training data. See accuracy measures and time series cross-validation in Forecasting: Principles and Practice, and forecast combinations for averaging models.

Python libraries

Open-source toolkits that implement most of the algorithms above.

Related pages on PeterIndia.net

Models, libraries, databases and visualisation tools for time-series work.

Frequently asked questions

Quick answers.

What is the best time-series forecasting algorithm?

There is no single best algorithm. Exponential smoothing and ARIMA are strong on short, regular series, gradient boosting is strong across many related series with covariates, and deep or foundation models can help at scale or with little history. Start with a seasonal naive baseline and compare.

Should I use deep learning for forecasting?

Only when you have enough data and a reason, such as many related series, rich covariates or long horizons. On small datasets, classical models are often as accurate and far easier to maintain.

How do I evaluate a forecasting model?

Hold out the most recent data, or use rolling-origin cross-validation so the model is always tested on the future. Report errors such as MAE or MASE, and use pinball loss or CRPS if you produce prediction intervals.

What are time-series foundation models?

They are large models pretrained on many time series that can forecast a new series without training, called zero-shot forecasting. They are promising baselines, but you should validate them on your own data.

How is this page different from the forecasting models page?

This page explains how each algorithm works, when to use it and how to judge it. The models page collects tutorials and resources for each model.

How far ahead can I forecast?

It depends on how predictable the series is. Forecast accuracy usually falls as the horizon grows, so always report error by horizon and show prediction intervals.

Core explanations follow Forecasting: Principles and Practice (3rd ed.) by Rob J. Hyndman and George Athanasopoulos, plus the original papers and documentation linked on each card. Statements about relative accuracy are general guidance; results vary by dataset.