3 Time Series Regression

Size: px
Start display at page:

Download "3 Time Series Regression"

Transcription

1 3 Time Series Regression 3.1 Modelling Trend Using Regression Random Walk Random Walk (a) Time (b) Time Random Walk Random Walk (c) Time (d) Time Figure 7: Plot of four simulations of a random walk process showing four different trends. Sometimes the trend in a series is caused by strong serial correlation between adjacent observations and the fact that the variance is changing with time. In this case, it is not the mean that is changing with time and thus cannot be modelled by a time dependent regression model. Such trends in a series are commonly referred to as stochastic trend. 31

2 A good example of a process which exhibits stochastic trend is the random walk process defined by Y 1 = a 1, Y t = Y t 1 + a t, t 2, (1.7) where a t WN(0, 1) is a white noise process. It is easy to show that the random walk process Y t has zero mean. From (1.7), we can write μ 1 = E(Y 1 )=0, and for t 2 we have μ t = E(Y t )=E(Y t 1 )+E(a t )=E(Y t 1 )=μ t 1. (1.8) It follows that μ 1 = μ 2 = μ 3 = = μ =0. That is, μ t =0, for t 1. So, a time plot of data simulated from the random walk process should exhibit no evidence of trend. However, four different simulations of 60 observations from the same random walk process displayed in Figure 7 is showing four different trend components. One of the reasons is in the fact that the variance of the random walk is a function of time. Now, σ1 2 = Var(Y 1 )=Var(a 1 )=σa. 2 Also, for t 2 we have σt 2 = Var(Y t )=E(Yt 2 ) μ 2 t = E[(Y t 1 + a t ) 2 ] = E(Yt 1)+2E(a 2 t Y t 1 )+E(a 2 t ) = σt σa. 2 Solving this recursively, we can show that σt 2 = Var(Y t ) = tσa, 2 for t 1. Thus, the variance of the random walk is an increasing function of time. We can also show that the autocorrelation ρ(k) between adjacent observations is ρ(k) =1. To see this, we note that the autocovariance function at lag k>0 is given by γ(k) = E(Y t Y t k ) μ t μ t k = E(Y t 1 Y t k )+E(a t Y t k ), since μ t =0, = γ(k 1) + E(a t )E(Y t k )=γ(k 1), since Y t k is independent of a t. This implies that γ(0) = γ(1) = = γ(k), for any k>0. Therefore, ρ(k) = γ(k) =1. γ(0) Thus, the strong positive autocorrelation between adjacent observations and the increasing variance of the process causes any simulated series from the process to appear to have a trend component. 32

3 On the other hand, if the trend in a series is caused by the fact that the mean is changing with time, then it may be possible to use time dependent regression models to represent the trend component. The reason for the trend in the series, such as long term growth or decline in sales or economic activity or changing weather patterns, should be very clear. Such trend components are said to be deterministic. Furthermore, there has to be good reason for assuming a particular time dependent model (linear or a curve) for the trend because the assumption is that the same trend pattern or model will continue into the future. Consider a time series y t, t =1, 2,...,n, that exhibits increasing, decreasing or curvilinear deterministic trend TR t. Time series regression models are models which relate the observed values y t, t =1, 2,...,n of the random variable Y t,t Zindexed by time to some function of time. These models are commonly used to represent and therefore extract the trend component TR t of a time series under the assumption that the general direction of the series will continue into the future. That is, if the trend TR t, t =1, 2,...,n, is a linear function of time, we assume that the trend will continue to be linear in the future over a period of time, say t = n +1,n+2,... This assumption enables us to forecast or extrapolate future trend values. If this assumption fails, the extrapolated trend value will not represent the future trend value of the series and will therefore be unreliable. It is therefore a bad idea to use these models to forecast the trend value too far into the future. Example 3.1 To fix ideas, consider a plot of the time series data for shown in Figure 7. Figures 7(a), (c) and (d) appear to exhibit trends that are curvilinear whereas the trend in the beer production data in Figure 7(b) is linear. First, we observe that the fluctuations of the series in Figure 7(a) appear to be stable until 1930 when it becomes larger. Thus, a transformation is required to stabilize the variation about the trend line. Otherwise, it may be very difficult to model the trend in the data. We take the natural logarithm of each point in the series to obtain yt = log e (y t ). When a time series displays increasing or decreasing variation in fluctuations, it is a good idea to apply a transformation to the data in order to stabilize the variation over time before further analysis of the data is performed. A transformation of the form yt = yt λ, where λ < 1 is often used. In practice, each of the transformations is applied to the data until one that stabilizes the variance is found. Some commonly used transformations are: 33

4 1. The natural logarithm transformation (λ =0): y t = log e y t. 2. Square root transformation: y t = y 0.5 t. 3. Inverse square root transformation: y t = y 0.5 t. 4. Inverse transformation: y t = y 1 t. Now, assuming that there is no interaction between components of the series in Figure 7, we can hypothesize the following representation of the series 1. U.S. Tobacco Production: yt = ln(y t )=TR t + u t, where TR t is the trend component and u t are the remaining components of the series. 2. Beer Production: y t = TR t + S t + u t, where TR t is the trend component, S t is the seasonal variation and u t are the remaining components of the series. 3. Male Employment: y t = TR t + S t + C t + u t, where TR t is the trend component, S t is the seasonal variation, C t is cyclical variation and u t are the remaining components of the series. 4. Propane gas: y t = TR t + u t, where TR t is the trend component, and u t are the remaining components of the series. Using the regression techniques we reviewed in the previous sections, we consider the following time series models for the trend component of the data in Figure 7. (a) For the transformed tobacco data, we consider the quadratic trend model yt = TR t + z t = β 0 + β 1 t + β 2 t 2 + z t, t =1, 2,...,114. (b) For the beer production data in Figure 7(b), we consider the linear trend model y t = TR t + z t = β 0 + β 1 t + z t, t =1, 2,...,32. (c) For the male employment data in Figure 7(c), we consider the cubic trend model y t = TR t + z t = β 0 + β 1 t ++β 2 t 2 + β 3 t 3 + z t, t =1, 2,...,

5 loge(pounds) Barrels (millions) (a) Year (b) Quarter Employed males (thousands) Gas bill (c) Month (d) Quarter Figure 8: Plot of (a) Natural og of Yearly U.S. tobacco production (b) Quarterly U.S. beer production (c) Monthly male (16 and 19yrs) employment figures (d) Quarterly propane gas bills for Farmers Bureau Co-op for ten years; with overlaid estimated trend components. (d) For the gas bill data in Figure 7(d), we consider the quadratic trend model y t = TR t + z t = β 0 + β 1 t + β 2 t 2 + z t, t =1, 2,...,40. Notice that some of the series in Figure 7 also contain other components, such as seasonal and irregular variations. The variable z t in the trend models represent these other components 35

6 of y t. If the trend models are suitable for the data, the points on a time plot of ẑ t should vary about a fixed level. That is, the plot should not exhibit any upward, downward or curvilinear pattern indicative of the presence of a trend component. Detrended pounds Detrended barrels (a) Year (b) Quarter Detrended employed males Detrended bill (c) Month (d) Quarter Figure 9: Plot of (a) Detrended Yearly U.S. tobacco production (b) Detrended Quarterly U.S. beer production (c) Detrended Monthly male (16 and 19yrs) employment figures (d) Detrended Quarterly propane gas bills for Farmers Bureau Co-op for ten years. Using regression methods we find that the estimated trend line or curve for the transformed 36

7 tobacco data is tr t = ˆ TR t = t t 2, t =1, 2,...,114, and tr ttrt ˆ = t, t =1, 2,...,32, for the beer production data. We find that the cubic model that was proposed was not adequate for modeling trend in the employment data. In fact, it is very difficult to extract the trend component in the employment data by means of polynomial regression. We have therefore employed other methods, that will be discussed later, in removing the trend in the employment data. For the propane gas bill data we find that tr t = ˆ TR t = t t 2, t =1, 2,...,40. Figure 8, shows the detrended data for the four time series. It is clear that the regression approach was not successful in eliminating trend in the employment series. This may be due to the fact that the trend component is stochastic and not deterministic. We will study a different approach for eliminating the trend effect in such series. Polynomial trend models defined by y t = TR t + z t = β 0 + β 1 t + β 2 t β p t p + z t, t =1,...,n, are the most commonly used in modelling trend in a time series. Cubic (p =3) and higherorder (p >3) polynomials model trends with one or more reversals in curvature. For instance, a cubic polynomial trend describes a trend with one reversal of curvature. 3.2 Detecting Autocorrelation The tobacco production data is an example of a time series that contain the trend component and irregular fluctuations. The z t in such a series is then a mixture of irregular fluctuations and random error or simply random error only. If we can show that observations k distances apart in the series z t are correlated (called lag k autocorrelation), then we will attempt to model the correlation structure in the series and combine it with the trend model to obtain a more accurate forecast of the series. A simple test for detecting first-order autocorrelation is the Durbin-Watson test. This test can only detect the presence of correlation between observations k =1(first-order or lag 1) distance apart. et ρ 1 be a measure of first-order correlation in z t. The Durbin-Watson test procedure is as follows: 37

8 1. Null Hypothesis: H 0 : ρ 1 =0(the z t s are not autocorrelated). 2. Alternative hypothesis: H a : ρ 1 0(the z t s are positively or negatively autocorrelated). 3. Test statistic value: where ẑ t = y t ˆ TR t d = nt=2 (ẑ t ẑ t 1 ) 2 nt=1, ẑt 2 4. Decision rule: a) Reject H 0 if d<d,α/2 or if (4 d) <d,α/2. b) Do not reject H 0 if d>d U,α/2 and if (4 d) >d U,α/2. c) The test is inconclusive if d,α/2 d d U,α/2 and d,α/2 (4 d) d U,α/2. Tables containing the points d,α and d U,α can be found in Appendix A of the course text for various values of α. Most computer packages, including MINITAB have options for the Durbin-Watson test. The validity of the Durbin-Watson test depends on the assumption that the distribution of z t at any time t is the normal distribution. We note that the test may lead to an inconclusive result. In such cases, the sample autocorrelation function (to be discussed) can be used to detect autocorrelation in z t. As an example, consider the detrended tobacco production data shown in Figure 8(a). It can be verified that, for this data d = Now,atα =0.05, we find that d,0.05 > 1.63, d U,0.05 > 1.72, for 2 independent variables and n> Modelling Seasonal Variation By Using Dummy Variables The beer production data is an example of a time series that exhibits trend (TR t ), seasonal variations (SN t ), irregular and random variations that are due to noise. In such cases, one way of representing the series y t is y t = TR t + SN t + u t, t =1, 2,...,n, where u t is a random error component or a combination of irregular variations and random error. One way to model the seasonal variation SN t is to employ dummy variables. Assuming 38

9 that there are seasons (months, quarters, weeks, etc.) per year, one can express the seasonal factor SN t as SN t = β s, + β s1 x s1,t + β s2 x s2,t + + β s,( 1) x s( 1),t, where x s1,t = x s2,t = x s( 1),t = { 1 if time period t is season 1 0 otherwise, { 1 if time period t is season 2 0 otherwise, { 1 if time period t is season 1 0 otherwise. Example 3.2 As an example let us use dummy variables to model the seasonal pattern in the beer production data. Since the data is a quarterly data, we have =4. For this purpose, we define x s1,t = x s2,t = x s3,t = { 1 if time period t is first quarter 0 otherwise, { 1 if time period t is second quarter 0 otherwise, { 1 if time period t is third quarter 0 otherwise. First, we model the trend in the series as in 3.1 to obtain tr t =ŷ t = t. The estimated trend line is shown overlaid on Figure 10(a). It is clear that the residuals in Figure 10(b) contains seasonal fluctuations. Using dummy variables we then propose the model z t = y t ŷ t = SN t + u t = β s4 + β s1 x s1,t + β s2 x s2,t + β s3 x s3,t + u t, t =1, 2,, 32. Using the R software, we obtain the fitted seasonal effects model given by sn t =ẑ t = x s1,t x s2,t x s3,t, t =1, 2,,

10 Barrels (millions) Detrended barrels (b) Quarter (b) Quarter Seasonal effect Seasonally adjusted barrels (d) Quarter (d) Quarter Figure 10: Plot of (a) Beer production series and trend line (b) Detrended beer series; (c) Estimated seasonal effects; and (d) Detrended and seasonally adjusted beer production data. In Figure 10(c) we display the estimated seasonal effects for the first year, 1975, only since the effects are periodic. That is, repeat themselves from year to year. Based on the estimated model, beer production is highest in the second quarter followed by the third, first and then the fourth quarter. Combining the trend and seasonal effects model we obtain ŷ t = tr t + sn t = t x s1,t x s2,t x s3,t, t =1, 2,, 32. The plot of the detrended and seasonally adjusted beer production data, û t = y t tr t sn t, 40

11 in Figure 10 shows that using very straightforward multiple regression methods involving dummy variables we can remove both trend and the seasonal components of a time series. That is, a nonstationary time series can be transformed into a stationary time series by means of multiple regression analysis. We observe that the estimated coefficients of the dummy variables are all positive. This implies that, if we exclude trend, on the average beer production in the first quarter is expected to be higher than the value in the fourth quarter. Similarly, we expect beer production in the second and third quarters to be higher than production in the fourth quarter. We see that ˆβ s2 = > ˆβ s3 =9.609 > ˆβ s1 = This indicates that if we exclude trend beer production is higher in the second quarter than in the third quarter by approximately = 1.643units on the average, and so on. This information is one that the production department will certainly find helpful in planning for the next year. The next step is to test for autocorrelation in the detrended and deseasonalized data û t. Using the R software, we find that the Durbin-Watson test statistic d = At α =0.05, we find that for n p 1=4and n =32, d,0.05 =1.18 and d U,0.05 =1.73. Since d,0.05 < <d U,0.05, the test for lag 1 positive autocorrelation is inconclusive based on the Durbin-Watson s test. The test for negative autocorrelation, however, lead us to conclude that there is no first-order autocorrelation in the remaining series since (4 1.06) = 3.94 > d U,0.05. At α =0.01 the test for positive and negative autocorrelation both lead to the conclusion that there is no autocorrelation in the detrended and deseasonalized data. We will confirm this finding later on in our discussion by computing and testing the sample autocorrelation function for this data at various lags. Example 3.3 To fix ideas, we use dummy variables and regression methods to model the trend and seasonal variation in the time series, y t, on monthly international airline passengers from For this data, we have =12seasons. A time plot of the data, shown in Figure 10 indicates that a transformation is needed to stabilize variance. After several trials, we find that the best transformation for this data is yt = log e (log e (y t )). In Figure 11(a) we plot the airline passenger data under the transformation yt = log e (log e (y t )) and overlay the trend tr t based on a quadratic trend model, on the time plot. Figure 11(b) 41

12 Total passengers (thousands) Detrended totals (b) Month (b) Month Seasonal effect Seasonally adjusted totals (d) Month (d) Month Figure 11: Plot of (a) natural log of natural log of monthly total international airline passengers (thousands), ; (b) Detrended loglog(passenger) series; (c) Estimated seasonal effects; and (d) Detrended and seasonally adjusted loglog(passenger) data. shows the detrended series ẑ t for transformed series. Combining the trend model and using dummy variables, the model we adopt for modelling the trend and seasonal components is y t = TR t + SN t + u t = β 0 + β 1 t + β 2 t 2 + β s1 x s1,t + β s2 x s2,t + + β s11 x s11,t + u t, t =1, 2,...,

13 Modelling only trend we obtain tr t = t t 2, t =1, 2,...,132. The model for seasonal effects only was found to be sn t = x s1,t x s2,t x s3,t x s4,t x s5,t x s6,t x s7,t x s8,t x s9,t x s10,t x s11,t. It follows that the combined model for trend and seasonal effects is tr t + sn t = t t x s1,t x s2,t x s3,t x s4,t x s5,t x s6,t x s7,t x s8,t x s9,t x s10,t x s11,t, t =1, 2,...,132. The estimated parameters show that excluding trend, the monthly total for November is, on the average, lower than the monthly total in December. However, the monthly total for each of January to October are, on the average, higher than that of December with the highest occuring in July and August. So, airlines will expect July and August to be the peak months and prepare adequately for that. This analysis simply confirms what the airlines probably already know. We display the detrended and deseasonalized data in Figure 11. We see that this plot no longer exhibit any trend or seasonal pattern. The detrended and seasonally adjusted monthly series can now be tested for lag 1 autocorrelation by using the Durbin-Watson test. 3.4 Modelling Seasonal Variation By Using Trigonometric Functions Sometimes regression models involving trigonometric terms can be used to model constant or increasing seasonal variation. et be the number of season s in the series, then two models that can be used to represent a seasonal time series are as follows. 1. For constant seasonal variation: or y t = β 0 + β 1 t + + β p t p + β p+1 sin ( 2πt y t = β 0 + β 1 t + + β p t p + β p+1 sin ( 4πt 4πt + β p+3 sin + β p+4 cos 2πt 2πt + β p+2 cos + u t, (1.1) ) + β p+2 cos 2πt ) + u t. (1.2) 43

14 2. For increasing seasonal variation: ( 2πt y t = β 0 + β 1 t + + β p t p + β p+1 sin ( 2πt 2πt + β p+3 tsin + β p+4 tcos ) + β p+2 cos 2πt ) + u t, (1.3) or 2πt 2πt y t = β 0 + β 1 t + + β p t p + β p+1 sin + β p+2 cos 2πt 2πt 4πt + β p+3 tsin + β p+4 tcos + β p+5 sin 4πt 4πt 4πt + β p+6 cos + β p+7 tsin + β p+8 tcos + u t. (1.4) We now have two possible approaches to analysing a time series with increasing seasonal variation. An analyst can transform the increasing seasonal variation to stabilize variance and then apply the trigonometric model for constant seasonal variation or a model with dummy variables to the transformed series or apply the more complicated model for increasing seasonal variation to the original series. In Figure 13, we display a plot of the detrended and deseasonalized series obtained by applying either method to the monthly total of international airline passengers. For this data, =12. We found that the series û t = yt tr t sn t obtained by applying model (1.1) to the transformed monthly data still retained some periodic behaviour (see Figure 12a,b). This suggests that model (1.1) is not adequate for the transformed series. However, the series û t = yt tr t sn t obtained by applying model (1.2) to the transformed monthly data showed no sign of periodic fluctuations or trend, indicating that the model is adequate for the transformed series. When each of models (1.3) and (1.4) where applied to the original series we found that the seasonal effects estimates from both models do not match the patterns in the original series (see Figures 13a,c). Excluding trend, the fitted trigonometric models (1.1) and (1.2) for constant seasonal fluctuations are respectively, πt πt ŷt = sin cos, (1.5) 6 6 and ŷ t = sin πt cos 6 πt sin 6 πt cos 3 πt, (1.6) 3 where yt = log e (log e (y t )). Note that to apply, models (1.3) and (1.4) for increasing seasonal fluctuations, no transformation to stabilize variance is needed. Thus, excluding trend the fitted models for increasing seasonal fluctuations (1.3) and (1.4) are πt πt πt πt ŷ t = sin cos tsin tcos.(1.7)

15 Seasonal effect Seasonally adjusted totals (a) Month (b) Month Seasonal effect Seasonally adjusted totals (c) Month (d) Month Figure 12: Plot of (a) seasonal effect estimates of natural log of natural log of monthly total international airline passengers (thousands), based on (1.1); (b) seasonally adjusted totals based on (1.1) (c) seasonal effect estimates based on (1.2); and (d) seasonally adjusted totals based on (1.2). and πt ŷ t = sin 7.084cos 6 ( πt πt tsin tcos cos ( πt 3 ) tsin ( πt 3 πt 6 ) sin ) tcos πt 3 ( πt 3 ), (1.8) 45

16 Seasonal effect Seasonally adjusted totals (d) Month (d) Month Seasonal effect Seasonally adjusted totals (d) Month (d) Month Figure 13: Plot of (a) seasonal effect estimates of natural log of natural log of monthly total international airline passengers (thousands), based on (1.3); (b) seasonally adjusted totals based on (1.3) (c) seasonal effect estimates based on (1.4); and (d) seasonally adjusted totals based on (1.4). respectively. 4 DECOMPOSITION METHODS - CHAPTER 7 So far, we have studied how regression methods involving time (t), dummy variables and trigonometric functions can be used to model trend and seasonal variations in a time series. 46

17 In this section we begin discussion on models and methods for decomposing a time series into the various components. The basic idea is to decompose a time series into trend, seasonal, cyclical and irregular variations. Then, under the assumption that these patterns will not change in the near future, the estimates of these factors can be used to compute point forecast. 4.1 Multiplicative Decomposition Multiplicative decomposition is generally used when a time series exhibits increasing or decreasing seasonal variation. That is, transformations to stabilize increasing or decreasing seasonal fluctuations is not necessary in order to apply the multiplicative decomposition model. The classical multiplicative decomposition model is defined by y t = TR t SN t C t IR t where 1. y t = observed value of the time series at time t 2. TR t = trend component at time t 3. SN t = seasonal component at time t 4. C t = cyclical component at time t 5. IR t = irregular component at time t. One may wish to refer to 1.1 to remind themselves of the definition of each of these components. In Chapter 3, we used an additive regression model to model trend and seasonality in the sense that the model was the sum of trend, seasonal variations and other components. For such models to be effective in modelling the series, it was required that the series be transformed to stabilize variance (except when applying model (1.3) or (1.4)). By virtue of the structure of the multiplicative model, it is assumed that as trend is increasing (or decreasing), the size of the seasonal or periodic fluctuation is also increasing (or decreasing). That is, the size of the seasonal swing is proportional to the trend. In order words, unstable or time dependent variation is built into the multiplicative model. This means that a series exhibiting nonconstant variance (in the form of increasing or decreasing sesonality) does not need to be transformed to stabilize variation before this decomposition method can be used. The original data is used directly in the computations. The decomposition proceeds as follows. 47

18 1. et be the period of the series. Use a centered moving average (CMA) to smooth out the high frequency components (low-pass filter) and allow us to estimate TR t C t. The CMA is called a low-pass filter because it allows the low frequency components TR t C t to pass while trapping the high frequency components. This is like filtering a time series. Thus, the technique can also be called filtering. That is, we use a centered moving average to compute CMA t = tr t + cl t. et q =. In general, a centered 2 moving average is defined by CMA t = tr t cl t = q j= q a j y t j, t = q +1,q+2,...,n q, where a q = a q = 1 and a 2 q+1 = = a q 1 =1. As an example, for a quarterly data with =4and q =2,wehave CMA t = 1 2 y t 2 + y t 1 + y t + y t y t+2 4, t =3, 4,...,n 2. We note that q j= q a j = and the expression is centered at y t. That is, we find the same number of terms on both the left and right side of y t. We also note that CMA t will have only n values with the first q and the last q values missing. 2. Divide y t by CMA t to obtain sn t ir t. That is, sn t ir t = y t tr t cl t, t = q +1,...,n q. 3. Group the values of sn t ir t into the periods or seasons (months for monthly data and quarters for quarterly data) of the series and compute sn t = average of sn t ir t values in each group or month or quarter or weeks or season. If the series is a monthly data, there will be =12values of sn t, corresponding to an estimate of the seasonal effect on y t in each month (similarly for quarterly or weekly series). We wish to emphasize that only seasonal effect estimates are computed due to the assumption that seasonal effects are periodic and are therefore the same at each season of each year. The seasonal effects estimates should sum to. If not, we normalize the effects by multiplying each value of sn t by the factor That is, sn t = nfs sn t. nfs = t=1. sn t 4. The deseasonalized series is then computed by d t = yt sn t. 48

19 5. Fit a suitable regression model to the trend in d t. That is, estimate the parameters in the model E(d t )=TR t = β 0 + β 1 t β p t p, for a suitable value of p to obtain tr t. 6. To estimate the cyclical component we then compute y t cl t ir t =. tr t sn t For monthly and quarterly series, it has been found that the cyclical variation can be estimated by means of a three-period moving average given by cl t = cl t 1ir t 1 + cl t ir t + cl t+1 ir t+1, t =2, 3,...,n If most of the values of cl t are close to 1 and there is no well-defined cyclical pattern in the series, the series does not contain a cyclical component. It then follows that cl t ir t = ir t. The irregular fluctuations by their nature has no recognizable pattern. Thus, we test the values of ir t for lag k autocorrelation. If one exist we have to model the correlation structure (to be discussed) and use it to improve on the forecast. Supposing the model for the autocorrelation structure is denoted by w t. Then, the model for forecasting is ŷ t = tr t sn t w t. If evidence in the data suggests that there is no lag k autocorrelation, the model reduces to ŷ t = tr t sn t. As an example, consider the monthly sales of Tasty Cola (in hundreds of cases) in Figure 14. Following Steps 1 to 6, we construct the table showing the values of sn t and tr t below. From step 1, we obtain 6j= 6 a j y t j CMA t = tr t + cl t =, t =7, 8,...,30, 12 where a 6 = a 6 = 1 and a 2 5 = = a 5 =1. For example, CMA 7 = 6j= 6 a j y 7 j tr 7 + cl 7 = 12 = y y 11 + y y = =

20 Multiplicative Decomposition of Tasty Cola Sales Time series CMA t = sn t ir t = tr t = y Time Sales tr t cl t t tr t cl t sn t d t = yt sn t t Similarly, CMA 8 = 6j= 6 a j y 8 j tr 8 + cl 8 = 12 = y y 12 + y y

21 1 2 = = 455.2, and so on. Since January corresponds to time points 1, 13 and 25, we find that Similarly, we find that We also find that sn 1 = = sn 2 = =0.595,, sn 7 = =1.4655,, 2 2 sn 12 = = t=1 2 sn t = Therefore, we normalize each sn t so that they add up to =12.Now, nfs = t=1 = 12 sn t = It follows that sn t = nfs sn t. That is, sn 1 = = , sn 2 = , sn 7 = and so on. Once the seasonal effects have been estimated, the seasonally adjusted series and the estimated trend curves can be computed as shown in the table. Calculations of the cl t values for the tasty cola series show that the values of cl t are close to 1 and there is no well-defined cyclical pattern in the data. If we assume, for convenience, that ir t has no lag k autocorrelation, we then have ŷ t = tr t sn t = ( t) sn t, t =1, 2,...,36. Now, under the assumption that the trend and seasonal patterns will be the same in the fourth year, our forecast for year four is shown in the table below. 51

22 Sales Seasonal effects (a) Month (b) Month Seasonally adjusted sales Irregular fluctuations (c) Month (d) Month Figure 14: Plot of (a) Monthly sales of tasty cola (in hundreds of cases) with an overlaid trend line, (b) Estimated seasonal effect on monthly sales (c) Deseasonalized or seasonally adjusted sales of tasty cola (d) Irregular fluctuations or stationary tasty cola sales. Forecast for Tasty cola sales in Year 4 and Actual Sales y t t sn t tr t = t ŷ t = tr t sn t y t

23 4.2 Additive Decomposition By contrast to the multiplicative decomposition model, additive decomposition is more suitable for time series that exhibits constant seasonal swings. The classical additive decomposition model is defined by y t = TR t + SN t + C t + IR t where 1. y t = observed value of the time series at time t 2. TR t = trend component at time t 3. SN t = seasonal component at time t 4. C t = cyclical component at time t 5. IR t = irregular component at time t. Observe that by taking the logarithm of the classical multiplicative model we have log e y t = log e TR t + log e SN t + log e C t + log e IR t, which we can rewrite as y t = TR t + SN t + C t + IR t, where yt = log e y t and so on. This representation implies that the multiplicative model can be transformed into an additive model by means of a logarithmic transformation. That is, a time series with increasing or decreasing seasonal swings should be transformed by taking the logarithm of the series before the series can be decomposed into its components by the additive model. The additive decomposition proceeds as follows. 1. et be the period of the series. Use the centered moving average (CMA) to smooth out the high frequency components (SN t + IR t ) (low-pass filter) and then estimate TR t + C t. That is, q j= q a j y t j CMA t = tr t + cl t =, t = q +1,q+2,...,n q, where a q = a q = 1 and a 2 q+1 = = a q 1 =1. Again, we note that q j= q a j = and the expression is centered at y t. We also note that CMA t will have only n values with the first q and the last q values missing. 53

24 2. Subtract CMA t from y t to obtain sn t + ir t. That is, sn t + ir t = y t (tr t + cl t ), t = q +1,...,n q. 3. Compute sn t = average of sn t +ir t values in each season or month or quarter or weeks. If the series is a monthly data, there will be =12values of sn t, corresponding to an estimate of the seasonal effect on y t in each month (similarly for quarterly or weekly series). The seasonal effects estimates should sum to zero. If not, we normalize the effects by subtracting df s from each value of sn t, where t=1 sn t df s =. That is, sn t = sn t df s. 4. The deseasonalized series is then computed by d t = y t sn t. 5. Fit a suitable regression model to the trend in d t. That is, estimate the parameters in the model E(d t )=TR t = β 0 + β 1 t β p t p, for a suitable value of p to obtain tr t. 6. To estimate the cyclical component we first compute cl t + ir t = y t tr t sn t. For monthly and quarterly series, it has been found that the cyclical variation can be estimated by using a three-period moving average to average out the irregular fluctuations ir t. The moving average is given by cl t = (cl t 1 + ir t 1 )+(cl t + ir t )+(cl t+1 + ir t+1 ), t =2, 3,...,n If most of the values of cl t are close to 0 and there is no well-defined cyclical pattern in the series, the series does not contain a cyclical component. It then follows that cl t + ir t = ir t. The irregular fluctuations by their nature has no recognizable pattern. Thus, we test the values of ir t for lag k autocorrelation. If one exist we have to model the correlation structure (to be discussed) and use it to improve on the forecast. Supposing the model for the autocorrelation structure is denoted by w t. Then, the model for forecasting is ŷ t = tr t + sn t + w t. If evidence in the data suggests that there is no lag k autocorrelation, the model reduces to ŷ t = tr t + sn t. 54

25 4.3 Shifting Seasonal Patterns We had assumed that seasonal effects are periodic and therefore remain constant for each season of a given year. For instance, consider sn t ir t values for the Tasty Cola time series computed in the previous section. Notice that for a given season, say January, the values of sn t ir t are approximately the same from year to year (0.495 and 0.490). Similarly for February,.583 and.607 respectively. Examining all the values of sn t ir t for any given month, we find that the values are almost the same. In such cases, we can assume that the seasonal effects are fixed and not shifting. This may not be the case all the time. There are situations where the seasonal effects for a given season follow a given pattern from year to year, such as decreasing or increasing. That is, the values of sn t ir t for January may show an increasing pattern, while the values for another month may be decreasing, and so on. When this happens, we say that the series has a shifting seasonal pattern. If one is not sure whether a seasonal pattern is fixed or shifting, it is best to plot the values of sn t ir t for a fixed season (you should have plots in all). See, for instance Figure 15. The plots should show whether it is fixed, decreasing or increasing. When analyzing a time series with a shifting seasonal pattern, it is wrong to use the sn t, t =1, 2,..., values in computing the forecast at time t = n +1,n+2,...,n+ as we did in the example on Tasty Cola Sales. We must fit an appropriate model (regression model in most cases) to the values of sn t ir t for each season, then use the model to extrapolate the values of sn t ir t for t = n +1,n+2,...,n+. The new values are then normalized, as before, so that the values will sum to. As an example, consider the sn t ir t values shown in the table below for y t = quarterly blizzard snow blower sales by the the Winters Corporation. sn t ir t values for snow blower sales Quarter Year 1 Year 2 Year 3 Year 4 Year A plot of the values of sn t ir t for each season (quarter), in Figure 15, shows that the seasonal factors for Quarter 1 and Quarter 4 decreases as the year increases, whereas the patterns for Quarters 2 and 3 are increasing. To forecast the seasonal patterns for Year 6, we fit a regression model to the seasonal pattern in each quarter and use the models to forecast the patterns for Year 6. This approach leads to the following fitted models: 55

26 First quarter Second quarter (a) Year (b) Year Third quarter Fourth quarter (c) Year (d) Year Figure 15: Plot of seasonal patterns in blizzard snow blower sales: (a) first quarter, (b) second quarter, (c) third quarter (d) fourth quarter. 1. For Quarter 1: sn t ir t = t. 2. For Quarter 2: sn t ir t = t. 3. For Quarter 3: sn t ir t = t. 4. For Quarter 4: sn t ir t = t. It follows that the predicted seasonal factors for Year 6 are: 56

27 1. For Quarter 1, Year 6: sn t ir t = = For Quarter 2, Year 6: sn t ir t = = For Quarter 3, Year 6: sn t ir t = = For Quarter 4, Year 6: sn t ir t = = Since 4 t=1 (sn t ir t ) 4, we multiply each seasonal factor by to obtain 1. For Quarter 1, Year 6: sn 1 = For Quarter 2, Year 6: sn 2 = For Quarter 3, Year 6: sn 3 = For Quarter 4, Year 6: sn 4 = snt irt = 4 = These predicted seasonal effects are then incorporated into the multiplicative model for forecasting the blizzard sales for Year 6. The deasonalized series for a time series with a shifting seasonal pattern is then computed as 5 Differencing d t = y t sn t ir t, t =1, 2,...,n. We note that the methods we have discussed in the previous sections for dealing with nonstationarity in the mean and seasonal time series may not be effective in modelling the trend and seasonality in some time series. In such cases, one may try a technique called differencing. First, we introduce the backward shift operator B. The backward shift operator is defined as B j y t = y t j. Thus, By t = y t 1 ; B 2 y t = y t 2 ; B 8 y t = y t 8, and so on. 57

28 5.1 Eliminating Trend By Differencing For the purpose of introducing the concept of differencing, suppose that the trend in a given series is linear. That is, y t = TR t + u t = β 0 + β 1 t + u t, t =1, 2,...,n. We observe that the time dependent component of the mean or trend line can be removed if we take the difference of adjacent observations. That is, we transform the series y t into z t = y t y t 1, t =2, 3,...,n. The operation defined by z t is referred to as the first difference of y t. In terms of the backward shift operator we can write the first difference z t as z t = y t y t 1 = y t By t =(1 B)y t, t =2, 3,...,n. Clearly, the new time series z t becomes z t = y t y t 1 =[β 0 + β 1 t + u t ] [β 0 + β 1 (t 1) + u t 1 ] = β 1 +(u t u t 1 )=β 1 + v t, where v t = u t u t 1. It is clear that the trend in z t is now the constant β 1. In other words, z t is a time series with constant mean β 1. We also note that first differencing will result in a series z t with n 1 observations. Now, suppose that the trend is quadratic TR t = β 0 + β 1 t + β 2 t 2 and we take the first difference. Then z t = y t y t 1 =[β 0 + β 1 t + β 2 t 2 + u t ] [β 0 + β 1 (t 1) + β 2 (t 1) 2 + u t 1 ], = α 1 + α 2 t + v t where α 1 = β 1 β 2 and α 2 =2β 2. The above result indicates that if the trend in a time series is quadratic and we take the first difference of the series, it reduces the quadratic trend to a linear one. Thus, to completely eliminate trend in the series we have to take the first difference of the first difference. The operation of taking the first difference twice is referred to as the second difference or second order differencing. That is, the second order difference of y t is w t = z t z t 1 =(y t y t 1 ) (y t 1 y t 2 )=y t 2y t 1 + y t 2,t=3, 4,...,n. 58

29 In terms of the backward shift operator B, the second difference of y t can be written as w t = z t z t 1 =(1 B)z t =(1 B)(1 B)y t =(1 B) 2 y t,t=3, 4,...,n. Now, to show that second order differencing completely eliminates quadratic trend from a time series, we have, w t = y t 2y t 1 + y t 2 = [β 0 + β 1 t + β 2 t 2 + u t ] 2[β 0 + β 1 (t 1) + β 2 (t 1) 2 + u t 1 ] + [β 0 + β 1 (t 2) + β 2 (t 2) 2 + u t 2 ]. After some algebra we obtain w t =2β 2 + v t, where v t =(1 B) 2 u t. We see that by taking the second difference of y t the quadratic trend has been eliminated and the new series w t has constant trend 2β 2. The process of taking successive first differences can be generalized to eliminate any polynomial trend of order p by taking the first diference of the series y t successively, p times. The pth order difference of a time series y t is defined by w t =(1 B) p y t. As an example, consider the beer production data in Figure 1(c) which clearly exhibits a linear trend. The first difference of this series is shown both in the table below and in Figure 16(b). First difference of beer production series 1Q 2Q 3Q 4Q 1975: : : : : : : : Observe that we have successfully eliminated the linear trend in the series by taking the first difference. We recall that the polynomial regression methods performed poorly when used to model the trend in the monthly employment series shown in Figures 3(a) and 8(c). See Figure 9(c). However, by taking the first difference of the employment series we successfully eliminate the trend and cyclical pattern in the monthly employment series as shown in Figure 17(b). 59

30 Barrels (millions) Barrels (millions) (a) Quarter (b) Quarter Barrels (millions) Barrels (millions) (c) Quarter (d) Quarter Figure 16: Plot of (a) quarterly U.S. beer production shown in Figure 1(c), (b) first difference of quarterly U.S. beer production (c) ag 4 difference of the first difference of quarterly U.S. beer production, and (d) ag 4 difference of quarterly U.S. beer production series. 5.2 Eliminating Seasonal Fluctuations By Differencing We note that the seasonal fluctuations in the beer production series were not affected by the first difference as shown in Figure 16(b). Thus a different type of differencing is required for eliminating seasonal effects in a time series. et be the number of seasons in a series. Recall that for constant (i.e not shifting) seasonal fluctuations the seasonal effects are the same from year to year for each season. Thus, it seems reasonable to consider differences between observations in the same season of adjacent years as a means of eliminating the constant seasonal fluctuations. To illustrate this point, consider a seasonal quarterly time series and denote the seasonal component at season t, t =1, 2, 3, 4 by sn t. Then, we can 60

31 write y t = sn t + u t,t=1, 2,...,12. For this series, sn 1 = sn 5 = sn 9 ; sn 2 = sn 6 = sn 10 ; sn 3 = sn 7 = sn 11 ;andsn 4 = sn 8 = sn 12. Now consider the difference of observations in adjacent quarters, and define w 5 = y 5 y 1 = y 5 B 4 y 5 =(1 B 4 )y 5 =(sn 5 + u 5 ) (sn 1 + u 1 ). Since sn 1 = sn 5 = sn 9 we have that w 5 =(1 B 4 )y 5 = u 5 u 1 = v 5. Thus, the new observation w 5 is free of the seasonal component. This process can be continued and defined in general as w t = y t y t =(1 B )y t, t = +1,+2,...,n, = sn t + u t sn t u t = v t where v t =(1 B )u t and is the number of seasons. ag 4 differences of first differences of beer series 1Q 2Q 3Q 4Q 1976: : : : : : : As an example, we can eliminate the seasonal effect in the first difference (see Figure 16(b)) of the beer production data by applying lag, =4, differencing to the first difference. The remainder will then be a stationary series. The lag 4 differences are shown in the table above and the plot of the deseasonalized series is shown in Figure 16(c). Notice that lag 4 differencing led to =4missing observations. In the same way, we have applied ag 12 differencing to the monthly male employment data to eliminate the seasonal effect in the first difference shown in Figure 17(b). The result is shown in Figure 17(c). 61

32 ag 4 differences of beer series 1Q 2Q 3Q 4Q 1976: : : : : : : Number Employed Number Employed (a) Month (b) Month Number Employed Number Employed (c) Month (d) Month Figure 17: Plot of (a) Monthly male employment figures shown in Figure 3(a) and 8(c), (b) first difference of monthly male employment figures (c) ag 4 difference of the first difference of monthly male employment figures, and (d) ag 4 difference of monthly male employment figures. Figures 16(d) and 17(d) are good examples of the fact that applying lag differencing to a time series with trend and seasonal fluctuations of period will eliminate both trend and 62

33 seasonal effects, if the trend in the series is approximately linear. This is easy to see from the fact that if y t = β 0 + β 1 t + SN t + u t, and the series has seasons, then w t = (1 B )y t = y t y t = (β 0 + β 1 t + SN t + u t ) (β 0 + β 1 (t )+SN t + u t ) = β 1 +(1 B )u t, since SN t = SN t. Clearly, the transformed series w t is a series with constant mean β 1, no trend and no seasonal effects. For the purpose of illustration, the lag 4 difference of the actual beer production series is shown in the table above and in Figure 16(d). We also display the ag 12 difference of the male employment series in Figure 17(d). Suppose the trend in the series is not linear but, say quadratic. It is easy to verify that w t = (1 B )y t = y t y t = (β 0 + β 1 t + β 1 t 2 + SN t + u t ) (β 0 + β 1 (t )+β 2 (t ) 2 + SN t + u t ) = (β 1 2 β 2 )+2β 2 t +(1 B )u t. That is, taking the lag difference of a time series with a nonlinear trend and seasonal effects will not eliminate the trend component. 63

Time Series Analysis -- An Introduction -- AMS 586

Time Series Analysis -- An Introduction -- AMS 586 Time Series Analysis -- An Introduction -- AMS 586 1 Objectives of time series analysis Data description Data interpretation Modeling Control Prediction & Forecasting 2 Time-Series Data Numerical data

More information

Minitab Project Report - Practical 2. Time Series Plot of Electricity. Index

Minitab Project Report - Practical 2. Time Series Plot of Electricity. Index Problem : Australian Electricity Production Minitab Project Report - Practical Plot of the Data Australian Electricity Production Data Time Series Plot of Electricity Electricity Since these are monthly

More information

Time Series Analysis. Smoothing Time Series. 2) assessment of/accounting for seasonality. 3) assessment of/exploiting "serial correlation"

Time Series Analysis. Smoothing Time Series. 2) assessment of/accounting for seasonality. 3) assessment of/exploiting serial correlation Time Series Analysis 2) assessment of/accounting for seasonality This (not surprisingly) concerns the analysis of data collected over time... weekly values, monthly values, quarterly values, yearly values,

More information

6 NONSEASONAL BOX-JENKINS MODELS

6 NONSEASONAL BOX-JENKINS MODELS 6 NONSEASONAL BOX-JENKINS MODELS In this section, we will discuss a class of models for describing time series commonly referred to as Box-Jenkins models. There are two types of Box-Jenkins models, seasonal

More information

Decision 411: Class 3

Decision 411: Class 3 Decision 411: Class 3 Discussion of HW#1 Introduction to seasonal models Seasonal decomposition Seasonal adjustment on a spreadsheet Forecasting with seasonal adjustment Forecasting inflation Poor man

More information

Cyclical Effect, and Measuring Irregular Effect

Cyclical Effect, and Measuring Irregular Effect Paper:15, Quantitative Techniques for Management Decisions Module- 37 Forecasting & Time series Analysis: Measuring- Seasonal Effect, Cyclical Effect, and Measuring Irregular Effect Principal Investigator

More information

Reliability and Risk Analysis. Time Series, Types of Trend Functions and Estimates of Trends

Reliability and Risk Analysis. Time Series, Types of Trend Functions and Estimates of Trends Reliability and Risk Analysis Stochastic process The sequence of random variables {Y t, t = 0, ±1, ±2 } is called the stochastic process The mean function of a stochastic process {Y t} is the function

More information

Chapter 3: Regression Methods for Trends

Chapter 3: Regression Methods for Trends Chapter 3: Regression Methods for Trends Time series exhibiting trends over time have a mean function that is some simple function (not necessarily constant) of time. The example random walk graph from

More information

Decision 411: Class 3

Decision 411: Class 3 Decision 411: Class 3 Discussion of HW#1 Introduction to seasonal models Seasonal decomposition Seasonal adjustment on a spreadsheet Forecasting with seasonal adjustment Forecasting inflation Poor man

More information

Ch3. TRENDS. Time Series Analysis

Ch3. TRENDS. Time Series Analysis 3.1 Deterministic Versus Stochastic Trends The simulated random walk in Exhibit 2.1 shows a upward trend. However, it is caused by a strong correlation between the series at nearby time points. The true

More information

Decision 411: Class 3

Decision 411: Class 3 Decision 411: Class 3 Discussion of HW#1 Introduction to seasonal models Seasonal decomposition Seasonal adjustment on a spreadsheet Forecasting with seasonal adjustment Forecasting inflation Log transformation

More information

LECTURE 11. Introduction to Econometrics. Autocorrelation

LECTURE 11. Introduction to Econometrics. Autocorrelation LECTURE 11 Introduction to Econometrics Autocorrelation November 29, 2016 1 / 24 ON PREVIOUS LECTURES We discussed the specification of a regression equation Specification consists of choosing: 1. correct

More information

Time series and Forecasting

Time series and Forecasting Chapter 2 Time series and Forecasting 2.1 Introduction Data are frequently recorded at regular time intervals, for instance, daily stock market indices, the monthly rate of inflation or annual profit figures.

More information

Outline. Nature of the Problem. Nature of the Problem. Basic Econometrics in Transportation. Autocorrelation

Outline. Nature of the Problem. Nature of the Problem. Basic Econometrics in Transportation. Autocorrelation 1/30 Outline Basic Econometrics in Transportation Autocorrelation Amir Samimi What is the nature of autocorrelation? What are the theoretical and practical consequences of autocorrelation? Since the assumption

More information

Statistics of stochastic processes

Statistics of stochastic processes Introduction Statistics of stochastic processes Generally statistics is performed on observations y 1,..., y n assumed to be realizations of independent random variables Y 1,..., Y n. 14 settembre 2014

More information

Forecasting. Simon Shaw 2005/06 Semester II

Forecasting. Simon Shaw 2005/06 Semester II Forecasting Simon Shaw s.c.shaw@maths.bath.ac.uk 2005/06 Semester II 1 Introduction A critical aspect of managing any business is planning for the future. events is called forecasting. Predicting future

More information

Econ 300/QAC 201: Quantitative Methods in Economics/Applied Data Analysis. 17th Class 7/1/10

Econ 300/QAC 201: Quantitative Methods in Economics/Applied Data Analysis. 17th Class 7/1/10 Econ 300/QAC 201: Quantitative Methods in Economics/Applied Data Analysis 17th Class 7/1/10 The only function of economic forecasting is to make astrology look respectable. --John Kenneth Galbraith show

More information

Time Series and Forecasting

Time Series and Forecasting Time Series and Forecasting Introduction to Forecasting n What is forecasting? n Primary Function is to Predict the Future using (time series related or other) data we have in hand n Why are we interested?

More information

Chapter 12: An introduction to Time Series Analysis. Chapter 12: An introduction to Time Series Analysis

Chapter 12: An introduction to Time Series Analysis. Chapter 12: An introduction to Time Series Analysis Chapter 12: An introduction to Time Series Analysis Introduction In this chapter, we will discuss forecasting with single-series (univariate) Box-Jenkins models. The common name of the models is Auto-Regressive

More information

DEPARTMENT OF QUANTITATIVE METHODS & INFORMATION SYSTEMS

DEPARTMENT OF QUANTITATIVE METHODS & INFORMATION SYSTEMS DEPARTMENT OF QUANTITATIVE METHODS & INFORMATION SYSTEMS Moving Averages and Smoothing Methods ECON 504 Chapter 7 Fall 2013 Dr. Mohammad Zainal 2 This chapter will describe three simple approaches to forecasting

More information

7. Forecasting with ARIMA models

7. Forecasting with ARIMA models 7. Forecasting with ARIMA models 309 Outline: Introduction The prediction equation of an ARIMA model Interpreting the predictions Variance of the predictions Forecast updating Measuring predictability

More information

INTRODUCTION TO FORECASTING (PART 2) AMAT 167

INTRODUCTION TO FORECASTING (PART 2) AMAT 167 INTRODUCTION TO FORECASTING (PART 2) AMAT 167 Techniques for Trend EXAMPLE OF TRENDS In our discussion, we will focus on linear trend but here are examples of nonlinear trends: EXAMPLE OF TRENDS If you

More information

Time Series and Forecasting

Time Series and Forecasting Time Series and Forecasting Introduction to Forecasting n What is forecasting? n Primary Function is to Predict the Future using (time series related or other) data we have in hand n Why are we interested?

More information

Time-Series Analysis. Dr. Seetha Bandara Dept. of Economics MA_ECON

Time-Series Analysis. Dr. Seetha Bandara Dept. of Economics MA_ECON Time-Series Analysis Dr. Seetha Bandara Dept. of Economics MA_ECON Time Series Patterns A time series is a sequence of observations on a variable measured at successive points in time or over successive

More information

7 Introduction to Time Series

7 Introduction to Time Series Econ 495 - Econometric Review 1 7 Introduction to Time Series 7.1 Time Series vs. Cross-Sectional Data Time series data has a temporal ordering, unlike cross-section data, we will need to changes some

More information

7 Introduction to Time Series Time Series vs. Cross-Sectional Data Detrending Time Series... 15

7 Introduction to Time Series Time Series vs. Cross-Sectional Data Detrending Time Series... 15 Econ 495 - Econometric Review 1 Contents 7 Introduction to Time Series 3 7.1 Time Series vs. Cross-Sectional Data............ 3 7.2 Detrending Time Series................... 15 7.3 Types of Stochastic

More information

Analysis. Components of a Time Series

Analysis. Components of a Time Series Module 8: Time Series Analysis 8.2 Components of a Time Series, Detection of Change Points and Trends, Time Series Models Components of a Time Series There can be several things happening simultaneously

More information

FinQuiz Notes

FinQuiz Notes Reading 9 A time series is any series of data that varies over time e.g. the quarterly sales for a company during the past five years or daily returns of a security. When assumptions of the regression

More information

A time series is called strictly stationary if the joint distribution of every collection (Y t

A time series is called strictly stationary if the joint distribution of every collection (Y t 5 Time series A time series is a set of observations recorded over time. You can think for example at the GDP of a country over the years (or quarters) or the hourly measurements of temperature over a

More information

Minitab Project Report - Assignment 6

Minitab Project Report - Assignment 6 .. Sunspot data Minitab Project Report - Assignment Time Series Plot of y Time Series Plot of X y X 7 9 7 9 The data have a wavy pattern. However, they do not show any seasonality. There seem to be an

More information

Week 9: An Introduction to Time Series

Week 9: An Introduction to Time Series BUS41100 Applied Regression Analysis Week 9: An Introduction to Time Series Dependent data, autocorrelation, AR and periodic regression models Max H. Farrell The University of Chicago Booth School of Business

More information

Christopher Dougherty London School of Economics and Political Science

Christopher Dougherty London School of Economics and Political Science Introduction to Econometrics FIFTH EDITION Christopher Dougherty London School of Economics and Political Science OXFORD UNIVERSITY PRESS Contents INTRODU CTION 1 Why study econometrics? 1 Aim of this

More information

DATA IN SERIES AND TIME I. Several different techniques depending on data and what one wants to do

DATA IN SERIES AND TIME I. Several different techniques depending on data and what one wants to do DATA IN SERIES AND TIME I Several different techniques depending on data and what one wants to do Data can be a series of events scaled to time or not scaled to time (scaled to space or just occurrence)

More information

Read Section 1.1, Examples of time series, on pages 1-8. These example introduce the book; you are not tested on them.

Read Section 1.1, Examples of time series, on pages 1-8. These example introduce the book; you are not tested on them. TS Module 1 Time series overview (The attached PDF file has better formatting.)! Model building! Time series plots Read Section 1.1, Examples of time series, on pages 1-8. These example introduce the book;

More information

Lecture 5: Unit Roots, Cointegration and Error Correction Models The Spurious Regression Problem

Lecture 5: Unit Roots, Cointegration and Error Correction Models The Spurious Regression Problem Lecture 5: Unit Roots, Cointegration and Error Correction Models The Spurious Regression Problem Prof. Massimo Guidolin 20192 Financial Econometrics Winter/Spring 2018 Overview Stochastic vs. deterministic

More information

Testing for deterministic trend and seasonal components in time series models

Testing for deterministic trend and seasonal components in time series models Bionutrika (1983), 70, 3, pp. 673-82 673 Printed in Great Britain Testing for deterministic trend and seasonal components in time series models BY L. FRANZINI AND A. C. HARVEY Department of Statistics,

More information

Lecture 4 Forecasting

Lecture 4 Forecasting King Saud University College of Computer & Information Sciences IS 466 Decision Support Systems Lecture 4 Forecasting Dr. Mourad YKHLEF The slides content is derived and adopted from many references Outline

More information

Lecture 6a: Unit Root and ARIMA Models

Lecture 6a: Unit Root and ARIMA Models Lecture 6a: Unit Root and ARIMA Models 1 2 Big Picture A time series is non-stationary if it contains a unit root unit root nonstationary The reverse is not true. For example, y t = cos(t) + u t has no

More information

Prof. Dr. Roland Füss Lecture Series in Applied Econometrics Summer Term Introduction to Time Series Analysis

Prof. Dr. Roland Füss Lecture Series in Applied Econometrics Summer Term Introduction to Time Series Analysis Introduction to Time Series Analysis 1 Contents: I. Basics of Time Series Analysis... 4 I.1 Stationarity... 5 I.2 Autocorrelation Function... 9 I.3 Partial Autocorrelation Function (PACF)... 14 I.4 Transformation

More information

Part II. Time Series

Part II. Time Series Part II Time Series 12 Introduction This Part is mainly a summary of the book of Brockwell and Davis (2002). Additionally the textbook Shumway and Stoffer (2010) can be recommended. 1 Our purpose is to

More information

Lecture 2: Univariate Time Series

Lecture 2: Univariate Time Series Lecture 2: Univariate Time Series Analysis: Conditional and Unconditional Densities, Stationarity, ARMA Processes Prof. Massimo Guidolin 20192 Financial Econometrics Spring/Winter 2017 Overview Motivation:

More information

EC408 Topics in Applied Econometrics. B Fingleton, Dept of Economics, Strathclyde University

EC408 Topics in Applied Econometrics. B Fingleton, Dept of Economics, Strathclyde University EC408 Topics in Applied Econometrics B Fingleton, Dept of Economics, Strathclyde University Applied Econometrics What is spurious regression? How do we check for stochastic trends? Cointegration and Error

More information

Chapter 3 Multiple Regression Complete Example

Chapter 3 Multiple Regression Complete Example Department of Quantitative Methods & Information Systems ECON 504 Chapter 3 Multiple Regression Complete Example Spring 2013 Dr. Mohammad Zainal Review Goals After completing this lecture, you should be

More information

7. Integrated Processes

7. Integrated Processes 7. Integrated Processes Up to now: Analysis of stationary processes (stationary ARMA(p, q) processes) Problem: Many economic time series exhibit non-stationary patterns over time 226 Example: We consider

More information

Regression of Time Series

Regression of Time Series Mahlerʼs Guide to Regression of Time Series CAS Exam S prepared by Howard C. Mahler, FCAS Copyright 2016 by Howard C. Mahler. Study Aid 2016F-S-9Supplement Howard Mahler hmahler@mac.com www.howardmahler.com/teaching

More information

ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests

ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests Patrick Herb Brandeis University Spring 2016 Patrick Herb (Brandeis University) Unit Root Tests ECON/FIN

More information

Univariate linear models

Univariate linear models Univariate linear models The specification process of an univariate ARIMA model is based on the theoretical properties of the different processes and it is also important the observation and interpretation

More information

Financial Time Series Analysis: Part II

Financial Time Series Analysis: Part II Department of Mathematics and Statistics, University of Vaasa, Finland Spring 2017 1 Unit root Deterministic trend Stochastic trend Testing for unit root ADF-test (Augmented Dickey-Fuller test) Testing

More information

Time Series Analysis

Time Series Analysis Time Series Analysis A time series is a sequence of observations made: 1) over a continuous time interval, 2) of successive measurements across that interval, 3) using equal spacing between consecutive

More information

7. Integrated Processes

7. Integrated Processes 7. Integrated Processes Up to now: Analysis of stationary processes (stationary ARMA(p, q) processes) Problem: Many economic time series exhibit non-stationary patterns over time 226 Example: We consider

More information

Chapter 5: Forecasting

Chapter 5: Forecasting 1 Textbook: pp. 165-202 Chapter 5: Forecasting Every day, managers make decisions without knowing what will happen in the future 2 Learning Objectives After completing this chapter, students will be able

More information

11.1 Gujarati(2003): Chapter 12

11.1 Gujarati(2003): Chapter 12 11.1 Gujarati(2003): Chapter 12 Time Series Data 11.2 Time series process of economic variables e.g., GDP, M1, interest rate, echange rate, imports, eports, inflation rate, etc. Realization An observed

More information

Some Time-Series Models

Some Time-Series Models Some Time-Series Models Outline 1. Stochastic processes and their properties 2. Stationary processes 3. Some properties of the autocorrelation function 4. Some useful models Purely random processes, random

More information

Seasonal Models and Seasonal Adjustment

Seasonal Models and Seasonal Adjustment LECTURE 10 Seasonal Models and Seasonal Adjustment So far, we have relied upon the method of trigonometrical regression for building models which can be used for forecasting seasonal economic time series.

More information

Topic 4 Unit Roots. Gerald P. Dwyer. February Clemson University

Topic 4 Unit Roots. Gerald P. Dwyer. February Clemson University Topic 4 Unit Roots Gerald P. Dwyer Clemson University February 2016 Outline 1 Unit Roots Introduction Trend and Difference Stationary Autocorrelations of Series That Have Deterministic or Stochastic Trends

More information

Eco and Bus Forecasting Fall 2016 EXERCISE 2

Eco and Bus Forecasting Fall 2016 EXERCISE 2 ECO 5375-701 Prof. Tom Fomby Eco and Bus Forecasting Fall 016 EXERCISE Purpose: To learn how to use the DTDS model to test for the presence or absence of seasonality in time series data and to estimate

More information

CHAPTER 1: Decomposition Methods

CHAPTER 1: Decomposition Methods CHAPTER 1: Decomposition Methods Prof. Alan Wan 1 / 48 Table of contents 1. Data Types and Causal vs.time Series Models 2 / 48 Types of Data Time series data: a sequence of observations measured over time,

More information

Modeling and forecasting global mean temperature time series

Modeling and forecasting global mean temperature time series Modeling and forecasting global mean temperature time series April 22, 2018 Abstract: An ARIMA time series model was developed to analyze the yearly records of the change in global annual mean surface

More information

Statistics for Managers using Microsoft Excel 6 th Edition

Statistics for Managers using Microsoft Excel 6 th Edition Statistics for Managers using Microsoft Excel 6 th Edition Chapter 13 Simple Linear Regression 13-1 Learning Objectives In this chapter, you learn: How to use regression analysis to predict the value of

More information

arxiv: v1 [stat.me] 5 Nov 2008

arxiv: v1 [stat.me] 5 Nov 2008 arxiv:0811.0659v1 [stat.me] 5 Nov 2008 Estimation of missing data by using the filtering process in a time series modeling Ahmad Mahir R. and Al-khazaleh A. M. H. School of Mathematical Sciences Faculty

More information

Forecasting using R. Rob J Hyndman. 2.3 Stationarity and differencing. Forecasting using R 1

Forecasting using R. Rob J Hyndman. 2.3 Stationarity and differencing. Forecasting using R 1 Forecasting using R Rob J Hyndman 2.3 Stationarity and differencing Forecasting using R 1 Outline 1 Stationarity 2 Differencing 3 Unit root tests 4 Lab session 10 5 Backshift notation Forecasting using

More information

Statistical Methods for Forecasting

Statistical Methods for Forecasting Statistical Methods for Forecasting BOVAS ABRAHAM University of Waterloo JOHANNES LEDOLTER University of Iowa John Wiley & Sons New York Chichester Brisbane Toronto Singapore Contents 1 INTRODUCTION AND

More information

10. Time series regression and forecasting

10. Time series regression and forecasting 10. Time series regression and forecasting Key feature of this section: Analysis of data on a single entity observed at multiple points in time (time series data) Typical research questions: What is the

More information

Forecasting. Copyright 2015 Pearson Education, Inc.

Forecasting. Copyright 2015 Pearson Education, Inc. 5 Forecasting To accompany Quantitative Analysis for Management, Twelfth Edition, by Render, Stair, Hanna and Hale Power Point slides created by Jeff Heyl Copyright 2015 Pearson Education, Inc. LEARNING

More information

Introduction to Modern Time Series Analysis

Introduction to Modern Time Series Analysis Introduction to Modern Time Series Analysis Gebhard Kirchgässner, Jürgen Wolters and Uwe Hassler Second Edition Springer 3 Teaching Material The following figures and tables are from the above book. They

More information

Chapter 2: Unit Roots

Chapter 2: Unit Roots Chapter 2: Unit Roots 1 Contents: Lehrstuhl für Department Empirische of Wirtschaftsforschung Empirical Research and undeconometrics II. Unit Roots... 3 II.1 Integration Level... 3 II.2 Nonstationarity

More information

STAT 520: Forecasting and Time Series. David B. Hitchcock University of South Carolina Department of Statistics

STAT 520: Forecasting and Time Series. David B. Hitchcock University of South Carolina Department of Statistics David B. University of South Carolina Department of Statistics What are Time Series Data? Time series data are collected sequentially over time. Some common examples include: 1. Meteorological data (temperatures,

More information

Econometric Forecasting Overview

Econometric Forecasting Overview Econometric Forecasting Overview April 30, 2014 Econometric Forecasting Econometric models attempt to quantify the relationship between the parameter of interest (dependent variable) and a number of factors

More information

Time Series and Forecasting

Time Series and Forecasting Chapter 8 Time Series and Forecasting 8.1 Introduction A time series is a collection of observations made sequentially in time. When observations are made continuously, the time series is said to be continuous;

More information

1. Fundamental concepts

1. Fundamental concepts . Fundamental concepts A time series is a sequence of data points, measured typically at successive times spaced at uniform intervals. Time series are used in such fields as statistics, signal processing

More information

Examination paper for TMA4285 Time Series Models

Examination paper for TMA4285 Time Series Models Department of Mathematical Sciences Examination paper for TMA4285 Series Models Academic contact during examination: Professor Jarle Tufto Phone: 99 70 55 19 Examination date: December 8, 2016 Examination

More information

Chapter 9: Forecasting

Chapter 9: Forecasting Chapter 9: Forecasting One of the critical goals of time series analysis is to forecast (predict) the values of the time series at times in the future. When forecasting, we ideally should evaluate the

More information

Time Series Models and Inference. James L. Powell Department of Economics University of California, Berkeley

Time Series Models and Inference. James L. Powell Department of Economics University of California, Berkeley Time Series Models and Inference James L. Powell Department of Economics University of California, Berkeley Overview In contrast to the classical linear regression model, in which the components of the

More information

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MAS451/MTH451 Time Series Analysis TIME ALLOWED: 2 HOURS

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MAS451/MTH451 Time Series Analysis TIME ALLOWED: 2 HOURS NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION 2012-2013 MAS451/MTH451 Time Series Analysis May 2013 TIME ALLOWED: 2 HOURS INSTRUCTIONS TO CANDIDATES 1. This examination paper contains FOUR (4)

More information

Bayesian Variable Selection for Nowcasting Time Series

Bayesian Variable Selection for Nowcasting Time Series Bayesian Variable Selection for Time Series Steve Scott Hal Varian Google August 14, 2013 What day of the week are there the most searches for [hangover]? 1. Sunday 2. Monday 3. Tuesday 4. Wednesday 5.

More information

Econometrics. Week 11. Fall Institute of Economic Studies Faculty of Social Sciences Charles University in Prague

Econometrics. Week 11. Fall Institute of Economic Studies Faculty of Social Sciences Charles University in Prague Econometrics Week 11 Institute of Economic Studies Faculty of Social Sciences Charles University in Prague Fall 2012 1 / 30 Recommended Reading For the today Advanced Time Series Topics Selected topics

More information

Forecasting: principles and practice 1

Forecasting: principles and practice 1 Forecasting: principles and practice Rob J Hyndman 2.3 Stationarity and differencing Forecasting: principles and practice 1 Outline 1 Stationarity 2 Differencing 3 Unit root tests 4 Lab session 10 5 Backshift

More information

Chapter 13. Multiple Regression and Model Building

Chapter 13. Multiple Regression and Model Building Chapter 13 Multiple Regression and Model Building Multiple Regression Models The General Multiple Regression Model y x x x 0 1 1 2 2... k k y is the dependent variable x, x,..., x 1 2 k the model are the

More information

Week 5 Quantitative Analysis of Financial Markets Characterizing Cycles

Week 5 Quantitative Analysis of Financial Markets Characterizing Cycles Week 5 Quantitative Analysis of Financial Markets Characterizing Cycles Christopher Ting http://www.mysmu.edu/faculty/christophert/ Christopher Ting : christopherting@smu.edu.sg : 6828 0364 : LKCSB 5036

More information

Development of Short-term Demand Forecasting Model And its Application in Analysis of Resource Adequacy. For discussion purposes only Draft

Development of Short-term Demand Forecasting Model And its Application in Analysis of Resource Adequacy. For discussion purposes only Draft Development of Short-term Demand Forecasting Model And its Application in Analysis of Resource Adequacy For discussion purposes only Draft January 31, 2007 INTRODUCTION In this paper we will present the

More information

TMA4285 December 2015 Time series models, solution.

TMA4285 December 2015 Time series models, solution. Norwegian University of Science and Technology Department of Mathematical Sciences Page of 5 TMA4285 December 205 Time series models, solution. Problem a) (i) The slow decay of the ACF of z t suggest that

More information

SOME BASICS OF TIME-SERIES ANALYSIS

SOME BASICS OF TIME-SERIES ANALYSIS SOME BASICS OF TIME-SERIES ANALYSIS John E. Floyd University of Toronto December 8, 26 An excellent place to learn about time series analysis is from Walter Enders textbook. For a basic understanding of

More information

INTRODUCTORY REGRESSION ANALYSIS

INTRODUCTORY REGRESSION ANALYSIS ;»»>? INTRODUCTORY REGRESSION ANALYSIS With Computer Application for Business and Economics Allen Webster Routledge Taylor & Francis Croup NEW YORK AND LONDON TABLE OF CONTENT IN DETAIL INTRODUCTORY REGRESSION

More information

TIME SERIES ANALYSIS AND FORECASTING USING THE STATISTICAL MODEL ARIMA

TIME SERIES ANALYSIS AND FORECASTING USING THE STATISTICAL MODEL ARIMA CHAPTER 6 TIME SERIES ANALYSIS AND FORECASTING USING THE STATISTICAL MODEL ARIMA 6.1. Introduction A time series is a sequence of observations ordered in time. A basic assumption in the time series analysis

More information

Forecasting Seasonal Time Series 1. Introduction. Philip Hans Franses Econometric Institute Erasmus University Rotterdam

Forecasting Seasonal Time Series 1. Introduction. Philip Hans Franses Econometric Institute Erasmus University Rotterdam Forecasting Seasonal Time Series 1. Introduction Philip Hans Franses Econometric Institute Erasmus University Rotterdam SMU and NUS, Singapore, April-May 2004 1 Outline of tutorial lectures 1 Introduction

More information

A nonparametric test for seasonal unit roots

A nonparametric test for seasonal unit roots Robert M. Kunst robert.kunst@univie.ac.at University of Vienna and Institute for Advanced Studies Vienna To be presented in Innsbruck November 7, 2007 Abstract We consider a nonparametric test for the

More information

Stationary and nonstationary variables

Stationary and nonstationary variables Stationary and nonstationary variables Stationary variable: 1. Finite and constant in time expected value: E (y t ) = µ < 2. Finite and constant in time variance: Var (y t ) = σ 2 < 3. Covariance dependent

More information

Answers: Problem Set 9. Dynamic Models

Answers: Problem Set 9. Dynamic Models Answers: Problem Set 9. Dynamic Models 1. Given annual data for the period 1970-1999, you undertake an OLS regression of log Y on a time trend, defined as taking the value 1 in 1970, 2 in 1972 etc. The

More information

Empirical Market Microstructure Analysis (EMMA)

Empirical Market Microstructure Analysis (EMMA) Empirical Market Microstructure Analysis (EMMA) Lecture 3: Statistical Building Blocks and Econometric Basics Prof. Dr. Michael Stein michael.stein@vwl.uni-freiburg.de Albert-Ludwigs-University of Freiburg

More information

STOCHASTIC MODELING OF MONTHLY RAINFALL AT KOTA REGION

STOCHASTIC MODELING OF MONTHLY RAINFALL AT KOTA REGION STOCHASTIC MODELIG OF MOTHLY RAIFALL AT KOTA REGIO S. R. Bhakar, Raj Vir Singh, eeraj Chhajed and Anil Kumar Bansal Department of Soil and Water Engineering, CTAE, Udaipur, Rajasthan, India E-mail: srbhakar@rediffmail.com

More information

Lesson 13: Box-Jenkins Modeling Strategy for building ARMA models

Lesson 13: Box-Jenkins Modeling Strategy for building ARMA models Lesson 13: Box-Jenkins Modeling Strategy for building ARMA models Facoltà di Economia Università dell Aquila umberto.triacca@gmail.com Introduction In this lesson we present a method to construct an ARMA(p,

More information

Based on the original slides from Levine, et. all, First Edition, Prentice Hall, Inc

Based on the original slides from Levine, et. all, First Edition, Prentice Hall, Inc Based on the original slides from Levine, et. all, First Edition, Prentice Hall, Inc Process of predicting a future event Underlying basis of all business decisions Production Inventory Personnel Facilities

More information

Autoregressive models with distributed lags (ADL)

Autoregressive models with distributed lags (ADL) Autoregressive models with distributed lags (ADL) It often happens than including the lagged dependent variable in the model results in model which is better fitted and needs less parameters. It can be

More information

FinQuiz Notes

FinQuiz Notes Reading 10 Multiple Regression and Issues in Regression Analysis 2. MULTIPLE LINEAR REGRESSION Multiple linear regression is a method used to model the linear relationship between a dependent variable

More information

Time Series Analysis of United States of America Crude Oil and Petroleum Products Importations from Saudi Arabia

Time Series Analysis of United States of America Crude Oil and Petroleum Products Importations from Saudi Arabia International Journal of Applied Science and Technology Vol. 5, No. 5; October 2015 Time Series Analysis of United States of America Crude Oil and Petroleum Products Importations from Saudi Arabia Olayan

More information

Multivariate Time Series: VAR(p) Processes and Models

Multivariate Time Series: VAR(p) Processes and Models Multivariate Time Series: VAR(p) Processes and Models A VAR(p) model, for p > 0 is X t = φ 0 + Φ 1 X t 1 + + Φ p X t p + A t, where X t, φ 0, and X t i are k-vectors, Φ 1,..., Φ p are k k matrices, with

More information

Determine the trend for time series data

Determine the trend for time series data Extra Online Questions Determine the trend for time series data Covers AS 90641 (Statistics and Modelling 3.1) Scholarship Statistics and Modelling Chapter 1 Essent ial exam notes Time series 1. The value

More information

at least 50 and preferably 100 observations should be available to build a proper model

at least 50 and preferably 100 observations should be available to build a proper model III Box-Jenkins Methods 1. Pros and Cons of ARIMA Forecasting a) need for data at least 50 and preferably 100 observations should be available to build a proper model used most frequently for hourly or

More information

Forecasting. Al Nosedal University of Toronto. March 8, Al Nosedal University of Toronto Forecasting March 8, / 80

Forecasting. Al Nosedal University of Toronto. March 8, Al Nosedal University of Toronto Forecasting March 8, / 80 Forecasting Al Nosedal University of Toronto March 8, 2016 Al Nosedal University of Toronto Forecasting March 8, 2016 1 / 80 Forecasting Methods: An Overview There are many forecasting methods available,

More information

FE570 Financial Markets and Trading. Stevens Institute of Technology

FE570 Financial Markets and Trading. Stevens Institute of Technology FE570 Financial Markets and Trading Lecture 5. Linear Time Series Analysis and Its Applications (Ref. Joel Hasbrouck - Empirical Market Microstructure ) Steve Yang Stevens Institute of Technology 9/25/2012

More information