9. Moving Average


Moving average. Let’s imagine you’re a stock broker on Wall Street in New York City and you’re trying to look at a stock. Should you just consider its trading value from yesterday? Well, that seems a little bit shortsided.
0:14
Or should you look at all of its stock’s history? Take, for example Johnson & Johnson. They’re over 140 years old. What the stock price was 140 years ago probably has not much to do with where it will go in the future. The truth lies somewhere in the middle. You want to look at a moving average that takes a subset of data, averages it, and as we move through time, that average will move with us. So, on the stock market, we often consider 50 and 200 day moving averages as a comparison for the stock price that we currently have. Now, lets take a look at the math behind the moving average. So our forecast, a time T, is equal to a moving average, so we are going to pick a subset of data that we are going to average up, and we denote that again by our Greek symbol sigma, and that sum is going to go from i = t- N + 2 all the way to t- 1. So, t- 1 is the period that we have available right now and we’ll going to go back N periods.
1:37
Now, we have to add the two back in because we really start a t- 1 and we only want to go eight periods back of demand. We divide it by the number of periods that we summed up, which is N, and there we have the formula for the moving average.
1:58
And if we look at it on a timeline we’re here at point t and we are going to, let’s say, have an N of four, we are going to average out those four periods, so we’re going to sum them,
2:13
and we’re going to divide them by N, which is a moving average.
2:18
The average, as you saw, is a fairly straight forward mathematical function. But in the moving average, we have one big unknown, and that’s called N.
2:28
N is the number of periods you’re going to average together, and that is a decision that you as the forecaster needs to make.
2:37
A small N will make the forecast very reactive
2:41
versus a large N, which makes the forecast very stable. So you go from something like the method to something like the cumulative mean.
2:53
Either way, you have to determine what N you pick. And that is not a decision anyone can make for you, unless you know the specific situation in which you will use a forecast.
3:07
How do you know which N is the right one?
3:10
Well, it comes down to trial and error. You have to try different values of N, measure accuracy for each one of them, and then pick the best one.
3:20
So as we’ve seen the moving average is a tremendously adaptable forecasting method. You can make it very reactive, you can make it very stable. And that’s why a lot of companies that have reasonably stable demand love to use it.

Jim Rohn Sứ mệnh khởi nghiệp