Download presentation
Presentation is loading. Please wait.
Published byNeal Mills Modified over 8 years ago
1
Lesson 5.1 Forecasting Moving Averages Exponential Smoothing
2
Forecasting We will study predominantly time series forecasting which makes future projections solely on the basis of past data. This is also called time series analysis or naïve forecasting.
3
Forecasting A time series is an organized sequence of data values: x 0, x 1, x 2, x 3, … x n. The subscripts represent a point in time (day, month, year, etc.)
4
Forecasting If x t is a future value of the series to be predicted: x t = f(t), where f(t) is some function of the time series index t. Your task as an analyst is to find the functional form that best predicts the future series.
5
Forecasting The form chosen for f(t) depends upon the underlying process. Some common forms for f(t) are: Constant f(t) = a Linearf(t) = a + bt Quadraticf(t) = a + bt + ct 2 Polynomialf(t) = 0 + 1 t + 2 t 2 +…+ n t n Periodicf(t) = 0 + 1 sin(wt) + 2 cos(wt)
6
TIME XtXt Functional Forms Constant f(t) = a
7
TIME XtXt Functional Forms Linear f(t) = a + bt
8
TIME XtXt Functional Forms Quadraticf(t) = a + bt + ct 2
9
TIME XtXt Functional Forms Polynomialf(t) = 0 + 1 t + 2 t 2 +…+ n t n
10
TIME XtXt Functional Forms Periodic f(t) = 0 + 1 sin(wt) + 2 cos(wt)
11
Simple Moving Average The most basic forecasting method Method: –Take data from last N periods –Average the data –Use average to forecast future period N F t = S t-i i = 1 N F t = forecast for period t S t-i = data N = number of time periods
12
Simple Moving Average Example:
13
Simple Moving Average Example: F 6 = 3
14
0 2 4 6 8 10 12 05101520 Dat a Moving Avg
16
Moving Average N=5
17
Moving Average N=12
18
Simple Moving Average Problems with using the simple moving average as a forecasting tool: –The moving average is tracking actual data, but it is always lagging behind it. –The moving average will never reach the peaks or valleys of the actual data -- it smoothes out the data –Doesn’t tell you very much about the future However, this doesn’t make the moving average useless -- you just need to be aware of its problems.
19
Example of how people use moving averages to indicate when they should get in and out of the market
20
Weighted Moving Average Whereas the simple moving average gives equal weight to all the data, the weighted moving average can give more weight to more recent data N F t = w t-i S t-i i=1 N w t-i i = 1 w t-i = weight given to data at period t-i
21
Exponential Smoothing Another forecasting tool that weights the last forecast and the most recent data. F t = F t-1 + (A t-1 - F t-1 ) = A t-1 + (1- )F t-1 0 < < 1, = smoothing constant A = actual data If actual data point was above the last forecast, it would tend to move the future forecast up and if the data point was below the last forecast, it would tend to move the future forecast down
22
Exponential Smoothing =.3
23
Exponential Smoothing =.1
24
Exponential Smoothing =.9
25
Exponential Smoothing Why is it called exponential smoothing? F t = F t-1 + (A t-1 - F t-1 ) = A t-1 + (1- )F t-1 Expanding the function would result in this: F t = A t-1 + (1- )( A t-2 +(1- )F t-2 ) = A t-1 + (1- )( A t-2 )+(1- ) 2 F t-2 …. (You can continue to expand the function)
26
Exponential Smoothing (1- ) (1- ) 2 (1- ) 3 (1- ) 4 (1- ) 5 The weights tend to follow this pattern of “exponential” decay, hence the name, exponential smoothing.
27
Exponential Smoothing In the exponential smoothing model, if the smoothing constant, , is small, not much weight is given to current data, which also means that the forecast tends to dampen out trends and fluctuations. corresponds roughly to the inverse of the number of periods (N) in the single moving average. If N is small, is large. If N is large, is small.
28
Exponential Smoothing It can be shown that the average age of the data in a single moving average model is (N-1)/2 and the average age of data in a single exponential smoothing model is (1- )/ . Therefore, =2/(N-1) gives the equivalent average age of data.
29
Exponential Smoothing can be set at an initial value. Then, compare the forecast to actual data to determine which value of minimizes forecast error. One measure of forecast error is the error variance, which is the mean squared error between the forecast and the actual data in the next period, (Actual data t -F t ) 2 /n. Pick the that gives you the smallest mean squared error. You can also program the computer to pick the model with the smallest forecast error, in which case you have an adaptive forecaster.
30
Exponential Smoothing However, even if you have an adaptive forecasting model, the problems of lagging and never reaching the peaks and valleys associated with moving averages or exponential smoothing still are not solved with this model.
33
Forecast Error and Performance Measures Forecast error at time t = e(t) = x(t)-f(t) MAD Mean absolute deviation = MSE Mean squared error = CFE Cumulative forecast error = MAPE Mean absolute percentage error = Tracking signal = CFE / MAD
34
Forecasting What would you want to do to forecast future values of a times series accurately? Take the exponential smoothing model and stretch it so that it reached the peaks and valleys of the data and shift it left so that it wasn’t lagging. Then forecast the future using this modified model.
35
Forecasting To adjust the model, you need a few things: Need to know that the periodicity is real and that you are not just being tricked into thinking there is a cycle when there is no cycle. Need to know how long the period is. Need to know at what time during the cycle the peaks and valleys occur -- need a mean trend line (determined by a simple regression) and a factor which is greater than or less than 1 to multiply by the trend line to get the peaks and valleys. Cyclical models make these adjustments.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.