Advanced Analytics
Advanced 16 min read Advanced Analytics

Time-Series Forecasting

Predict the metric the business plans on

Forecasting predicts future values of a metric from its history, separating trend, seasonality, and noise. It turns calendar-aware data into a planning number that finance and ops can budget against.

forecastingtime seriesseasonalitytrendARIMAtrend+season
Before we start

What you will learn

  • Decompose a series into trend, seasonality, and noise
  • Build and evaluate a simple baseline and an additive forecast
  • Validate forecasts out-of-sample and communicate uncertainty
Introduction

What is this?

Time-series forecasting models a metric (revenue, DAU, bookings) as a function of its own past. The classic decomposition splits a series into trend (the long-run direction), seasonality (calendar patterns), and noise (unpredictable remainder). Forecasts extrapolate the pattern forward and are always paired with a band of uncertainty.

Motivation

Why do you need it?

  • Finance and operations budget against forecast numbers, not hopes.
  • A naive baseline beats sophisticated models when the pattern is weak — so you need both.
  • Understanding seasonality prevents misreading normal cycles as product changes.
Think about it

Mental model

Imagine

Estimating the next note in a song

Think of

Forecasting the next value of a series

You rely on the tune (trend), the rhythm (seasonality), and the fact that each note is close to the last one (autocorrelation).

Mechanics

How it works

  • Resample the metric to a fixed frequency and visualize the last 1–2 years.
  • Decompose into trend, seasonality (day-of-week, month-of-year), and residual noise.
  • Fit a model — from a moving average baseline to ARIMA, Prophet, or lightGBM.
  • Hold out the final period, compare forecast to actual, and report a confidence band.

Decomposing a series isolates the predictable pattern from the noise.

Series
Trend
Seasonality
Forecast
Real world

In production

  • Finance forecasts monthly revenue with seasonality and a holiday uplift.
  • Ops forecasts support volume to staff shifts ahead of cycle peaks.
  • Growth detects product changes by comparing actuals to the forecast baseline.
Guidelines

Best practices

  • Always beat a naive baseline (last-value or same-period-last-year) before trusting a model.
  • Validate out-of-sample on the most recent, most business-relevant period.
  • Report the forecast with its band — the business needs the range, not just the middle line.
Watch out

Common mistakes

  • Training on all history including a regime change, then predicting through the new regime.
  • Stamping on a forecast because the actual was inside noise, not a real deviation.
  • Ignoring calendar effects like holidays and weekdays in daily data.
When things break

Debugging tips

  • If residuals show a repeating weekly spike, add the missing day-of-week feature.
  • If the forecast follows a crash that already reversed, shorten the training window or add a change-point.
Interviews

Interview checkpoint

Practice

Hands-on lab

Forecast Revenue with Trend and Seasonality
45 min · advanced
In progress
Objectives
  • Decompose a daily revenue series into trend and day-of-week seasonality
  • Build a seasonal-naive baseline and an additive model
  • Evaluate both out-of-sample and report a confidence band

Forecast Revenue with Trend and Seasonality

45 min · advanced

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

Quick quiz

0/2
1

Time-series decomposition separates a series into

2

A forecast is only worth trusting when it

Go deeper

Official documentation