Advanced BI
Advanced 13 min read Advanced BI

Time Series Forecasting

Decompose, fit small, validate honestly

Forecasting is time-series craft: decompose into trend, seasonality, noise; fit the smallest honest model; produce intervals; and validate on a holdout with error metrics.

time seriestrendseasonalityholdoutMAEexponential smoothing
Prerequisites: Time Intelligence
Before we start

What you will learn

  • Decompose a series into trend, seasonality, noise
  • Compare forecasting models with a holdout
  • Report error metrics next to every forecast
Introduction

What is this?

Time series forecasting treats history as a signal: trend (direction), seasonality (repeat pattern), and noise (the wiggles). The craft is decomposing those, fitting the smallest honest model (moving average, exponential smoothing, or a proper ARIMA-family model where the structure demands it), producing an interval, and validating against a holdout so the error metric is real — every forecast comes with its measured miss.

Motivation

Why do you need it?

  • Forecasts without decomposition are mood, not math.
  • Small honest models beat grand ones on data scarcity — classic BI reality.
  • Holdout validation is what stops the overfit worship.
  • Forecasting is a demanded skill in analytics and BI interviews.
Think about it

Mental model

Imagine

A tide table (astronomy) vs a surf report (weather)

Think of

Deterministic vs stochastic forecast

Tides are near-deterministic — physics pins them; surf is stochastic — waves ride weather noise. Time-series work must first ask which kind of forecast the series supports: the repeatable part (tide = seasonality) versus the noisy part (surf = residual). Forecasting = decompose the tame, measure the wild.

Mechanics

How it works

  • Decompose: separate trend, season, remainder (moving average or STL-style).
  • Model fit: choose by structure — naive baseline, smoothing, or ARIMA-family with tuned orders.
  • Interval: standard error on the residual → a range, not a line.
  • Holdout: fit on a training window, measure on unseen — honest error.
  • Report: error metric (MAE/MAPE) next to the forecast; drift watch for model degradation.

The forecast pipeline, validated.

Series
Decompose
Fit
Holdout
Back to product
Hands-on

Examples

Model selection discipline

Model selection discipline
SERIES monthly orders, 24 mo, weekly season
DECOMPOSE trend up, seasonal repeat (Dec spike), remainder small
MODELS
naive -> MAE 11% (carry last value)
smooth -> MAE 6% (exp smoothing, alpha tuned)
ARIMA(1,1,1)-> MAE 5.7% (marginally better)
CHOOSE smooth + season — small, stable, cheap to run
REPORT 6% MAE on holdout; range ±8% for 3 mo out;
re-validate each month (drift alert).

Compare against a naive baseline, pick the smallest model that earns its place, publish error and interval.

Real world

In production

  • Demand forecasting for a warehouse: monthly + seasonality, holdout-MAE in the report header.
  • A call-volume forecast sizes staffing by half-days with interval bands.
  • A finance cadence forecasts cash by week with a drift re-check monthly.
Guidelines

Best practices

  • Always beat the naive baseline, or don't ship the model.
  • Report error on a holdout, never on the fit itself.
  • Fit the smallest model that holds; ARIMA only where structure demands.
  • Watch drift: recompute error rolling, alert when it regresses.
Watch out

Common mistakes

  • Validation on the training fit — everyone's error is fake, that day.
  • Shiny ARIMA on 18 months of data that smoothing beats.
  • Seasonality ignored because 'monthly data is simple' — Dec spikes eat the forecast.
  • Never re-checking drift — good model decays into a hobby.
When things break

Debugging tips

  • Holdout MAE doubles after a regime shift → drift re-fit; seasonality changed.
  • Forecast smooth-then-undershoots spikes → additive season not capturing amplitude; check multiplicative.
  • Error 'impossibly low' → leakage from the holdout into fitting; re-slice the split.
Interviews

Interview checkpoint

Practice

Hands-on lab

Compare Smoothing vs Naive on a Holdout
50 min · advanced
In progress
Objectives
  • Decompose a short monthly series in SQL
  • Fit a smoothing-style forecast on a training window
  • Score both models on holdout and pick the winner

Compare Smoothing vs Naive on a Holdout

50 min · advanced

0/5 steps
0%
sandbox · Linux sandbox
$
Try these commands
Test yourself

Quick quiz

0/2
1

Forecast validation should happen:

2

A smoothing model can beat a complex ARIMA on short series.

Go deeper

Official documentation