THE GENIUS PROJECT
🎯 Lesson 2 of 7

Baseline predictions

🕒 About 30 minutes 📊 Real NCB data ✏️ Interactive window slider

Before anyone reaches for machine learning, they make the dumbest possible prediction on purpose. That guess is called a baseline, and it matters more than it sounds: if a fancy model cannot beat the dumb guess, the fancy model is worthless. Let us build three baselines on NCB's real prices.

Baseline 1: tomorrow equals today

What is the single laziest forecast for NCB's price tomorrow? Just say today's price. If it closed at J$74.50 today, guess J$74.50 tomorrow. This is the naive forecast, and it is not as silly as it looks. What is your best guess for tomorrow's weather with no other information? Usually, today's weather.

Naive forecast last value

Predict that the next value equals the most recent one. For a price that wanders slowly, this is surprisingly hard to beat, which is exactly why it makes such a tough baseline.

Baseline 2: the long-run average

Another simple idea: predict the average of every price so far. Add them all up, divide by how many. For NCB's twenty days that average is about J$63.10. Useful? Look at the chart: the stock has been climbing, and it just closed at J$74.50. Guessing J$63.10 for tomorrow would be badly, stubbornly low. The plain average forgets that recent days matter more than old ones.

Baseline 3: the moving average

The fix is the moving average: instead of averaging everything, average only the last few days. Average the last 3 closes and you get a number that hugs the recent trend while smoothing out the daily jitter. The "few days" is called the window.

$$\text{MA}_k = \frac{p_{t} + p_{t-1} + \dots + p_{t-k+1}}{k}$$

Read it plainly: add up the last \(k\) prices and divide by \(k\). A small window reacts fast but stays jumpy; a big window is smooth but slow to turn. Slide the window below and watch the trade-off on the real data.

How to use this lab
  1. The grey line is NCB's real daily close. The gold line is the moving average.
  2. Drag the window slider. A small window sticks close to the price; a big window glides through the middle.
  3. Read the two baseline predictions for the next day, the naive guess and the moving-average guess, in the status line.
Drag the slider to change the window.
✋ Check your understanding
Why is a bigger moving-average window smoother but slower to react?

Why bother with baselines at all?

Because they are the bar you have to clear. In Lesson 4 you will build a machine learning model. The first question anyone will ask is not "is it clever?" but "does it beat the naive forecast?" A shocking number of complicated models quietly lose to "tomorrow equals today," and if you do not measure against a baseline, you will never notice.

⚠️ A trap to avoid

A model can look amazing on a chart and still be useless. If it just copies yesterday's price one day late, it will trace the real line beautifully and predict nothing you did not already know. Always ask what it beats, not just how pretty it looks.

There is one thing missing: we keep saying one baseline is "better" than another, but better by how much? To answer that, we need to measure how wrong a prediction is. That is the whole next lesson.

🧠 Recap
  • The naive forecast predicts the next value equals the last one. It is a tough baseline.
  • The plain average ignores trends, so it lags badly on a rising stock.
  • The moving average averages only the last \(k\) days, trading smoothness against speed.
  • Baselines exist to be beaten: a model that cannot beat them is not worth running.

Next: draw a trend line and measure exactly how wrong a prediction is.