Once you can pull a series apart into
Before any clever model, you owe yourself two humbling benchmarks:
If your elaborate model cannot outperform "same as last year," the model is not adding value — a check that saves careers.
The next rung averages the last
Exponential smoothing forecasts with a weighted blend of the latest value and the latest forecast:
Unroll that recursion and something beautiful appears: the forecast is a weighted sum of all
past observations, with weights
Plain exponential smoothing has no notion of trend or season, so it forecasts a flat line into the future. Holt's method adds a second equation that tracks the trend; Holt-Winters adds a third for seasonality — so the family climbs to handle exactly the components we decomposed earlier, each with its own smoothing dial.
ARIMA bundles three ideas whose initials spell its name:
Written
Here the ordinary machine-learning reflex — shuffle the data, split at random — is catastrophically wrong. Shuffling lets the model peek at the future to predict the past, a leak that inflates your score and collapses in production. Instead use a time-based split: train on the earliest stretch, test on the latest, and never let a test point predate a training point.
The gold standard is rolling-origin evaluation (also called time-series
cross-validation): forecast the next step, reveal the true value, slide the training window forward,
forecast again — mimicking how the model would really be used, one honest step at a time. Score with a
metric built on the errors, such as the mean absolute error or the
For a random walk — a series whose next value is the current one plus unpredictable noise, a
surprisingly good model of stock prices and exchange rates — the naive forecast
The most common way to ruin a forecasting project is to reuse a habit from ordinary supervised
learning: train_test_split(shuffle=True). On a time series this scatters future points
into the training set, so the model effectively studies the answer sheet — it interpolates between
points it has already seen rather than extrapolating into a genuine future. Your validation score looks
spectacular; live performance is a disaster. The rule is absolute: the test period must come
entirely after the training period. Any feature engineered from future information (a rolling
mean that includes tomorrow, a "target from next week") is the same sin wearing a disguise.
Kaggle Learn's Time Series course builds forecasters from naive baselines through trend and seasonal models, and its competitions give you real series to forecast with proper time-based validation in Python — the place to practise everything on this page.