Skip to content

Week 12 · Time-Series Analysis and Forecasting

Forecast a real Singapore series published by the national open data portal — not a teaching set, live and still being updated. Build a seasonal-naive baseline by hand, direct an agent to build its own forecast, then score both against 12 months you held back. This is your Baseline-Beaten Forecast.

Time 70 minutes, in pairs
Work with A partner
You need An agent (Claude or Manus) + a spreadsheet + your chosen dataset
You hand in A one-page forecast carrying its baseline comparison, holdout error, range, and two sentences — plus a supervision note
Graded on Honesty, not accuracy — whether the forecast states what it was compared against, how wrong it was on data it had not seen, how wide its range is, and what would make it invalid

The point of the lab is not a good forecast. It is an honest one — one you can hand to somebody who was not in the room and let them decide whether to trust it, without asking you anything.

Choose one series:

Option Series Why you might pick it
A International visitor arrivals, monthly Strong annual seasonality, and it is published twice — as recorded, and seasonally adjusted. Pick this if you want the decomposition work to be visible.
B Retail sales value, monthly Seasonal, with a clear December rise and January fall. Pick this if you want a series closer to a commercial scenario.

Data dictionary — the portal exports vary by series, so check the header row rather than assuming. At minimum you need:

Column Meaning
Month or period The time index. Confirm it is complete and in order before anything else
Value The measured quantity. Note its units — your error figure will be reported in them

Anything else in the export is a breakdown you may or may not need. Decide before you start, not after.

Record which series you picked, how many observations it has, and the dates it runs from and to — you will need this in Step 4.

Step 1 — Look before you model · 10 min

Section titled “Step 1 — Look before you model · 10 min”

Open the file. Plot the series. Do not skip this — it is the step that catches most of the problems that would otherwise survive to the end. Answer in one line each:

  • Trend: up, down, flat, or changing direction partway through?
  • Seasonality: is there a repeating shape, and what is its period?
  • Shocks: are there points obviously not part of the pattern? When?
  • Gaps: are any periods missing, zero, or clearly wrong?

Note especially any structural break — a point after which the series behaves differently.

Option A pairs: plot the recorded and the seasonally adjusted series on the same axes.

  • What does the raw series show that the adjusted one hides?
  • What does the adjusted series show that the raw one hides?
  • If a director asked “was last month good?”, which would you use, and why?

Option B pairs (alternative): your series is published unadjusted only. Compute a twelve-month moving average and plot it over the raw series. Answer the same three questions, treating the moving average as your rough stand-in for the trend.

Step 3 — Build the baseline first · 10 min

Section titled “Step 3 — Build the baseline first · 10 min”

Before any model. Before the agent.

Hold back the last 12 observations — you will not look at them until Step 5. On the remaining data, produce a seasonal naive forecast for those 12 periods: each forecast value is simply the value from the same month one year earlier. Do this by hand, in a spreadsheet — it takes about four minutes.

Step 4 — Have an agent build the model · 15 min

Section titled “Step 4 — Have an agent build the model · 15 min”

Prompt 1 — profile only:

Here is a monthly time series from [start] to [end]. Profile it. Describe the
trend, name the seasonal period and its size, and flag any structural break or
outlier with the date it occurs. Do not forecast yet, and do not fit a model.

Compare the agent’s profile with what you wrote in Step 1. Any disagreement is worth resolving now, not later.

Prompt 2 — plain English before code:

Based on that profile, describe in one sentence, in plain English that a
non-technical colleague would follow, how you would forecast the next 12
months. State the method's assumptions. Do not write code yet.

Prompt 3 — the forecast:

Now forecast the 12 periods after [the last date of your training data]. Give
a point estimate, a low estimate and a high estimate for each. Then state the
assumptions the forecast depends on and the events that would make it wrong.
I have held back the actual values for those periods and will compare.

Watch for these four failures. Each is silent and each is common:

  • It fitted a model without profiling first.
  • It used a random train-test split rather than holding back the end of the series.
  • It gave point estimates only, with no range.
  • It treated a one-off shock as a repeating pattern.

Step 5 — Score both against the truth · 15 min

Section titled “Step 5 — Score both against the truth · 15 min”

Open the 12 observations you held back. For the baseline and for the agent’s model, compute the mean absolute error — the average size of the difference between forecast and actual, in the original units. Report them side by side.

  • If the model beats the baseline, say by how much, and whether the improvement is worth the extra complexity.
  • If the model does not beat the baseline, say so and use the baseline. This is a real and respectable result — the most common one on short, strongly seasonal series.

Write both, specifically. No hedging.

  • This holds while… name the condition — something checkable, e.g. “while arrivals from the top three source markets continue their current recovery rate.” Not “while things stay the same.”
  • This breaks if… name an event you could put on a monitoring list, e.g. “if a major source market imposes travel restrictions, or if a new terminal changes capacity.” “If conditions change” is not a break condition.

Step 7 — One page for somebody who was not here · 5 min

Section titled “Step 7 — One page for somebody who was not here · 5 min”

Assemble your one-pager:

FORECAST: [series], [period covered]
WHAT IT SAYS
Point estimate and range for the period. One line.
HOW IT WAS MADE
The method, in the one plain-English sentence from Step 4.
WHAT IT WAS COMPARED AGAINST
The baseline, and the error of each on 12 held-back periods.
HOW WRONG IT WAS
Mean absolute error, in the original units, on data the model had not seen.
THIS HOLDS WHILE
The assumption.
THIS BREAKS IF
The event to monitor.

Attach a short supervision note — one paragraph covering:

1. Which agent platform you used.
2. Which of the four failure modes occurred, and how you caught it.
3. One thing the agent profiled correctly that you had missed in Step 1.
4. One question about this series the agent could not answer from the data alone.
  • I plotted the series before modelling anything
  • I noted any structural break and decided what to do about it
  • I built the baseline before the model, not after
  • My holdout is the end of the series, not a random sample
  • I reported the baseline’s error next to the model’s
  • If the baseline won, I said so rather than hiding it
  • My forecast has a range, not just a point
  • I wrote both sentences, and both name something checkable

Add the completed one-page forecast, with the supervision note attached, as evidence to your Individual Analytics Portfolio.

Next session turns analysis into a recommendation. A forecast with a break condition is one of the strongest things you can put in front of a decision-maker, because it tells them not only what you expect but what to watch.

Companion links: Unit 14 app · lesson plan