Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
(Lesson - 07)
Dr. C. Ertuna
Alternatively, in other circumstances we might define a time series as the product of its components or a multiplicative model often represented as a logarithmic model
X t Tt St Ct I t X t Tt St Ct I t
Dr. C. Ertuna
Dr. C. Ertuna
t 1
Ft E ( Yt ) i t k k
wY
i
t 1
Dr. C. Ertuna
To determine best weights and period (k) we can use forecast accuracy. MSE = Mean Square Error is a good measure for forecast accuracy. RMSE = is the square root of the MSE.
Data: Evens - Burglaries
10
Dr. C. Ertuna
Tools / Solver Set Target Cell: Cell containing RMSE value Equal to: Min By Changing Cells: Cells containing weights Subject to constraints: Cell containing sum of the weight = 1 Options / (check) Assume Non-Negativity Solve ----- Keep Solver Solution ----- OK
Dr. C. Ertuna
11
Best weights for a given k (in this case 3) is determined by solver trough minimizing RMSE. Same procedure could be applied to models with different ks and the one with lowest RMSE could be considered as the model with best forecasting period.
Dr. C. Ertuna 12
k=3
errors
Actual Forecast 90 80 70 60 50 40 30 20 10 0 50 51
Moving Average
52
53
54 Months
55
56
57
58
Dr. C. Ertuna
Exponential Smoothing
Exponential smoothing is a time-series smoothing and forecasting technique that produces an exponentially weighted moving average in which each smoothing calculation or forecast is dependent upon all previously observed values. The smoothing factor is a value between 0 and 1, where closer to 1 means more weigh to the recent observations and hence more rapidly changing forecast.
Dr. C. Ertuna 14
or
M onths
0.7 #N/A 48.00 ! Actual observation B2 38.90 45.97 44.59 56.08 64.42 76.73 72.72 56.82 =$C$1*B10+(1-$C$1)*C10 193.0 =SUMXMY2(B3:B10,C3:C10)/COUNT(B3:B10)
To determine best we can use forecast accuracy. MSE = Mean Square Error is a good measure for forecast accuracy.
Dr. C. Ertuna
17
Holt-Winters Model
The Holt-Winters forecasting model could be used in forecasting trends. Holt-Winters model consists of both an exponentially smoothing component (E, w) and a trend component (T, v) with two different smoothing factors.
Dr. C. Ertuna
18
Holt-Winters Model
Ft k E t kTt
where:
E t wYt 1 ( 1 w )( E t 1 Tt 1 ) Tt v ( E t E t 1 ) ( 1 v )Tt 1
Ft+k= Forecast value k periods from t 1. E and T are 1 1 Yt-1 = Actual value for period t-1 not defined. Et-1 = Estimated value for period t-1 2. E = Y 2 2 Tt = Trend for period t 3. T2 = Y2 Y1 w = Smoothing constant for estimates v = Smoothing factor for trend Dr. C. Ertuna 19 k = number of periods
Holt-Winters Model
A 1 2 Month 3 1 4 2 5 3 6 4 7 5 8 6 9 7 10 8 11 9 12 10 13 11 14 12 15 13 B C D E w= 0.7 0.5 = v Sales E T F 4.8 N/A N/A 4.0 4.0 -0.8 5.5 4.8 0.0 3.2 15.6 12.4 3.8 4.8 23.1 21.0 6.2 16.1 23.3 24.5 4.8 27.2 31.4 30.8 5.6 29.3 46.0 43.1 8.9 36.3 46.1 47.9 6.9 52.1 41.9 45.8 2.4 54.8 45.5 46.3 1.4 48.1 53.5 51.8 3.5 47.7 55.24
Holt-Winter Forecasting 60.0 50.0 40.0 30.0 20.0 10.0 0.0
1 2 3 4 5 6 7 8 9 10 11 12 13
Sales
Sales F
Months
E_2 = Y_2 and T_2 = (Y_2-Y_1) E_12 = $D$1*C14+(1-$D$1)*(D13+E13) T_12 = $E$1*(D14-D13)+(1-$E$1)*E13 Dr. F_13 = D14+E14 C. Ertuna 20
Holt-Winters Model
Set E (smoothing component), T (trend component), and F (forecasted values) columns next to Y (actual observations) in the same sequence Determine initial w and v values Leave E,T &F blanc for the base period (t=1) Set E2 = Y2 Set T2 = Y2-Y1 Note: (F2 is blanc)
Dr. C. Ertuna 21
Holt-Winters Model
Formulate E3 = w*Y3 + (1-w)*(E2+T2) Formulate T3 = v*(E3-E2) + (1-v)*T2 Formulate F3 = E2 + T2 Copy the formulas down until reaching one cell further than the last observation (Yn). Compute MSE using Ys and Fs Use solver to determine optimal w and v.
Dr. C. Ertuna 22
Holt-Winters Model
Solver set up for Holt Winters: Target Cell: MSE (min) Changing Cells: w and v Constrains: w <= 1 w >= 0 v <= 1 v >= 0
Dr. C. Ertuna 23
[Data Attribute] Data is in periods, etc. Next [Method Gallery] Select All Next [Results] Number of periods to forecast [1] Select Past Forecasts at cell Run
Dr. C. Ertuna 24
Dr. C. Ertuna
25
Method Errors: Parameter Value Best : Method Double Exponential Smoothing Single Exponential Smoothing Single Moving Average Double Moving Average RMSE MAD MAPE
25.0 20.0 Data 15.0 Fitted Forecast 10.0 5.0 0.0 Upper: 95% Low er: 5%
17.0
19 75
19 77
19 79
19 81
19 83
19 85
19 87
19 89
19 91
19 93
19 95
19 97
Dr. C. Ertuna
19 99
26
Performance of a Model
Performance of a model is measured by Theils U. The Theil's U statistic falls between 0 and 1. When U = 0, that means that the predictive performance of the model is excellant and when U = 1 then it means that the forecasting performance is not better than just using the last actual observation as a forecast.
Dr. C. Ertuna 27
Determining Performance
Theils U determins the forecasting performance of the model. The interpretation in daily language is as follows:
Interpret (1- Theil U) 1.00 0.80 High (strong) forecasting power 0.80 0.60 Moderately high forecasting power 0.60 0.40 Moderate forecasting power 0.40 0.20 Weak forecasting power 0.20 0.00 Very weak forecasting power
Dr. C. Ertuna 30
Explanatory Methods
Simple Linear Regression Model: The simplest inferential forecasting model is the simple linear regression model, where time (t) is the independent variable and the least square line is used to forecast the future values of Yt.
Dr. C. Ertuna
32
Ft E ( Yt ) 0 1 t t
where:
Yt = Value of trend at time t 0 = Intercept of the trend line 1 = Slope of the trend line t = Time (t = 1, 2, . . . )
Dr. C. Ertuna 33
Seasonal Regression
MegaWatts Power Load 106.8 89.2 110.7 91.7 108.6 98.9 120.1 102.1 113.1 94.2 120.5 107.4 116.2 104.4 131.7 117.9
Seasonal Regression
Year Q1 Q2 Q3 1973.1 1 0 0 1973.2 0 2 0 1973.3 0 0 3 1973.4 0 0 0 1974.1 1 0 0 1974.2 0 2 0 1974.3 0 0 3 1974.4 0 0 0 1975.1 1 0 0 1975.2 0 2 0 1975.3 0 0 3 1975.4 0 0 0 1976.1 1 0 0 1976.2 0 2 0 1976.3 0 0 3 1976.4 0 0 0
135.00 130.00 125.00 120.00 115.00 110.00 105.00 100.00 95.00 90.00 85.00 80.00
19 73 .1 19 73 .2 19 73 .3 19 73 .4 19 74 .1 19 74 .2 19 74 .3 19 74 .4 19 75 .1 19 75 .2 19 75 .3 19 75 .4 19 76 .1 19 76 .2 19 76 .3 19 76 .4
Power
Year/Quarter
Next Lesson
(Lesson - 09)
Introduction to Optimization
Dr. C. Ertuna
37