Time series Decomposiion mehod A ime series is described using a mulifacor model such as = f (rend, cyclical, seasonal, error) = f (T, C, S, e) Long- Iner-mediaed Seasonal Irregular erm erm effec, effec, or effec or effec such as shor-erm random or economic sable paern sable cycle, paern paern demographic, weaher, echnological, produc cycle, ec. There are wo general ypes of decomposiion models, ha is an addiive and a muliplicaive. (1) Addiive: = T + C + S + e () Muliplicaive: = T C S e The deerminaion of wheher seasonal influences are addiive or muliplicaive usually can be evidenced from a plo of he daa. ime ime Addiive seasonaliy Muliplicaive seasonaliy 1
The Muliplicaive mehod for calculaion of seasonal indexes Basically, he decomposiion of a ime series is sraighforward from he idenified componens of rend, cyclical and seasonal effecs. For example, given = TCSe (1) If we wan o find he seasonal componen, hen Se TC TCSe Se TC This equaion denoes ha he seasonal and error componens equals o he acual value divided by he rend and cyclical componens. I means if we can ake ou he rend and cyclical componens from he acual series, hen he remained is he seasonal and error componens. Therefore, o calculae he seasonal indexes, firsly, we have o find he rend and cyclical componens and he calculaion is accomplished hrough he use of raio o cenered moving average mehod. () If we wan o find he rend-cyclical componen, hen he decomposiion of rend-cycle can be done by deseasonalizing he acual series by TCe S TCSe TCe S When we can idenify he seasonal componen, hen he rend-cycle of he series can be esimaed from he acual series divided by he seasonal componen. Therefore, firsly, we have o calculae deseasonalized series, and use he simple linear regression o esimae he rend in he acual series.
Example for calculaing he seasonal indexes by using he percenage of cenered Moving averages. (Table5-1, Delurgio: "Forecasing Principles and Applicaions", 1998, pp.179) Period() Acual Daa (Sales) Simple MA(4) Cenered MA Percen MA 199.1 7 199. 110 117.75 199.3 117 118.75 118.5 0.989 199.4 17 119.5 119.00 1.445 1993.1 76 1.50 10.875 0.69 1993. 11 18.00 15.5 0.894 1993.3 130 18.50 18.5 1.014 1993.4 194 130.5 19.375 1.500 1994.1 78 19.75 130.00 0.600 1994. 119 131.50 130.65 0.911 1994.3 18 13.5 131.875 0.971 1994.4 01 136.00 134.15 1.499 1995.1 81 139.5 137.65 0.589 1995. 134 143.00 141.15 0.950 1995.3 141 1995.4 16 117 118.5 Quarer Average Unadjused Seasonal Indexes Final Seasonal indexes (A) (B) 1 (0.69 + 0.600 + 0.589)/3 = 0.606 Times 0.606 (A)x1.00075 (0.894 + 0.911 + 0.950)/3 = 0.918 4.00/ 0.919 3 (0.989 + 1.014 + 0.971)/3 = 0.991 3.996 0.99 4 (1.445 + 1.500 + 1.499)/3 = 1.481 =1.00075 1.48 Toal = 3.996 4.00 The final seasonal indexes show ha he firs, second, and hird quarers of he years are seasonally low, and he fourh quarer is seasonally high. The inerpreaion of he index for quarer 1 is ha is sales ( ) are only 60.6% of he average quarerly sales of he year cenered on quarer 1. In conras, he average sales for quarer 4 are 48.% higher han he rend cyclical values of ha quarer. The number of he informaion of percen MA for each quarer, if you have more daa, han he number is larger 3
Calculaing he deseasonalized series and fied he decomposiion model: (1) () (3) (4) (5) (6) (7) Period () Trend Fied Values Error Acual Series Seasonal indexes S Deseasonalized Series TCe T TS e Calculaion From simple Calculaion Calculaion ()/(3) Regression* (3)x(5) () - (6) 199.1 7 0.606 118.75 115.56 70.06 1.938 199. 110 0.919 119.69 117.41 107.907.093 199.3 117 0.99 117.93 119.6 118.34-1.34 199.4 17 1.48 116.0 11.1 179.558-7.558 1993.1 76 0.606 15.35 1.97 74.560 1.440 1993. 11 0.919 11.86 14.83 114.75 -.75 1993.3 130 0.99 131.03 16.68 15.684 4.316 1993.4 194 1.48 130.86 18.54 190.556 3.444 1994.1 78 0.606 18.65 130.39 79.058-1.058 1994. 119 0.919 19.48 13.5 11.543 -.543 1994.3 18 0.99 19.0 134.10 133.044-5.044 1994.4 01 1.48 135.58 135.96 01.554-0.544 1995.1 81 0.606 133.59 137.81 83.556 -.556 1995. 134 0.919 145.80 139.66 18.361 5.639 1995.3 141 0.99 14.1 141.5 140.404 0.596 1995.4 16 1.48 145.70 143.37 1.55 3.448 Mean -0.803 RSE 3.5674 Forecas: 1996.1 0.606 145.9 88.054 1996. 0.919 147.083 135.180 1996.3 0.99 148.938 147.764 1996.4 1.48 150.793 3.550 * The regression is run he regression ha using he deseasonalized series (TCe) as dependen variable and he generaed "rend" as independen variable. The resul from EVIEWS is as following: Dependen Variable: TCe Mehod: Leas Squares Sample: 199:1 1995:4 Included observaions: 16 "TCe = + Trend + " The fied rend is sared from 113.7007 and increases 1.845 for each period Variable Coefficien Sd. Error -Saisic Prob. C 113.7007 1.879330 60.50068 0.0000 TREND 1.854544 0.194356 9.54011 0.0000 R-squared 0.866730 Mean dependen var 19.4644 Adjused R-squared 0.85711 S.D. dependen var 9.483946 S.E. of regression 3.58374 Akaike info crierion 5.507161 Sum squared resid 179.8049 Schwarz crierion 5.603734 Log likelihood -4.0578 F-saisic 91.04998 Durbin-Wason sa.06388 Prob(F-saisic) 0.000000 Noe: TREND is generaed by using he EVIEWS command: "GENR TREND=@rend( 199.1 ) +1". 4
Summary seps in Classical muliplicaive decomposiion: (1) Calculae a moving average equal o he lengh of he season o idenify he rend cycle. () Cener he moving average if he seasonal lengh is an even number. (3) Calculae he acual as a proporion of he cenered moving average o obain he seasonal index for each period. (4) Adjus he oal of he seasonal indexes o equal he number of periods. (5) Deseasonalized he ime series by dividing i by he seasonal index. (6) Esimaed he rend-cyclical regression using deseasonalized daa. (7) Muliply he fied rend values by heir appropriae seasonal facors o compue he fied values (8) Calculae he errors and measure he accuracy of he fi using known acual series. (9) If cyclical facors are imporan, calculae cyclical indexes. (10) Check for ouliers, adjus he acual series and repea seps from 1 o 9 if necessary. Summary seps in addiive decomposiion mehod: (1) Calculae a moving average equal o he lengh of he season. () Cener he moving average o esimae he rend cycle. (3) Subrac he cener moving average o obain he seasonal error facor for each period (4) Adjus he oal of he seasonal indexes o equal zero. (5) Deseasonlaize he ime series by subracing he final addiive seasonal indexes from he acual, and he deseasonalized values are esimaed of rend-cyclical error. (6) Compue he rend-cyclical regression equaion using deseasonalized daa. (7) Add he fied rend values and he seasonal indexes o esimae he fied values. ˆ T S (8) Calculae he errors and measure he fi using known acual series by subracing he fied from he acual series. (9) If he cyclical facors are imporan, calculae cyclical indexes. (10) Check for oulier, adjus he acual series, and repea sep 1 o 9 if necessary. 5
Example of Addiive seasonal decomposiion: (1) () (3) (4) (5) (6) (7) (8) (9) (10) Period Acual Simple Cenered Average Addiive Deseas. Trend Fied Error () Series MA(4) MA S+e Seasonal Series Series ( ) index a T+C Tˆ ˆ T ˆ S () - (4) () -(6) (8)+(6) ()-(9) 199.1 7-50.80 1.80 115.08 64.406 7.594 199. 110 117.75-10.30 10.30 117.189 106.887 3.113 199.3 117 118.75 118.5-1.50-0.760 117.760 119.170 118.410-1.410 199.4 17 119.5 119.00 53.000 61.865 110.135 11.151 183.016-11.016 1993.1 76 1.50 10.875-44.875-50.80 16.80 13.13 7.330 3.670 1993. 11 18.00 15.5-13.50-10.30 1.30 15.113 114.811 -.811 1993.3 130 18.50 18.5 1.750-0.760 130.760 17.094 16.334 3.666 1993.4 194 130.5 19.375 64.65 61.865 13.135 19.075 190.940 3.060 1994.1 78 19.75 130.00-5.000-50.80 18.80 131.056 80.54 -.54 1994. 119 131.50 130.65-11.65-10.30 19.30 133.037 1.735-3.735 1994.3 18 13.5 131.875-3.875-0.760 18.760 135.018 134.58-6.58 1994.4 01 136.00 134.15 66.875 61.865 139.135 136.999 198.864.136 1995.1 81 139.5 137.65-56.65-50.80 131.80 138.980 88.178-7.178 1995. 134 143.00 141.15-7.15-10.30 144.30 140.961 130.659 3.341 1995.3 141-0.760 141.760 14.94 14.18-1.18 1995.4 16 61.865 154.135 144.93 06.788 9.1 Mean -0.003 RSE 5.456 Calculaion of addiive seasonal indexes: Quarers Average seasonal + error Unadjused seasonal indexes Final seasonal indexes 1 (-44.875-5.000-56.65)/3 = -51.167 (-51.167-0.365) = -50.80 (-13.50-11.65-7.15)/3 = -10.667 (-10.667-0.365) = -10.30 3 (-1.50+ 1.750-3.875)/3 = -1.15 (-1.15-0.365) = -0.760 4 (53.00+64.65+66.875)/3 = 61.50 (61.50-0.365) = 61.865 mean = -0.365 The regression is run he regression ha using he deseasonalized series ("T+C") as dependen variable and he generaed "rend" as independen variable. The regression resul from EVIEWS is as following: Dependen Variable: "T+C" Mehod: Leas Squares Sample: 199:1 1995:4 Included observaions: 16 "T+C" = + Trend + " The fied rend is sared from 113.69 and increases 1.98069 for each period Variable Coefficien Sd. Error -Saisic Prob. C 113.69.96175 38.970 0.0000 TREND 1.98069 0.30697 6.466366 0.0000 R-squared 0.749166 Mean dependen var 130.063 Adjused R-squared 0.73150 S.D. dependen var 10.8945 S.E. of regression 5.647840 Akaike info crierion 6.41689 Sum squared resid 446.5734 Schwarz crierion 6.513466 Log likelihood -49.33514 F-saisic 41.81389 Durbin-Wason sa 1.93919 Prob(F-saisic) 0.000015 ê 6
Decomposiion using regression analysis The seasonal influences can be modeled by using eiher an addiive model or a muliplicaive model by using he regression as followings: Addiive regression model: Q4 1Trend Q 3Q3 4 e Where = Acual series in period Trend = ime value in period Q, Q3, Q4 = Dummy variables for each quarer and i = relevan regression coefficiens; where i=1,,3,4 The addiive seasonal influences of each quarer are inerpreed relaively o quarer 1. The esimaed is he value of quarer ha is differen o quarer 1. The esimaed 3 is he value of quarer 3 ha is differen o quarer 1. The esimaed 4 is he value of quarer 4 ha is differen o quarer 1. Check wheher he -saisics are significan o deermine he seasonal influences. Muliplicaive regression model: ln( ) Trend 1 Q Q3 3 Q4 4 e Where = Acual series in period Trend = ime value in period Q, Q3, Q4 = Dummy variables for each quarer,, i, i = relevan regression coefficiens; where i=1,,3,4 ln(x ) = logarihm values of acual series Each of he coefficiens of he dummy variables can be used o deermine is seasonal indexes by aking he anilogs. ˆ e ˆ The seasonal influence of quarer is ( ) ˆ 3 e ˆ The seasonal influence of quarer 3 is ( ) ˆ 4 e ˆ The seasonal influence of quarer 4 is ( ) The T-period ahead forecas of X is calculaed as ˆ T (ˆ e ˆ )(ˆ e ˆ T 1 )(ˆ e ˆ )(ˆ e ˆ 3 )(ˆ e ˆ 4 ) 7
Example: (Table 5-7, DeLurgio, 1998, pp.19) ime Demand Log() Trend Q Q3 Q4 ˆ ê ln ˆ 1 7 4.8 1 0 0 0 64.86 7.14 4.54 0.03 110 4.70 1 0 0 106.86 3.14 4.688 0.013 3 117 4.76 3 0 1 0 117.11-0.11 4.77-0.009 4 17 5.15 4 0 0 1 183.86-11.86 5.187-0.040 5 76 4.33 5 0 0 0 7.79 3.1 4.311 0.00 6 11 4.7 6 1 0 0 114.79 -.79 4.745-0.07 7 130 4.87 7 0 1 0 15.04 4.96 4.89 0.039 8 194 5.7 8 0 0 1 191.79.1 5.45 0.03 9 78 4.36 9 0 0 0 80.71 -.71 4.368-0.01 10 119 4.78 10 1 0 0 1.71-3.71 4.803-0.04 11 18 4.85 11 0 1 0 13.96-4.96 4.886-0.034 1 01 5.30 1 0 0 1 199.71 1.9 5.30 0.001 13 81 4.39 13 0 0 0 88.64-7.64 4.46-0.031 14 134 4.90 14 1 0 0 130.64 3.36 4.860 0.038 15 141 4.95 15 0 1 0 140.89 0.11 4.944 0.005 16 16 5.38 16 0 0 1 07.64 8.36 5.360 0.016 RSE 5.39 0.06 Check wheher -saisics is significan for each quarerly dummy variable. The addiive decomposiion indexes: Q - Q1 = 40.0 Q3 - Q1 = 48.9 Q4 - Q1 = 113.06 8
Check he -saisics of all quarerly dummy variables. The rend percenage growh rae effec is (@exp( ˆ 1)) = anilog(0.014344) = 1.01444 The seasonal influence of quarer raio o quarer 1 is (@exp( ˆ ) ) = anilog(0.400) = 1.5199 (From p.4 muliplicaive calculaion, Q/Q1 = 0.919/0.606=1.5165) The seasonal influence of quarer 3 raio o quarer 1 is (@exp( ˆ 3 ) ) = anilog(0.48997) = 1.63116 (From p.4 muliplicaive calculaion, Q3/Q1 = 0.99/0.606=1.6369) The seasonal influence of quarer 4 raio o quarer 1 is (@exp( ˆ 4 )) = anilog(0.89081) =.43710 (From p.4 muliplicaive calculaion, Q/Q1 = 1.48/0.606=.4455) 9
Esimaed Trends wih Differences A rend is an increase or decrease in a ime series ha persiss for an exend ime. Trend exiss: when seven or more observaions show a consisen rend. If a series exhibi a rend, on average he differences should be equal o he increasing or decreasing rend by being greaer or less han zero respecively. The fiing and forecasing equaion for firs differen is: F ˆ m 1 k F m ˆ m m k (Where m = he number of periods ahead for forecas) Saisical significan es for rend: Ho: On average, = - -1 =0 (no rend) H 1 : On average, < 0 or > 0 (negaive or posiive rend) Check he * b 0 S x n d Where S x is he sandard deviaion of he firs difference, d is he level of differencing. Decision rule: If he absolue * > -able, rejecs Ho, infers here is a rend If he absolue * < -able, do no rejecs Ho, infers here is no rend Advanage of forecasing wih differences: The rend is easily calculaed I is easily inerpreed Is significan is easily esed Disadvanage of forecasing wih differences: Difficul in dealing wih oulier 10
Nonlinear Trends and Seasonal Differences Nonlinear rends will use eiher muliple difference or logarihm. Logarihms are useful when he rend is a percenage growh funcion and second differences are useful when modeling quadraic funcions. The formula of nd difference is: Firs difference: 1 Second difference: ) ( 1 ( 1 ) ( 1 ) 1 1 The forecasing form, he process of second differences is: F 1 b 1 ( 1 ) b F 1 1 b Where b is he mean of nd differences and represens a rend esimae when his mean is saisically significanly differen han zero. Seasonal difference o model seasonaliy and rends Forecas = Seasonal esimae + Trend For monhly daa: For quarerly daa: F 1 1i F 4 4i 11