Skip to content

Forecasting a time series

Decomposition, change points, hierarchies and horizons — what the classical methods actually do, and where a foundation model changes the answer.

A time series is not a table of independent rows and almost every mistake in forecasting comes from treating it as one. The order matters, the gaps matter, the fact that yesterday is in the training set and tomorrow is not matters. The classical methods in this cluster — decomposition, cumulative sums, autocorrelation, reconciliation — are old because they encode those constraints exactly, and they are worth understanding numerically rather than as names, because the arithmetic is short enough to follow and it is what a library is doing on your behalf.

The recent arrival is the pretrained forecasting model, which promises a forecast for a series it has never seen. That is a real capability with a specific shape: it transfers pattern, not units, and it is bounded by a context window and by what was in a training corpus. These pages describe the mechanism in both traditions and are explicit about which questions each one cannot answer.

Time Series Foundation Models: What Chronos and TimeGPT Actually Do

How a model pretrained on other people's series produces a forecast for yours, described through the two designs that are actually in use.

9 min read

Zero-Shot Time Series Forecasting Without Training a Model

What the word zero-shot claims when the input is numbers rather than text, and the specific kind of seasonal pattern it fails on.

8 min read

Why Language Models Struggle to Forecast Numbers

The obstacle is representational: a tokenizer that splits digits arbitrarily and a loss that does not know one number is near another.

9 min read

STL Decomposition: Trend, Seasonal and Residual, By Hand

The six steps of STL's inner loop in the order they run, worked numerically on a twelve-point series.

10 min read

Change Point Detection in a Time Series, Explained

How a cumulative sum accumulates evidence for a shift, worked to a signal on a labelled series, and where the change point is read from.

9 min read

Multivariate Time Series Forecasting: What Changes When Series Interact

The cross-series coefficient and the cross-series covariance a univariate model drops, worked on a two-series example.

9 min read

Hierarchical Forecast Reconciliation Explained

Why independently produced forecasts do not add up, and what bottom-up, top-down and least-squares reconciliation each do about it.

10 min read

Forecasting With Exogenous Variables: What a Model Needs Beyond History

Leading, coincident and lagging inputs, and the single question that decides whether a regressor helps: is it known at forecast time?

9 min read

Cold-Start Forecasting for a Product With No History

Three fallbacks ordered by how much history each needs, with the shrinkage arithmetic that moves you between them.

9 min read

Time Series Anomaly Detection With Isolation Forest

Isolation Forest has no notion of time, so the work is in the features; this builds them and scores a synthetic series end to end.

10 min read

Time Series Anomaly Detection With Autoencoders

How reconstruction error becomes an anomaly score, and how to set the threshold from the error distribution rather than from a rule of thumb.

10 min read

Detecting Seasonality Automatically in a New Series

The autocorrelation arithmetic that locates a period, worked on a short series, including the case where it cannot decide.

9 min read

Rolling Window Forecasting: Window Size as a Bias-Variance Trade

Why a longer rolling window lowers noise and raises bias, with the mean squared error of three window widths worked out on one stated series.

9 min read

Long-Horizon Forecasting: Why Error Compounds Past a Few Steps

How forecast variance grows with the horizon, worked out from a stated one-step error, and why it is bounded for a stationary series and unbounded for a random walk.

9 min read

When a Classical Model Beats a Transformer at Forecasting

An argument that the choice between exponential smoothing and a deep forecaster is decided by how many series you have and how long they are, with the threshold worked out as a ratio.

10 min read

N-BEATS Explained: Basis Expansion and Doubly Residual Stacking

How N-BEATS forecasts by having each block emit basis-expansion coefficients and subtract its own reconstruction from the input, and what the interpretable configuration constrains.

9 min read

Temporal Fusion Transformer Explained

The three selection mechanisms the TFT stacks — variable selection, gated residual networks and interpretable multi-head attention — and what each one earns its place by doing.

10 min read

Time Series Embeddings for Similarity Search

Why dynamic time warping cannot be put in a vector index and fixed-length embeddings can, worked through on a pair of short series where the two distances disagree.

9 min read

What Forecasting 10,000 SKUs a Night Actually Costs

The compute cost of a nightly forecast run derived from labelled assumptions about per-series fit time, core count and instance rate, and why the total is not what makes it expensive.

10 min read

Intermittent Demand: Why Standard Forecasting Models Fail on Sparse Series

Why a mostly-zero series makes the forecast-zero-forever policy win on mean absolute error, worked out on a 20-period example, and what Croston's method does instead.

9 min read

Forecasting at Different Time Granularities: Hourly, Daily, Weekly

The aggregation arithmetic showing how much noise cancels moving from hourly to daily, why correlated errors destroy most of that benefit, and what coarsening costs you.

9 min read

Quantile Regression for Forecasting a Range, Not a Point

Why minimising the pinball loss returns the requested quantile, derived on a ten-value dataset, and the two traps that make separately-fitted quantiles wrong.

9 min read

Forecasting Demand for a New Store Location

The analog-store method worked end to end on one new site, with the distance weighting computed two ways to show how a near-duplicate analog can swallow the estimate.

10 min read

Detecting Structural Breaks in a Time Series

How a Chow test distinguishes a change in the underlying relationship from a single strange observation, with the F-statistic computed from labelled residual sums.

9 min read

Other topics