7.2 Trend and seasonality

  • Data should be seasonally adjusted and/or trends should be removed

Economic time-series can be decomposed as \[\begin{equation} y_t=T_t+C_t+S_t+u_t ~~~~~~~t=1,2,,3,\dots,T \tag{7.8} \end{equation}\]

\(~~~~~~~T_t\) is trend component, i.e. long-term trending behavior (upward or downward deterministic trend)

\(~~~~~~~C_t\) is cyclical component, i.e. long-term fluctuations repeated over a few-years period

\(~~~~~~~S_t\) is seasonal component, i.e. short-term fluctuations repeated over a one-year period

\(~~~~~~~u_t\) is irregular or random component, i.e. error terms

  • The cyclical component is difficult to identify, as it requires yearly observations over a sufficiently long period, and it is often disregarded

  • It is much easier to identify the seasonal component as it requires monthly or quarterly observations

  • In many cases, two time-series \(y_t\) and \(x_t\) may appear correlated simply because they share a common upward or downward trend over time. Using trending variables in regression can lead to a spurious relationship between \(y_t\) and \(x_t\).

  • A time variable \(t\), which captures linear trend, should be added in regression to eliminate this problem

\[\begin{equation} y_t=\beta_0+\beta_1x_t+\beta_2t+u_t~~~~~~t=1,2,3,\dots,T \tag{7.9} \end{equation}\]

  • In general, the deterministic trending behavior of a time series \(y_t\) can be adequately captured using

linear trend

\[\begin{equation} y_t=\beta_0+\beta_1t+u_t~~~~~~t=1,2,3,\dots,T \tag{7.10} \end{equation}\]

exponential trend

\[\begin{equation} log(y_t)=\beta_0+\beta_1t+u_t~~~~~~t=1,2,3,\dots,T \tag{7.11} \end{equation}\]

or quadratic trend \[\begin{equation} y_t=\beta_0+\beta_1t+\beta_2t^2+u_t~~~~~~t=1,2,3,\dots,T \tag{7.12} \end{equation}\]

  • Seasonal component can be adequately captured using seasonal dummy variables

  • If we consider quarterly observations, econometric model with seasonal dummy variables is

\[\begin{equation} y_t=\beta_0+\beta_1S_{t,2}+\beta_2S_{t,3}+\beta_3S_{t,4}+u_t \tag{7.13} \end{equation}\]

\[S_{t,2}=\left\{\begin{array}{cl} 1,& for~second~quarter\\0,& otherwise\end{array}\right.,~~S_{t,3}=\left\{\begin{array}{cl} 1,& for~third~quarter\\0,& otherwise\end{array}\right.\] \[ S_{t,4}=\left\{\begin{array}{cl} 1,& for~fourth~quarter\\0,& otherwise\end{array}\right.~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\]

  • Note that one seasonal dummy variable is omitted (1st quarter) in the model with an intercept (7.13) to avoid the dummy variable trap, which occurs when there is perfect multicollinearity among the dummy variables (because the sum of all dummy variables equals \(1\) for every observation)

  • By omitting the intercept \(\beta_0\) we could include all dummy variables in the model, which is not recommended

  • Best practice is to retain the intercept \(\beta_0\) and omit one dummy variable because: (a) the coefficient of the omitted season is absorbed into the intercept, (b) the coefficients are easier to interpret as deviations from a reference season (omitted one), and (c) it avoids perfect multicollinearity

  • Model (7.13) is appropriate for out-of-sample forecasting of a time-series that exhibit only seasonality in the future, but not for seasonal adjustment, as it assumes an additive decomposition of a time series (although residuals from this model could be considered as seasonally adjusted data)

  • Additive decomposition of a time-series is useful if seasonality is constant over time

If seasonality is not constant over time then components of a time-series should be multiplied. When cyclical component is ignored the multiplicative decomposition of a time-series is

\[\begin{equation} y_t=T_t\times S_t \times u_t \tag{7.14} \end{equation}\]

Consequently, seasonally adjusted data \(y_t^{sa}\) are obtained by dividing the original time-series with the corresponding seasonal factors \[\begin{equation} y_t^{sa}=\frac{y_t}{S_t}=T_t \times u_t \tag{7.15} \end{equation}\]

  • In practical applications, the multiplicative decomposition model is usually used, in which the effects of the seasonal and irregular components are represented as factors (the seasonal factors are often scaled so that their sum equals the number of seasons, assuming that total effect of seasonality over the entire year averages out to zero)

  • Seasonally adjusted data allows users to focus on trend and business cycle movements

  • Unlike seasonally adjusted data, the trend component is free from short-term random fluctuations (irregular component), making it much smoother

  • Central statistical agencies use a sophisticated methods for seasonal adjustment, such as X-12-ARIMA or TRAMO/SEATS (Time Series Regression with ARIMA Noise, Missing Observations and Outliers / Signal Extraction in ARIMA Time Series). These methods will not be analyzed here, because most publicly available time-series are seasonally adjusted as well as calendar adjusted (for holidays, leap years, or different number of working days)

  • However, the simplest approach to seasonal adjustment of a time-series uses Centered Moving Average CMA method

  • CMA values represent a smoothed time series. For example, since the number of months in a year is odd, a \(12-\)period centered moving average is calculated as a weighted average of \(13\) neighboring values around the current value \(y_t\)

\[\begin{equation} CMA(12)_t=\frac{\frac{1}{2} y_{t-6} + y_{t-5} + \dots + y_{t-2} + y_{t-1} + y_t + y_{t+1} + y_{t+2} + \dots + y_{t+5} + \frac{1}{2} y_{t+6}}{12} \tag{7.16} \end{equation}\]

Exercise 32. Answer the following questions:

  1. Which dynamic model presents an autoregression? \[(a) ~~ y_t = \beta_0 + \beta_1 x_t + \beta_2 x_{t-1} + u_t ~~~ \] \[(b) ~~ y_t = \beta_0 + \beta_1 x_t + \beta_2 y_{t-1} + u_t ~~~ \] \[(c) ~~ y_t = \beta_0 + \beta_1 y_{t-1} + \beta_2 y_{t-2} + u_t \]
    Solution Autoregression is a model where the current value of a variable is explained by own lagged values (only past values of the same variable are considered on the RHS). Thus, a model \((c)\) represents an autoregression.
  2. Which order is autoregression in question \(1\)?
    Solution The order \(p\) of an autoregression AR(p) is determined by the number of lagged terms, and therefore model \((c)\) is AR\((2)\).
  3. What is autocorrelation in the context of time-series analysis?
    Solution Autocorrelation is the correlation of a time-series with its own lagged values.
  4. Can we use OLS method in a time-series regression (static model) when autocorrelation problem exist and why?
    Solution We can use OLS, but we should not because OLS estimates are no longer efficient (standard errors are incorrect, producing a misleading \(t-\)statistics and \(p-\)values).
  5. What is cointegration?
    Solution When variables are cointegrated they are related in the long-term (equilibrium relationship) and in the short-term, but their short-term relationship may deviate from this equilibrium.
  6. Specify a model with quadratic trend and seasonal dummy variables for monthly observations.
    Solution For monthly observations, we can specify a time-series model that includes a quadratic trend and seasonal dummy variables: \[ y_t = \beta_0 + \beta_1 t + \beta_2 t^2 + \beta_3 S_{t,2} + \beta_4 S_{t,3} + \dots + \beta_{13} S_{t,12} + u_t \] where \(\beta_0\) is an intercept term, \(\beta_1\) is a coefficient for the linear trend (\(t=1,2,3,\dots,T\)), \(\beta_2\) is a coefficient for the quadratic trend (\(t^2=1,4,9,\dots,T^2\)), coefficients \(\beta_3\), \(\beta_4\),\(\dots\),\(\beta_{13}\) are for eleven seasonal dummy variables (one less than the number of months). These represent the effect of each month (January is omitted as a reference season). For example, \(\beta_3\) is the effect of February (compared to January), \(\beta_4\) is the effect of March (compared to January), and so on. Seasonal dummy variables \(S_{t,2}\), \(S_{t,3}\), \(\dots\), \(S_{t,12}\) take the value \(1\) if the observation is in the corresponding month and \(0\) otherwise, e.g. \(S_{t,2} = 1\) if the observation is in February, and \(0\) for other months.
  7. How \(4-\)period centered moving averages are calculated for quarterly observations?
    Solution \[CMA(4)_t=\frac{\frac{1}{2} y_{t-2}+y_{t-1}+y_t+y_{t+1}+ \frac{1}{2} y_{t+2}}{4}\]