Modeling and Forecasting Seasonality (Chapter 5) Recall that according to the unobserved components model of a time series, the series yt has three components: a time trend (Tt), a seasonal component (St) and a cyclical component (Ct), so that yt = Tt + St + Ct Seasonality refers to the annual cyclical variation in a time series, which may due to weather patterns, holiday patterns, school calendar patterns, etc. For example, there are cyclical peaks in U.S. retail sales and employment during the last quarter of each calendar year due to the holiday shopping season and there are cyclical troughs in U.S. housing starts during the winter months of each calendar year due to weather patterns. Illustrations of time series with seasonal variation are presented in the textbook (Figures 5.1, 5.2, and 5.3). Most of the time series that you have selected for your study have been seasonally adjusted. That is, ySA,t yt Sˆt where Ŝ t is an estimate of the seasonal component of yt. (Or, in some cases, your series has not been seasonally adjusted because it does not display a seasonal pattern.) Why are time series usually presented in seasonally adjusted form? Typically, our interest in a macroeconomic time series is in the information it provides about the overall state of the economy and the direction the economy is heading. Suppose we did not seasonally adjust our data and we observe a huge increase in retail sales during the fourth quarter of 2005. Should we interpret this as a sign that the economy is suddenly booming? Or, suppose I we observe a huge increase in the unemployment rate during May/June of 2006 (after schools let out and there is a large temporary increase in the economy’s labor force). Should I interpret this as a sign that the economy and its labor market are suddenly deteriorating? In both examples, the answer is no, unless retail sales are growing by more than normal for that part of the year or unless the unemployment rate is increasing by more than normal for that part of the year. Seasonally adjusted data are meant to smooth out the data to remove the regular ups and downs that are associated with the seasonal cycle. So, if seasonally adjusted retail sales increase during the fourth quarter or if the seasonally adjusted unemployment rate increases during May/June we can interpret these as movements beyond the movements that are part of the normal seasonal cycle. While the macroeconomist, government official or business person may be interested in the behavior of seasonally adjusted time series, there are many business forecasting settings where the seasonal component of the series is fundamentally important and seasonally adjusted data would be inadequate and inappropriate. A bank may be interested in forecasting housing starts in its area (or, if the bank is large enough, at a national level) in order to anticipate the demand for mortgage loans. Or a business that provides building supplies to homebuilders may need to forecast housing starts to anticipate the demand for its products and make current inventory decisions. These forecasters will be interested in predicting housing starts including the seasonal component. In these cases, you would want to use seasonally unadjusted data, model the seasonality and forecast it, along with forecasts of the trend and cyclical components. Modeling Seasonality – Recall from our discussion of the trend that there are two approaches to modeling the trend of a time series. One approach, which is the approach we used, is to assume that the trend is deterministic, i.e., it can be modeled as an exact or perfectly predictable function of time (although we may not know the exact form of that function or the parameters of the function). A second (and more complicated) approach, which we may discuss later in the course, is to assume that the trend is stochastic, i.e., the trend component evolves in a way that is subject to random disturbances. Similarly, there are two approaches to modeling seasonality - deterministic seasonality and stochastic seasonality which differ according to whether St is perfectly predictable or is subject to random disturbances. We will assume that the seasonal component is deterministic. A straightforward and commonly used approach to modeling seasonality (which is, however, not the method governement agencies typically use to seasonally adjust data) is to specify a seasonal dummy model. Suppose you are working with quarterly data and want to allow each quarter to have a distinct seasonal effect on the series. Consider St = γ1D1t + γ2D2t + γ3D3t + γ4D4t where D1t = 1 if t = quarter 1 = 0 if not D2t = 1 if t = quarter 2 = 0 if not D3t = 1 if t = quarter 3 = 0 if not D4t = 1 if t = quarter 4 = 0 if not So, St = γ1 if t = quarter 1,…, St = γ4 if t = quarter 4. {An equivalent model – St = γ1 + γ2D2t + γ3D3t + γ4D4t where D2, D3, and D4 are as defined above. In this case, St = γ1 if t is in quarter 1, St = γ1 + γ2 if t is in quarter 2,…, St = γ1+γ4 if t is in quarter 4.} If you are working with monthly data and want to allow a distinct seasonal effect for each month, St = γ1D1t + γ2D2t + … + γ12D12,t where Dit =1 if month t is the i-th month of the year = 0 if not {or, St = γ1 + γ2D2t + … + γ12D12,t, where D2,…,D12 are as defined above.} Suppose you have monthly data but you only want to allow for quarterly seasonal variation? St = γ1D1t + γ2D2t + γ3D3t + γ4D4t where Dit =1 if month t is in the i-th quarter of the year = 0 if not {Or, St = γ1 + γ2D2t + γ3D3t + γ4D4t} Suppose you are working with data, say monthly data, and you think that there is only one month that is different from the other months. Say, for example, that the seasonality is the same for months 1-11 but is different than the seasonality for month 12St = γ1D1t + γ2D2t (or, St = γ1 + γ2D2t) where D1t = 1 if t is in month 1,2,…,11 = 0 if t is in month 12 and D2t = 1 if t is in month 12 = 0 if t is in month 1,2,…,11 Many monetary and finanicial time series are weekly or even daily (or hourly or…). if you are working with weekly or daily data you normally would not specify a separate seasonal for each week or day. We could, however, still allow for monthly or quarter seasonal variation in our weekly data. For example to allow for a monthly seasonal pattern in our weekly series: St = γ1D1t + … + γ12D12,t where D1t =1 if week t falls in the first month of the year, …., D12,t = 1 if week t falls in the 12th month of the year. More generally, regardless of the frequency of the data (quarterly, monthly, weekly, …) we can divide the year up into s seasons and define the seasonal component according to St = γ1D1t + … + γsDs,t where Dit = 1 if observation t falls in annual period i (and is equal to zero if not). Some other extensions: Suppose we are working with monthly data and we are allowing for quarterly seasonal variation but also want allow for a December effect – St = γ1D1t + … + γ4D4,t + γ5DECt where DECt =1 if t is a December (and is equal to zero if not). Then, St = γ1 for t = January, February,March St = γ2 for t = April, May, June St = γ3 for t = July, August, September St = γ4 for t = October and November St = γ4+γ5 for December. Your text also discusses extensions of this sort for “holiday variation” and “trading-day variation”, the latter being particularly important in modeling seasonality in high-frequency financial time series. For our purposes, we will focus on simple seasonal models of the form St = γ1D1t + γ2D2t … + γsDs,t or, equivalently, St = γ1 + γ2D2t … + γsDs,t where we have have divided the year into s parts. To estimate the seasonal model and the seasonal component of yt it is most straightforward if we detrend and deseasonalize simultaneously – Let Tt = β0 + β1t + … + βptp and St = γ1 + γ2D2t … + γsDs,t so that yt = β0 + β1t + … + βptp + γ1 + γ2D2t … + γsDs,t + εt where εt is the cyclical component of yt. Notice that the model yt = β0 + β1t + … + βptp + γ1 + γ2D2t … + γsDs,t + εt has a redundant parameter, since it has two constants, β0 and γ1. According to this model of trend and seasonality, the nature of the seasonality is that the intercept of the trend line differs for each season. Eliminating γ1 from the model has no consequence since the intercept for season 1 is accounted for by β0. So the model can be written yt = β0 + β1t + … + βptp + γ2D2t … + γsDs,t + εt We can estimate the parameters of this model by OLS, regressing y on a constant, t,…,tp, D2t,…,Dst, for t = 1,…,T yielding: yt ˆ0 ˆ1t ... ˆ p t p ˆ2 D2t ... ˆs Dst ˆt where the β-hats are the OLS estimates of the β’s and the ε-hats are the OLS residuals ˆt yt ˆ0 ˆ1t ... ˆ pt p ˆ2 D2t ... ˆs Dst and form the estimated cyclical component of the yt’s. {Question – After you estimated this model, how would you test whether there is any seasonality in the original y series?} Forecasting yT+h According to our model, yT+h = β0 + β1(T+h) + … + βp(T+h)p + γ1 + γ2D2,T+h + … + γsDs,T+h + εT+h and so our forecast of yT+h formed at time T will be: yˆT h,T ˆ0 ˆ1 (T h) ... ˆ p (T h) p ˆ2 D2,T h ... ˆs Ds ,T h ˆT h,T where ˆ time T. T h ,T is our forecast of εT+h formed at If the ε’s are i.i.d. with mean zero, then ˆ = 0 and T h ,T yˆT h,T ˆ0 ˆ1 (T h) ... ˆ p (T h) p ˆ2 D2,T h ... ˆs Ds ,T h If the ε’s are i.i.d. N(0,σ2) then, ignoring parameter uncertainty, 1. yT h yˆ T h ,T N (0,1) ˆ where T 1 ˆ ˆt2 T ( p s ) t 1 2 and 2. yˆ T h ,T 1.96ˆ is a 95% forecast interval for yT+h.