-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathA-sa-overview.qmd
135 lines (78 loc) · 6.54 KB
/
A-sa-overview.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Seasonal Adjustment (SA) Overview {#sa-overview .unnumbered}
## In this chapter
This chapter is a first of a series focusing on the practical step by step use of JDemetra+ Seasonal Adjustment (SA) algorithms, restricted to monthly and quarterly series. For infra-monthly data see the [following chapter](#a-sa-hf). In the sections below an overview of the seasonal adjustment process is provided. The most widely used SA algorithms (Tramo-Seats and X13-Arima) have two steps: a pre-treatment to remove (temporarily) deterministic effects and a decomposition phase to estimate the seasonal factors.
The following chapters get into the specifics of each algorithm.
- [Pre-treatment](#sa-pre-t)
- [SA: X11 decomposition](a-sa-X11)
- [SA: Seats-decomposition](#a-sa-seats)
- [SA: Revision policies](#a-rev-pol)
- [SA of High-Frequency Data](#a-sa-hf)
- [SA: STL+ and MSTL+](#a-sa-stl)
- [X12+ and MX12+](a-sa-x12)
- [STS and MSTS](#a-sa-bsm)
The use of [graphical user interface](T-graphical-user-interface.qmd) and [R packages](T-r-packages.qmd) is described simultaneously whenever relevant.
In-depth methodological explanations of the algorithms are covered in separated chapters, in the [Methods](P_Methods.qmd) part of this book.
More information on the steps and best practices of a seasonal adjustment process can be found in the [Eurostat guidelines on seasonal adjustment](https://ec.europa.eu/eurostat/documents/3859598/6830795/KS-GQ-15-001-EN-N.pdf)
For an overview on the algorithms and methodological issues, the user can refer to the [Handbook on Seasonal Adjustment](https://ec.europa.eu/eurostat/documents/3859598/8939616/KS-GQ-18-001-EN-N.pdf)
## SA process
The goal of seasonal adjustment is to remove seasonal fluctuations from a time series. Seasonal fluctuations are quasi-periodic infra-annual movements. They can mask evolutions of greater interest for the user such as short term evolution or long time trends.
When setting up the process:
- seasonality tests (can also be done in the frame of quality assessment at the end)
- trading days correction set up if relevant
- [regressors generation](#a-cal)
- regressors selection
- estimation with selected algorithm (see section below), might be [automated with the cruncher](#t-prod)
- [quality report](#t-prod)
- selective editing and manual fine tuning of parameters, re-estimation if needed
- updating when new data available with tailored [revision policy](#a-rev-pol)
<!-- ## Quick Start -->
<!-- (chap à part?) -->
<!-- To launch a -->
<!-- en mode cahier d'exos -->
<!-- #a-sa-X11-q-start -->
<!-- #a-sa-seats-q-start -->
## Seasonal Adjustment Algorithms
<!-- Extensions for high frequency data tackled in frequency part -->

Two categories of algorithms :
- historical core (main): X-13-Arima and Tramo-Seats [improved in version 3](#v3-vs-v2-sa)
- version 3 additional algorithms (incubator)
X13-ARIMA and TRAMO-SEATS are two-step algorithms with a pre-treatment phase (Reg-Arima or Tramo) and a decomposition phase (X11 and Seats).
STL+ combines STL local regression based decomposition and a simplified Reg-Arima pre-treatment restricted to airline models.
X12+ combines X11 (enhanced) decomposition and a simplified Reg-Arima pre-treatment restricted to airline models.
Seats+ combines Seats decomposition and a simplified Reg-Arima pre-treatment restricted to airline models.
In a [Structural Time Series](#a-sa-bsm) approach pre-treatment and decomposition are done simultaneously in a State Space Framework.
## Admissible data frequencies
For low frequency data
- in version 3.x $p$ in ${2,3,4,6,12}$ is admissible in all algorithms
- in version 3.x $p$ in ${2,3,4,6,12}$ is admissible in Tramo-Seats and $p$ in ${2,4,12}$ is admissible in X-13.
Algorithms extended for high-frequency (infra-monthly) data can be applied to "any periodicity" in their R version and to $p$ in ${7, 52.18, 365.25}$ in the graphical user interface, see [here](#a-sa-hf) for more details.
## Decomposition in unobserved components
To seasonally adjust a series, seasonal factors $S_{t}$ will be estimated and removed from the original raw series: $Y_{sa}=Y_{t}/S_{t}$ or $Y_{sa}=Y_{t}-S_{t}$. To do so the series is first decomposed into unobservable components. Two decomposition models [^a-sa-overview-1] are used in JDemetra+ :
[^a-sa-overview-1]: other options as the log-additive model are also available in a more specific context described [here](#a-sa-X11-settings)
- The additive model: $X_{t} = T_{t} + S_{t} + I_{t}$;
- The multiplicative model: $X_{t} = T_{t} \times S_{t} \times I_{t}$.
The main components, each representing the impact of certain types of phenomena on the time series ($X_{t}$), are:
- The trend ($T_{t}$) that captures long-term and medium-term behaviour;
- The seasonal component ($S_{t}$) representing intra-year fluctuations, monthly or quarterly, that are repeated more or less regularly year after year;
- The irregular component ($I_{t}$) combining all the other more or less erratic fluctuations not covered by the previous components.
In general, the trend consists of 2 sub-components:
- The long-term evolution of the series;
- The cycle, that represents the smooth, almost periodic movement around the long-term evolution of the series. It reveals a succession of phases of growth and recession. Trend and cycle are not separated in SA algorithms.
## Detecting seasonal patterns
A large number of [seasonality tests](#m-tests) are available in JDemetra+. They can be accessed in the graphical user interface or via R.
### In R
In rjd3toolkit package:
- Canova-Hansen (`seasonality.canovahansen()`)
- X-12 combined test (`seasonality.combined()`)
- F-test on seasonal dummies (`seasonality.f()`)
- Friedman Seasonality Test (`seasonality.friedman()`)
- Kruskall-Wallis Seasonality Test (`seasonality.kruskalwallis()`)
- Periodogram Seasonality Test (`seasonality.periodogram()`)
- QS Seasonality Test (`seasonality.qs()`)
Full documentation of those functions can be found [here](https://rjdverse.github.io/rjd3toolkit/reference/index.html)
### In GUI
How to perform tests in the graphical user interface is described [here](#t-GUI-tstools-tests).
## Direct or Indirect seasonal adjustment
when seasonally adjusting series which are aggregates following a given classification, the user has to chose whether directly adjust the aggregate from its raw version or to aggregate the adjusted components.
The graphical user interface in version 2.x provides a [module](#direct-indirect) to compare the two options. It won't be provided in version 3.x.