The Moving Average
The moving average is the friendliest forecaster there is. Its whole idea: tomorrow will probably look like the recent few days, so just average them. Simple as it sounds, it is used every single day by real traders, and it is the perfect first tool for guessing your light bill too.
The one idea
A single day's price is jumpy. Somebody sells a big block of shares, a rumour spreads, and the number twitches. None of that tells you much about next week. So instead of trusting one noisy day, you take the average of the last few days and slide that window forward as new days arrive. That sliding average is the "moving" average.
The window is the number of recent days you blend together. A 3-day window reacts fast but stays jumpy. A 7-day window is smooth and calm but slow to notice a real turn. Choosing the window is the whole skill.
Add up the last few closing prices, divide by how many you used. That average is your guess for the next day.
Play with the window
Below are NCB's real recent closing prices in teal. Drag the slider to change the window size and watch the gold moving-average line change shape. The gold star just past the end is the moving average's forecast for the next day.
How to use this
- Drag the window slider from 2 up to 8 days.
- Watch the gold line get smoother as the window grows, but also start to lag behind sharp turns.
- Read the backtest error: we replayed history and measured how far this window's forecast landed from the real next price. Lower is better.
What it is great at, and where it slips
Calm, slow-moving things like a monthly bill or a steady stock. It cuts through noise with almost no maths.
The world turns sharply. Because it looks only backward, it always lags a real change and never predicts a brand-new spike.
Your JPS bill is far calmer than a stock, which makes the moving average a genuinely strong guess. Average your last three or four bills and you have a solid forecast for next month. You will do exactly this in the bonus light-bill challenge.
- A moving average forecasts the next value as the average of the last few.
- The window trades smoothness against lag: wider is calmer but slower.
- It shines on calm series like bills, and lags on sharp turns.
Next: draw your own best-fit line through the prices with linear regression.