Seasonal Adjustment Ukraine November 2014 Model for unobservable
Seasonal Adjustment Ukraine November 2014
Model for unobservable components Additive model Ot = Tt + St + It = At + St Multiplicative model Ot = Tt. St. It = At. St Where O is the pre-adjusted series, t is the time, T is the trend-cycle, S is the seasonal component, I is the irregular component (white noise), and A is the seasonally adjusted series. No unique decomposition without conditioning! 2
Methods and software X-12 -ARIMA Relatively few assumptions § Non-parametric approach § TRAMO/SEATS Uses a mathematical model with many assumptions § Parametric approach § 3
X-12 -ARIMA reg. ARIMA models Regression models with ARIMA noise used for Pre-Adjustment X-11 algorithm Moving average filters used for decomposition 4
TRAMO and SEATS TRAMO § Time series Regression with ARIMA noise, Missing observations and Outliers SEATS § Signal Extraction in ARIMA Time Series TSW § A combined program for Windows featuring both TRAMO and SEATS 5
X-13 ARIMA-SEATS reg. ARIMA models (identical with TRAMO) Regression models with ARIMA noise used for Pre-Adjustment SEATS (as well as X-11) Used for decomposition Diagnostics inherited from X-12 -ARIMA 6
Software Demetra § § Developed by (not at) Eurostat Graphical interface for X-12 -ARIMA and TRAMO/SEATS Demetra further developed in JDemetra (X-13 ARIMA-SEATS) X-12 -ARIMA (dos program, ver. 0. 3) SAS (PROC X 12) 7
STATIONARITY
What is stationarity? A process (”time series”) Xt is stationary if (X 1, X 2, …, Xn) has the same distribution as (X 1+u, X 2+u, …, Xn+u) for all integers n and u. We care most about mean and variance (weak stationarity of second order). 9
Stationarity 1: Logarithm transform • The logarithm transform: Xt ↷ ln. Xt • May produce stationarity for the variance 10
Stationarity 2: Differencing • Differencing: Xt ↷ Xt – Xt-1 • Seasonal differencing Xt ↷ Xt – Xt-12 • May produce stationarity for the mean 11
Stationarity by differencing… 12
…and logarithm transformation 13
The flow in seasonal adjustment 1. Transformation (possibly) • To ensure stationarity (poss. log. transformation) 2. Pre-adjustment • Prepare for estimation of the season 3. ARIMA model • Find the model with the best description of the pre-adjusted time series 4. Forecast the series • Forecast with the ARIMA model 5. Decomposition • Split up in Trend, Season and Irregular component 14
Pre-adjustment
Pre-adjustment Xt where = 1 Z 1 t + … + k. Zkt + Ot Xt – the original series Zit – explicatory variables i – regression coefficients Ot – the preadjusted series (follows an ARIMA model) 16
Explicatory variables - Calendar Months/Quarters are not comparable The length of the month differs - The more working days the higher production - Leap year § Type of the day differs - Sundays/Holy days versus normal trading days - Trade is bigger Saturday than Monday § Holy days can move (moving seasonality) - Easter § Countries are not comparable § § § Easter in western and eastern Catholic church Ramadan Comparability in the EU (Eurostat) 17
Explicatory variables – External reason Changes caused by external reason: § Outliers (extreme/not typical observations) - Reduced sale of icecream in a cold summer - Strike - Freezing days (construction business) § Level shift (permanent change) - Changes in duties and taxes e. g. on cars - Changes in methodology, e. g. new sample § Transitory changes (temporary/provisional) - Felling of timber after a storm - Rise in price on e. g. coffee 18
Pre-adjustment in Demetra Automatic outlier/calendar correction: Outlier detection/substitution. LS/AO/TC, Easter, Leap year/ Trading days (7, 6, 2, 1 regressors) via regression § Pre test for significance (t-test) § Effect included if significant § § AO or LS in the last part of the period is always a problem - this period is the most relevant - difficult to assess whether we have AO or LS or ‘normal’ observations 19
Calendar effects Possible to make own calendar in Demetra. The functionality is questionable. In JDemetra it is possible to define own national calendar In JDemetra it is possible to construct new regressors Example. Retail Trade Statistics (DK) Easter often a problem (March or April – 1. or 2. Quarter) § Standard (Demetra - 6 days up til Sunday) § Differentiated regressors before/during/after Easter § 20
ARIMA models
Why ARIMA models – X-12 ARIMA? • Symmetric moving averages: Problems in the last period. • The last period is the most interesting part! Month Index Sep-04 Oct- 04 Nov-04 Dec-04 Jan-0 Feb-05 5 Mar- 05 Apr- 05 May-05 Jun-05 Jul- 05 Aug-05 Sep-05 Oct- 05 Nov-05 Dec-05 … 119. 7 119. 3 154. 2 110. 4 101. 9 116. 8 124. 3 122. 0 123. 8 122. 0 125. 5 119. 0 123. 6 125. 3 ? Filtrered … 118. 0 118. 5 119. 2 119. 7 120. 3 120. 7 121. 7 122. 2 ? ? ? ? Filter: (Xt– 6 + Xt– 5 + …+ Xt + … + Xt+6)/13 10/30/2020 22
Why ARIMA models – X-12 ARIMA? 23
Why ARIMA models – TRAMO/SEATS? • Identify an ARIMA model for the series • Using spectral analysis, the time series is decomposed in the – Trend-cycle component – Seasonal component – Transitory component – Irregular component (white noise) 24
The general ARIMA model AR-I-MA is an acronym § Autoregressive (AR) - Value at time t depends of value at time t-1, t-2, … , t-p § Integrated (I) - Removes the trend, make the time series stationary § Moving average (MA) - Value at time t depends of noise term at time t-1, t-2, …, t-q General model is written (p, d, q)x(P, D, Q)S Example: § ”Airline model” (0, 1, 1)x(0, 1, 1)S 25
Example: Airline model ARIMA (0, 1, 1)x(0, 1, 1)12, ie p=P=0, d=D=1, q=Q=1 Xt = Xt-1 + Xt-12 – Xt-13 + et – θ 1 et-1 – Θ 1 et-12 + θ 1 Θ 1 et-13 Take (monthly series) the month before add the difference between the same months last year (d, D) Further is a noise term for time t which is adjusted with noise terms for time t-1, t-12 and t-13 (q and Q). 26
Adjustment strategies - and other remaining topics
Adjustment strategy Analysis of model (review) New data point added (production) 28
Current and concurrent adjustment Current adjustment § § ARIMA model and parameters are fixed, e. g. once a year This model is used every time new data points are added. Partial concurrent adjustment § § ARIMA model is fixed, e. g. once a year The parameters are re-estimated every time new data points are added. Concurrent adjustment § ARIMA model and parameters are estimated every time new data points are added. 29
Revisions Revision means, that previously published figures are changed due to the addition of new data points. Revisions reflect more knowledge, so revisions should make us happy. The adjustment strategy (current or concurrent adjustment) will be reflected in the size of the revisions. 30
Revisions and adjustment strategy Current adjustment gives small revisions during the year, but large revisions at the time of review. Current adjustment gives poor prediction since the newest information is ignored. Concurrent adjustment gives the best model, but can lead to substantial revisions. Partial concurrent adjustment is a good compromise between the two. . . 31
Aggregate series An aggregate series (the sum of two or more series) may be seasonally adjusted directly Direct seasonal adjustment Summing seasonally adjusted series also yields a seasonally adjusted composite series Indirect seasonal adjustment 32
Benchmarking to regain consistency No consistency between the total sum or yearly sums between the original and the seasonally adjusted series guaranteed. The consistency can be regained to a (desired level) by benchmarking the seasonally adjusted series. This is done so that period-to-period movements are almost preserved. 33
Seasonality and Quality measures Focus primarily (X-12 -ARIMA) on Q a weighted average of M 1 to M 11. The most important is M 7 designed to determine whether seasonality can be identified by X 11 § AAPE (Average Absolute Percentage Error) which measures the forecast error to already known values. § If seasonality is not identified, the time series shall not be seasonally adjusted. One of the ideas when constructing X-13 ARIMA- SEATS, was to establish the same set of quality measures in X-12 -ARIMA and TRAMO/SEATS 34
Recommended practice in Statistics Denmark Implementing the ESS guidelines on SA (2009) http: //epp. eurostat. ec. europa. eu/portal/page/ portal/national_accounts/documents/ ESS_Guidelines_on_SA. pdf
1. Methods and software We are using X-12 -ARIMA with Demetra. However, some statistics are adjusted with TRAMO/SEATS, since they are better suited for this method. X-13 -ARIMA/SEATS is currently being tested. JDemetra is currently being tested. 36
2. Pre-adjustment and national calendar Correction for calendar effects using the reg. ARIMA approach Correction for working days and trading days is done on either a standard or a national calender. Outliere are currently being identified using an automatic procedure 37
3. Review of model We generally use partial concurrent adjustment (i. e. fixed model with re-estimation of parameters) Concurrent adjustment should only be used on very noisy series with unstable seasonality. Current adjustment should only be used on very stable series. Models are normally reviewed every second year 38
4. Aggregate series The choice between direct and indirect adjustment is made for each set of series. Direct adjustment is not consistent with the sum of the seasonally adjusted component series. If the number of component series is low, we prefer indirect adjustment due to consistency. However, the indirectly adjusted composite series may contain residual seasonality. In this case you must switch to direct adjustment. 39
5. Benchmarking We only use benchmarking if this is a very strong requirement from the users. Benchmarking should be avoided unless the series contains major level shifts. With currently available options in Demetra, it is not possible to perform a meaningful benchmarking in the presence of calendar adjustment. 40
6. Revisions When preliminary figures are replaced by final figures, all revisions are accepted. This also applies in the case of correction of errors. In the case of new observations, revisions should be accepted for a fixed period of time. 41
7. Quality: Uncertainty and diagnostics For seasonally adjusted series we should publish two quality measures, namely Q and AAPE. These are specific to X-12 -ARIMA, but similar measures can be found for TRAMO/SEATS. If the quality measures are not satisfactory, then the series should be reviewed immediately. We are working on methods to quantify uncertainty originating in seasonal adjustment. 42
8. Publishing and non-seasonal series We publish the original series and the seasonally adjusted series. Comments in the press release consider primarily the seasonally adjusted figures. For a few series we also publish (or submit to Eurostat) the calendar adjusted series. If a series cannot be seasonally adjusted with high quality, or if the series is non-seasonal, we publish the calendar adjusted series or the original series. 43
9. Documentation and metadata We are working on a standardized form, such that all relevant metadata is readily available. Newer software versions (X-13 -ARIMA/SEATS new Demetra and) will have improved features for documentation 44
10. SA maintenance and support Seasonal adjustment is a decentralized part of the statistics production. The Methods section are giving support on demand. All series are reviewed by the Methods section every second year. 45
- Slides: 45