1 Introduction

Seasonality, which Hylleberg (1986, p. 23) defines as ‘the systematic, although not necessarily regular or unchanging, intrayear movement that is caused by climatic changes, timing of religious festivals, business practices, and expectations’, is often considered a nuisance in economic modeling. Consequently, a whole industry has come into existence that is devoted to seasonal adjustment. The U.S. Census Bureau Basic Seasonal Adjustment Glossary (https://www.census.gov/srd/www/x13as/glossary.html) describes seasonal adjustment as ‘the estimation of the seasonal component and, when applicable, also trading day and moving holiday effects, followed by their removal from the time series. The goal is usually to produce series whose movements are easier to analyze over consecutive time intervals and to compare to the movements of other series in order to detect co-movements.’

Large seasonal movements may hide other movements of importance and it is easier to see related movements in different series after seasonal adjustment. Therefore macroeconomic time series are typically seasonally adjusted before being used in economic and econometric analyses. Several procedures are in use, varying from the Census X-11 family (U.S. Census Bureau, Bank of Canada; for a brief overview see Monsell 2009) to TRAMO/SEATSFootnote 1 and STAMP (Andrew Harvey and collaborators; http://stamp-software.com/). Recently, the two most popular methods, Census X-12-ARIMA and TRAMO-SEATS, merged into X-13ARIMA-SEATS, to become the industry standard.

Underlying all these seasonal adjustment methods is the decomposition of an observed series into latent non-seasonal and seasonal components. The aim is to extract the unobserved components from the observed series. The methods produce seasonal effects that are relatively stable in terms of annual timing, within the same month or quarter, direction and magnitude. Trend-cycle and seasonal components are traditionally extracted using sequential centered moving average (CMA) filters and recently ARIMA and Unobserved Components (UC) models. The series are pretreated to adjust for outliers and trading-day and holiday effect, and forecast and backcast to deal with the beginning and the end of the series to avoid phase shifts in the series.

One consequence of using CMA filters and ARIMA and UC models is that past values of the unobserved components change when new observations become available, thus causing revisions in real-time data. The current practice of changing seasonal factors only once a year implies the existence of annual revisions in vintages of time series, going back some three years; see, e.g., Croushore (2011). This property of seasonal adjustment is well-known and well-documented in the seasonal adjustment literature, see e.g. Bell and Hillmer (1984), Bell (1995) and more recently Czaplicki (2015) and Czaplicki and McDonald-Johnson (2015).Footnote 2

This paper presents CAMPLET, a new method, especially focusing on the feature that the method does not produce revisions when new observations become available, and on its ability to deal with changes in seasonal patterns. The method consists of a simple adaptive procedure to extract the seasonal and the non-seasonal component from an observed time series. Once this process is carried out, there will be no need to revise these components at a later stage when new observations become available.

The main strength of CAMPLET is in seasonal adjustment when revisions are totally inacceptable, for example inflation realizations should not be revised after a wage agreement has been reached, or implausible. Economic Tendency Survey data are not revised over time, hence seasonal adjustment should not lead to revisions (Abeln et al. 2017). A second application of CAMPLET is on series that have a changing seasonal pattern. Section 4 gives an illustration for the international retailer Ahold. CAMPLET might also be employed to seasonally adjust Chinese economic statistics, which suffer from moving holidays due to the Chinese New Year (Roberts and White 2015). Other applications are the seasonal adjustment of short (volatile) series or series in which seasonality is correlated with trend and cycle (Hindrayanto et al. 2018).

Recently, CAMPLET has been used to check the robustness of results obtained with other seasonal adjustment methods (Hecq et al. 2017; Smirnov et al. 2017). Although turning points are obtained in the same period for many series, differences in the dates of turning points, i.e. phase shifts, do occur.

The remainder of this paper is structured as follows. The next section presents CAMPLET. In Sect. 3 we evaluate the outcomes of CAMPLET and X13-ARIMA-SEATS in a controlled simulation framework using a variety of data generating processes. Section 4 shows the potential of CAMPLET by focusing on similarities and differences with respect to X13-ARIMA-SEATS in the analysis of three time series: U.S. non-farm employment, operational income of Ahold, an international retailer, and real GDP in the Netherlands. Section 5 concludes.

2 CAMPLET

The CAMPLET program does not require pretreatment of a time series to adjust for outliers, trading day and holiday effects. Forecasting or backcasting is not necessary either, since the method does not employ CMA filters, ARIMA or UC models to do seasonal adjustment; only information that is available at the moment the seasonal adjustment has to be made is used.

The package including documentation and examples can be downloaded from http://www.camplet.net. CAMPLET is also available as a MATLAB function in Yvan Lengwiler’s X-13 Toolbox for Seasonal Filtering.

2.1 Seasonals and Non-seasonals

CAMPLET is based on the decomposition of an observed series (\(y_t\)) into a non-seasonal (\(y_{t}^{{\mathrm{ns}}}\)) and (\(y_{t}^{{\mathrm{s}}}\)) seasonal component

$$\begin{aligned} y_t = y_{t}^{{\mathrm{ns}}} + y_{t}^{{\mathrm{s}}}, \qquad t=1,\ldots ,T . \end{aligned}$$
(1)

For ease of exposition we assume that we want to seasonally adjust a quarterly time series, in particular we assume that seasonal adjustment for \(y_t\), a fourth observation, is done so we have \(y_{t}^{{\mathrm{sa}}} \equiv y_{t}^{{\mathrm{ns}}}\) and \(y_{t}^{{\mathrm{s}}}\) for a specific observation \(t=\tau\). We want to obtain the seasonal and non-seasonal values for the next observation \(t+1\), which is in this case a first quarter. The gradient of the non-seasonals \(g_t\), i.e., the average growth over a segment of the time series ending in period t, plays an important role in the seasonal adjustment procedure of CAMPLET. In our example we take the gradient equal to \(g_t=0\).

Fig. 1
figure 1

If the gradient \(g_t\) changes, all seasonals change

A feature of CAMPLET is that every period of a time series has a full set of latent seasonal components \(y_{t,1}^{{\mathrm{s}}},\ y_{t,2}^{{\mathrm{s}}},\ y_{t,3}^{{\mathrm{s}}},\ y_{t,4}^{{\mathrm{s}}}\), one of which applies. In our example, period \(t+1\) is a first quarter, so \(y_{t+1}^{{\mathrm{s}}}=y_{t+1,1}^{{\mathrm{s}}}\). Figure 1 illustrates how the seasonals belonging to period t change when the gradient \(g_t\) changes. As shown in the left panel the gradient \(g_t\) is assumed to be zero. If the gradient rotates with a degrees through the center of the series, which is assumed to be at position 2.5 \((=(1 + 2 + 3 + 4)/4\)), then all seasonals belonging to period t are assumed to change according to their distance to the center of the series. So the seasonals belonging to period \(t+1\) change according to: \(y_{t+1,1}^{{\mathrm{s}}}=y_{t,1}^{{\mathrm{s}}}+1.5a\), \(y_{t+1,2}^{{\mathrm{s}}}=y_{t,2}^{{\mathrm{s}}}+0.5a\), \(y_{t+1,3}^{{\mathrm{s}}}=y_{t,3}^{{\mathrm{s}}}-0.5a\), and \(y_{t+1,4}^{{\mathrm{s}}}=y_{t,4}^{{\mathrm{s}}}-1.5a\).

2.2 Seasonal Adjustment in CAMPLET

CAMPLET seasonally adjusts a time series on a period-by-period basis. Given the decomposition of \(y_t\) into seasonally adjusted value \(y_{t}^{{\mathrm{sa}}}\) and seasonal \(y_{t}^{{\mathrm{s}}}\) in period t and the requirement that sufficient observations are available for the calculation of the gradient \(g_t\), CAMPLET calculates the seasonally adjusted value \(y_{t+1}^{{\mathrm{sa}}}\) and seasonal \(y_{t+1}^{{\mathrm{s}}}\) for observation \(y_{t+1}\) by comparing observation \(y_{t+1}\) with the extrapolated values of the average growth of the non-seasonal (the gradient) and the seasonal component of the previous period t, allocating the difference over the seasonal and the non-seasonal component.

Figure 2 describes the extrapolation. The left panel of the figure shows the situation in period t. If observation \(y_{t+1}\) becomes available, the seasonal component for quarter 1 in period t, \(y_{t,1}^{{\mathrm{s}}}\), is added to the extrapolated value of the average non-seasonal growth line in period t, in our example we extrapolate the gradient \(g_{t}=0\). The difference between the observed value \(y_{t+1}\) and the extrapolated value for \(t+1\) based on information available in t is denoted by the extrapolation error\(\hat{e}_{t+1}\).

Fig. 2
figure 2

Extrapolation on the basis of period t

Fig. 3
figure 3

Division of extrapolation error over changes in the seasonal and changes in the seasonally adjusted values of period \(t+1\)

The extrapolation error in period \(t+1\) is divided over changes in the seasonal and changes in the gradient in period \(t+1\), as shown in Fig. 3. We assume that the gradient rotates according to \(g_{t+1}=g_{t}+\hat{e}_{t+1}/\ell _{t+1}\), where \(\ell _{t+1}\) is the adjustment length. In other words, \(1/\ell _{t+1}\) of the extrapolation error is matched by a rotation of the non-seasonal. The seasonal component for observation t+1, a first quarter, changes by \(1.5\hat{e}_{t+1}/\ell _t\). The three other seasonal components are updated too, as illustrated above in Fig. 1.Footnote 3 In our example with a time series segment of 4 quarters, the adjustment length equals 4 quarters. This can be seen as follows. The seasonal component changes by \(1.5\hat{e}_{t+1}/4\), as seen above, while the gradient in period \(t+1\), 2.5 periods from the center, changes by \(2.5\hat{e}_{t+1}/4\), so the extrapolation error \(\hat{e}_{t+1}\) is divided over the seasonal component and a change of average non-seasonal growth. Once we know the value of the new seasonal component in period \(t+1\), \(y_{t+1}^{{\mathrm{s}}}\), we can calculate the seasonally adjusted value \(y_{t+1}^{{\mathrm{sa}}}\) from the basic decomposition \(y_{t+1}^{{\mathrm{sa}}} = y_{t+1} - y_{t+1}^{{\mathrm{s}}}\).

2.3 Initialisation

Starting values are required for the seasonally adjusted value in the starting period \(y_{0}^{{\mathrm{sa}}}\), the gradient \(g_0\), and the seasonals \(y_{0,1}^{{\mathrm{s}}},y_{0,2}^{{\mathrm{s}}}, y_{0,3}^{{\mathrm{s}}}, y_{0,4}^{{\mathrm{s}}}\). These can be obtained from as short as one full year of observations—if no outliers are present—for example as follows:

  • \(y_{0}^{{\mathrm{sa}}}\) is the mean of the observed series over the year;

  • assuming that \(y_{i}^{{\mathrm{sa}}}\) does not change during a year, we have \(g_{0} = 0\), and \(y_{0,i}^{{\mathrm{s}}} = y_{i} - {y}^{{\mathrm{sa}}}_{0}, \ i=1,\ldots ,4.\)

If these first period values include an outlier, this outlier also appears in the initial seasonal pattern. To avoid this situation the adjustment procedure is applied for the first three years of the series, then the resulting gradient is extrapolated backwards to the first observation of the series and the procedure is repeated for the full series, now with a more appropriate seasonal pattern.

2.4 Outliers and Change in Seasonal Pattern

Let \(\bar{y}_{t+1}=\frac{1}{p}\sum _{i=1}^{p} |y_{t+1-i}|\) be the annual average of absolute values of the preceding p observations, where p equals 4 for quarterly observations and 12 for monthly observations. An outlier is defined to occur if \(100(\hat{e}_{t+1}/\bar{y}_{t+1})\) is larger than the parameter Limit to Error (LE). Default values for LE are 6% for quarterly observations and 8% for monthly observations. To mitigate the effects of an outlier on the seasonal components we increase the adjustment length

$$\begin{aligned} \ell _{t+1} = \ell _t + p M\left( \frac{\hat{e}_{t+1}}{\bar{y}_{t+1}}\right) , \end{aligned}$$
(2)

where M is the parameter Multiplier, which takes as default value \(M=50\). For the next observation the adjustment length \(\ell\) is reset to the Common Adjustment default value of 6 quarters for quarterly series or 18 months for monthly series.

If the outlier also occurs 1 year later (denoted by parameter Pattern), we assume that the seasonal pattern has changed. Instead of increasing the adjustment length to put an upper limit to the change in the seasonal components as in the outlier case, we now set the adjustment length \(\ell\) to 1 year. Hence, the second time an outlier is detected, the seasonal of this observation becomes larger, while the other seasonal components change correspondingly. This property of CAMPLET makes it well suited to capture breaks in seasonal patterns.

A sudden decrease in the series’ development, such as occurred during the 2008 Global Financial Crisis, is at first regarded an outlier and its impact on the seasonal component will be reduced by incrementing the adjustment length. If the next observation is in the same (negative) direction, i.e., another outlier, a turn of the non-seasonal development is signaled and the common adjustment length will be applied, thus adopting the new gradient of the non-seasonal. Sequential similar outliers then result in a rapid adoption of the new gradient.

2.5 Automatic Parameter Adjustment for Volatile Series

Volatile series contain frequent but unsystematic fluctuations, that are often much larger than seasonal fluctuations. Such series may occur, for example, in company interim results such as net profit and earnings per share. Strong and unsystematic fluctuations are recognized in CAMPLET as outliers whose impact on the seasonal pattern and on the gradient is reduced by increasing the adjustment length of the series. If outliers occur frequently, a simultaneous change in the seasonal pattern and/or the overall direction of the series’ development may not be picked up. This situation may arise even more often, because the gradient is extended from the seasonally adjusted level of the new observation including the outlier. This extrapolation will be way off if the next observation is in line with the original series’ trajectory but considered an outlier. An aberrant observation in one period will then result in outliers in the current and the next period.

The objective of automatic parameter resetting is to reduce the number of outliers. To this end parameter Limit to Error (LE), the criterion for a new observation to be an outlier or not, is raised by 5 percentage points whenever during the adjustment run the number of outliers identified is higher than 50% of the number of observations so far adjusted. This goes on until LE surpasses a threshold of 30%. For a quarterly series the default value of LE is 6%, which can be incremented in 5 steps of 5 percentage points each to a maximum of 31%. To mitigate the impact of fluctuations that are no longer regarded as aberrant, the adjustment length is incremented at every step by p / 2.

If the limit to error (LE) has reached its maximum value and outliers continue to occur at a rate of 50% or more of the number of observations adjusted, parameter Times (T), which denotes the number of times an outlier returns before a change in seasonal pattern is assumed to have occurred, is increased from its default value of 1 to 2, to ensure that frequent outliers do not cause too many shifts of the seasonal pattern. At the same time parameter Multiplier (M), which determines the adjustment length, will be reduced from its default value of 50 to 25 to mitigate the impact of outliers on the seasonal components. Whenever the proportion of outliers falls below 50% these steps are retraced in inverse order.

2.6 CAMPLET Parameters

The procedure of CAMPLET comes down to selecting the adjustment length for each observation to divide the extrapolation error over the seasonal and the non-seasonal components. This selection is guided by the 5 tuning parameters of CAMPLET, listed in Table 1. Two of the parameters decide on the characteristics of the new observation: (1) is it aberrant or not? (Limit to Error) and (2) if aberrant, does the seasonal pattern change or not? (Times). If the new observation is not aberrant, the Common Adjustment length is applied. If it is aberrant and the seasonal pattern does not change, parameter Multiplier increments the adjustment length, as in (2). If the observation is an outlier and the seasonal pattern changes, parameter Pattern reduces the adjustment length to 1 year.

Table 1 CAMPLET parameters and default settings

Default values of the Common Adjustment length are six quarters for quarterly observations and 18 months for monthly data. These values are based on analyses of time series segments of 2 years, with centers at 4.5 quarters and 12.5 months respectively. The common adjustment lengths imply changes in the seasonal of \(1.5\hat{e}_{t+1}/6\) for quarterly observations and \(5.5\hat{e}_{t+1}/18\) for monthly observations, and \(4.5\hat{e}_{t+1}/6\) and \(12.5\hat{e}_{t+1}/18\) for the change in the non-seasonals.

We investigated the sensitivity of the default value of the Common Adjustment parameter in combination with the Limit to Error for the U.S. non-farm payroll employment series described in Sect. 4 below. Differences in terms of seasonal adjustments for this series were small. Results are available upon request. Default values of the other parameters are chosen on the basis of plausibility rather than statistical accuracy.

3 Simulations

We evaluate CAMPLET and X-13ARIMA-SEATS seasonal adjustment with controlled simulations using a variety of Data Generating Processes (DGPs). We simulate 24 DGPs based on a stylized representation of the trend-cycle-seasonal decomposition of Ghysels and Osborne (2001, Equation (4.2)). An observed time series \(y_{t}\) is decomposed into a trend-cycle \(y_{t}^{{\mathrm{tc}}}\), seasonal \(y_{t}^{{\mathrm{s}}}\), and irregular \(y_{t}^{{\mathrm{i}}}\) component, abstracting from deterministic effects due to the length of months, the number of trading days, and holidays. We use the additive version of the decomposition

$$\begin{aligned} y_{t}= y_{t}^{{\mathrm{tc}}} + y_{t}^{{\mathrm{s}}} + y_{t}^{{\mathrm{i}}}. \end{aligned}$$
(3)

3.1 Design

Our starting point is the Basic Structural Model (Harvey 1989) for the simulated series \(y_t\), which consists of equations for the level (trend-cycle) \(\mu _t\), a random walk with drift, and the seasonal \(\gamma _t\) in dummy-variable form, supplemented with outliers

$$\begin{aligned} y_t & = \mu _t + \gamma _t + \sum _{i=1}^k \beta _i d_{it} + \varepsilon _t, \qquad \quad \varepsilon _t \sim \text {NID} \left(0, \sigma _{\varepsilon }^2\right) \end{aligned}$$
(4)
$$\begin{aligned} \mu _t & = \mu _{t-1} + \eta _t, \qquad \qquad \qquad \qquad \quad \eta _t \sim \text {NID} \left(0, \sigma _{\eta }^2\right) \end{aligned}$$
(5)
$$\begin{aligned} \gamma _t & = -\gamma _{t-1} -\gamma _{t-2} -\gamma _{t-3} + \omega _t, \qquad \omega _t \sim \text {NID} \left(0, \sigma _{\omega }^2\right), \end{aligned}$$
(6)

where k is the number of outliers, the size of outlier i is equal to \(\beta _i\), while \(d_{it}\) defines when the outlier occurs. For additive outliers \(d_{it}\) equals zero except for the period of the outlier, where \(d_{it}\) is equal to one. For a level shift, the value of \(d_{it}\) is zero up to the period of the shift and one thereafter. The errors \(\varepsilon _t\), \(\eta _t\) and \(\omega _t\) are assumed to be independent.

For each DGP we generate 1000 series for 35 years of quarterly observations. Observations for the first 10 years are discarded to reduce the impact of starting values. Hence, our simulated series consist of 100 observations. The DGPs derived from our simulation model (4)–(6) are based on an extended parameter search, aimed at generating sufficient variation between the 1000 series for each DGP, but avoiding extremely volatile series.

We make the following choices with respect to parameters and standard deviations:

  • the starting value of the level, \(\mu _0\), equals 100;

  • starting values for the seasonal factors \(\gamma _j\) for \(j=1, \ldots , 3\) are drawn from a uniform distribution \(U[-20,\ 20]\), while \(\gamma _4 = - \gamma _1 - \gamma _2 - \gamma _3\);

  • \(\sigma _{\varepsilon }\) gets a low noise value of 3 and a high noise value of 7;

  • \(\sigma _{\eta }\) gets values of 1 and 10 to mimic series with slow and strong development in the level of the series, respectively;

  • \(\sigma _{\omega }\) gets the value 0 for a constant seasonal pattern and the value of 2 for a varying seasonal pattern; we also simulate season breaks in one arbitrary period between the 10th and the 90th observation for series with a constant seasonal pattern by generating a new random seasonal pattern that begins in a period drawn from a uniform distribution between the 10th and the 90th observation.

When adding outliers,

  • the series are not simulated again to be able to analyse the pure effect of outliers;

  • we simulate one level shift in a randomly chosen period between the 10th and the 90th observation, and five single period outliers in random periods between observation 0 and 100;

  • the size of the additive outliers is drawn from a uniform distribution \(\pm (2 \sigma _{\varepsilon }, 5\sigma _{\varepsilon })\); a level shift is treated as an extraordinary event and drawn from \(\pm (4 \sigma _{\varepsilon }, 5\sigma _{\varepsilon })\).

By this we obtain 12 DGPs without outliers and 12 DGPs with outliers. 8 DGPs do not have a constant seasonal, 8 DGPs a varying seasonal pattern and 8 DGPs have a season break. Table 2 summarizes the simulation settings.

Table 2 Simulation settings

3.2 X-13ARIMA-SEATS

The X-13ARIMA-SEATS seasonal adjustment procedure consists of two steps. In the pretreatment or first step, the series is extended backwards and forwards using a regression model with ARIMA residuals, commonly referred to as a regARIMA model, while at the same time adjusting for outliers and trading-day and holiday effects, if appropriate. The second step, seasonal adjustment, consists of a combination of CMA filters (from the Census X-11 program) or ARIMA model-based adjustment from SEATS.

The Census X-11 program is described in, for instance, Ghysels and Osborn (2001, Chapter 4) and Ladiray and Quenneville (2001), whereas the appendix of Wright (2013) presents the X-12-ARIMA algorithm. Maravall (2008) presents the methodology behind the program SEATS (Signal Extraction in ARIMA Time Series). For further details we refer to the X-13ARIMA-SEATS Seasonal Adjustment Program homepage at the U.S. Department of Commerce Census Bureau https://www.census.gov/srd/www/x13as/.

Several implementations of X-13ARIMA-SEATS are available. In the simulations of this Section we use the X-13 program of the US Census Bureau called from the software environment R. For practical reasons we use the X-13ARIMA-SEATS module of Eviews 9 in the applications in Sect. 4.Footnote 4 Computational effort for X13-ARIMA-SEATS is much higher than for CAMPLET. Below the X-13ARIMA-SEATS outcomes are referred to as X13 seasonal adjustments.

3.3 Quality Measures

For a general discussion of criteria to judge the quality of seasonal adjustment procedures see e.g. Bell and Hillmer (1984). Fok et al. (2006) apply a number of diagnostic and specification tests on seasonal patterns before and after seasonal adjustment, using several DGPs.

We compare the simulated non-seasonal observations and the seasonally adjusted values using standard accuracy measures. Let \(\{ y_t \}\), \(t=1, \ldots , T\) be a simulated series with non-seasonal component \(y_t^{{\mathrm{ns}}}\equiv y_t - y_{t}^{{\mathrm{s}}}\) and \(y_t^{{\mathrm{sa}}}\) the seasonally adjusted value. We calculate two quality measures:

  1. 1.

    Root Mean Squared Error: \(RMSE = \sqrt{ \frac{1}{N} \sum _{t=1}^T (y_t^{{\mathrm{sa}}} - y_t^{{\mathrm{ns}}})^2}\);

  2. 2.

    Mean Error: \(ME = \frac{1}{N} \sum _{t=1}^T (y_t^{{\mathrm{sa}}} -y_t^{{\mathrm{ns}}})\).

We calculate the quality measures for three different horizons: (i) all observations: \(t=1, \ldots , 100;\,\, N=100\); (ii) the last four observations: \(t=97, \ldots , 100; \,N=4\); and (iii) single observations: \(t=100: N=1\), both in the first simulation experiment.

3.4 Current Vintage Comparison

Table 3 shows the fraction of the 1000 series for which the CAMPLET quality measures are better than the X13 measures. Note we compare absolute values of ME outcomes. A first conclusion is that X13 generally performs better than CAMPLET in terms of both quality measures distinguished and all horizons; the relative performance of CAMPLET improves for shorter horizons, despite the fact that changes in seasonal patterns and season breaks cannot occur in the first ten and the last ten observations and thus do not affect the CAMPLET outcomes for the last four observations and the final observation positively compared to the X13 outcomes.

For the 100-period horizon CAMPLET ME outcomes are better than corresponding X13 ME outcomes in 50% or more of the 1000 simulations if the DGP has a season break (DGP5 and DGP6). This conclusion also holds for DGP17, which combines a season break with outliers.

Table 3 Relative quality measures: current vintage

Table 4 compares the size of the the quality measures of CAMPLET and X13. By and large CAMPLET quality measures are quite close to X13 outcomes. We observe the same pattern as in Table 3. CAMPLET outcomes are in general larger than X13 outcomes, except for DGPs with season breaks.

Table 4 Quality measures of CAMPLET versus X13: current vintage

3.5 Quasi Real-Time Comparison Experiment

Seasonally adjusted values produced by X13 are subject to revision in contrast to the CAMPLET ones. Let \(y_t^{{\mathrm{sa}},{\tau }}, \ t=1,\ldots ,\tau , \tau = 1, \ldots , T\) be the series of seasonally adjusted values produced by X13 based on \(y_1, \ldots , y_\tau\), and \(y_t^{{\mathrm{sa}}}\) the series of seasonal adjustments produced by CAMPLET. Table 5 summarizes seasonal adjustment of X13 and CAMPLET focusing on revisions.

Table 5 Seasonal adjustment in X13 and CAMPLET

The series of X13 seasonal adjustments based on \(y_1, \ldots , y_T\) consists of a first release for the most recent period \(y_{T}^{{\mathrm{sa}},{T}}\), a first revision for period \(T-1\), a second revision for period \(T-2\), etc. The whole series is being revised, so in the X13 seasonal adjustments for earlier periods than the current period T information is used that is not available at the moment the seasonal adjustment is computed for the first time.

In our first comparison experiment we compared the X13 seasonal adjustments \(y_{t}^{{\mathrm{sa}},{T}}\) and the CAMPLET seasonal adjustments \(y_{t}^{{\mathrm{sa}}}\), for \(t=1, \ldots \ T\) for the current vintage T. Here we want to compare Census and CAMPLET seasonal adjustments in quasi real-time. For that purpose we generate the X13 seasonal adjustments first for the the whole time series \(y_1,\ldots ,y_T\), then for the the whole time series except the last observation \(y_1,\ldots ,y_{T-1}\), etc. Then we compare the series of first releases of X13 seasonal adjustment \(y_{t}^{{\mathrm{sa}},{t}}\) and the CAMPLET seasonal adjustment \(SA_t\)\(t=1, \ldots \ T\).

The second and the third column of Table 6 show the quality measures for this quasi real-time experiment. For computational reasons we only show the quality measures for the horizon of the last 25 periods. Differences compared to Table 3 for the final period and the last four periods are expected to be small and hence omitted.

Table 6 Relative quality measures: Quasi real-time

The relative RMSE outcomes are still in favor of X13, but CAMPLET produces a smaller RMSE in a larger fraction of series than in the previous current vintage case. CAMPLET performs better than X13 for two DGPs, DGP5 with a season break and DGP17 with a season break and outliers. However, CAMPLET produces a higher fraction of ME values that are smaller than X13 ME outcomes for all but three DGPs: DGP7 (no season break, no outliers), DGP16 (no season break, outliers) and DGP19 (no season break, outliers).

In the last two columns of Table 6 we re-calculate the relative quality measures for the quasi real-time experiment for growth rates. This does not affect the conclusions based on RMSE outcomes. CAMPLET performs better than X13 for DGP5 and DGP17. ME outcomes change a lot though. For growth rates ME outcomes are approximately .2 smaller than ME level outcomes, which leads to CAMPLET being favored to X13 much less often (DGP5, DGP6 and DGP17).

Table 7 compares the size of RMSEs and MEs of CAMPLET to X13. CAMPLET RMSEs are still larger than X13 values, but much closer than in the current vintage case. We observe the same pattern as for the relative quality measures in Table 6. For levels the ME values of CAMPLET are smaller than the X-13 values for most DGPs, in contrast to the growth rates outcomes.

Table 7 Quality measures of CAMPLET versus X13: Quasi real-time

3.6 Discussion

Several explanations may drive the simulation results. The simulation set-up based on the decomposition of a series into a level (trend-cycle), seasonal and irregular component corresponds to the basic composition of X13 but much less to the decomposition of CAMPLET. CAMPLET does not explicitly distinguish an irregular component in its basic decomposition, and does not aim at modeling the individual trend/cycle and irregular components. In addition, X13 ‘smoothens’ the seasonal pattern over time which also results in smooth adjusted values; CAMPLET does not share this property. See also the illustration using Ahold data in Sect. 4 below.

Moreover, both X13 and CAMPLET can be written down in a model which decomposes a series into latent components and is estimated via the Kalman filter.Footnote 5 Application of the Kalman filter produces the best outcomes in terms of the RMSE. X13 can be associated with the Kalman smoother in which the data is used twice (forward and backward), while the Kalman filter applies to CAMPLET. The Kalman smoother employs the data much more efficiently than the Kalman filter, see e.g. Durbin and Koopman (2012, Chapter 4), and produces superior seasonally adjusted values in terms of RMSEs.

4 Illustration

In this section we present three illustrations of seasonal adjustment. The first example, on U.S. non-farm payroll employment, shows that both CAMPLET and X13 produce similar outcomes. The second example, on operating income of Ahold, illustrates that CAMPLET picks up a change in the seasonal while X13 does not. The third example, on real GDP in the Netherlands, compares revisions in X13 and CAMPLET seasonal adjustments.

4.1 U.S. Non-farm Payroll Employment

There are not many series for which real-time vintages are available both in seasonally adjusted and non-seasonally adjusted form. One of the exceptions is non-farm payroll employment. Wright (2013) looks at this series too. The source of the series is Bureau of Labor Statistics/Alfred, Federal Reserve Bank of St. Louis. Seasonally adjusted values are only available for the 2014M2 vintage, the latest vintage when we downloaded the data, and cover the 1939M1–2014M1 period. We retrieved raw data, i.e. non-seasonally adjusted figures, for the vintages from 2008M9 up to and including 2014M2; all vintages start in 1939M1.

Our non-farm payroll employment data trapezoid consists of initial revisions with changes in the most recent observations, annual (seasonal) revisions in February due to updated seasonal factors and the confrontation of quarterly with annual information resulting in changes up to 3 years back, and historical, comprehensive or benchmark revisions in February 2013 and February 2014, possibly related to changes in e.g. statistical methodology, which affect the whole vintage. Generally, revisions in the employment series are small.

Fig. 4
figure 4

U.S. non-farm payroll employment, vintage 2014Q2

Figure 4 shows the 2014M2 vintage of seasonally unadjusted non-farm payroll employment data (NSA) from 2000M1 onwards, together with the published seasonally adjusted figures (SA) and seasonally adjusted values obtained with the Census X-13 routine in EViewsFootnote 6 (SA X-13) and CAMPLET figures produced with the default settings of Table 1 (SA CAMPLET).

The first finding is that differences between all seasonally adjusted series are quite small, at least visually. CAMPLET seasonally adjusted figures are very close to the published SA figures and the EViews X-13 outcomes. This observation also holds for the timing of peaks and troughs. Note however that CAMPLET picks up the end of the trough in 2009 two months before the X13 seasonal adjustments. A second finding is that the seasonally adjusted figures of CAMPLET are slightly lower than the other two SA series towards the end of 2009. Apparently, the trough in the raw data enters the seasonally adjusted component of CAMPLET instead of the seasonal.

Fig. 5
figure 5

Quasi real-time analysis

To investigate the impact of new information becoming available, we do a quasi real-time analysis and compute seasonally adjusted figures with X13 and CAMPLET for the 2014Q2 vintage, starting from the 2000M1-2008M8 period, adding one observation at the time. Figure 5 shows the outcomes. CAMPLET outcomes do not change when new observations become available, in contrast with X13 figures. However X13 does not produce large revisions in (quasi) real-time, if seasonal factors are updated for every observation. This point has been noted for the X11 filter by e.g., Wallis (1982).

To further illustrate that CAMPLET does a solid job in seasonally adjusting U.S. non-farm payroll employment, we show Matlab power spectra of the raw data and X13 and CAMPLET seasonal adjustments in Fig. 6. CAMPLET filters out the seasonal frequencies quite well, but clearly more research is needed in this area.

Fig. 6
figure 6

Spectra of US non-farm employment

4.2 Ahold

The U.S. non-farm payroll employment series has a fairly constant seasonal pattern with small seasonals. Our second illustration is operating income of Ahold, an international retailer based in the Netherlands. Figure 7 reveals that this series, with quarterly observations from 2006Q1 up to and including 2013Q4, has a stronger seasonal pattern. Again CAMPLET seasonally adjusted figures are fairly close to the X13 outcomes, but there are striking differences in 2006 through 2008.

Fig. 7
figure 7

Ahold Operating income. Source: Ahold Quarterly Bulletin (various issues)

In the beginning of 2008 Ahold announced a change in accounting policies: “As of 2008, Ahold has applied IFRS 8 ‘Operating segments’. IFRS 8 introduces new disclosure requirements with respect to segment information. This adoption of IFRS 8 did not have an impact on Ahold’s segment structure, consolidated financial results or position; however, segment results no longer include intercompany royalties. Consequently, operating income decreased from 421 million in 2007Q1 to 336 million in 2008Q1.”

Fig. 8
figure 8

Ahold operating income: seasonal pattern

Figure 8 shows the seasonal patterns as identified by CAMPLET and X13. Whereas the latter method finds a constant seasonal pattern throughout the sample, CAMPLET picks up a change! Future research in the form of a (quasi) real-time analysis will reveal how the seasonal pattern of X-13ARIMA-SEATS evolves over time.

4.3 Real GDP in the Netherlands

To focus once more on revisions in seasonal adjustments, we do a quasi real-time analysis using the 2014Q3 vintage of real GDP in the Netherlands. We calculate seasonally adjusted values of levels and corresponding growth rates for all observations between 2005Q1 and 2011Q3, allowing X13 outcomes to be revised up to 3 years backwards.Footnote 7

Figure 9 shows successive seasonally adjusted values of X13 (here abbreviated as X-13) and CAMPLET both in levels (left axis) and growth rates (right axis) for three quarters: 2005Q3, 2008Q2 and 2008Q3. The outcomes are representative for the other quarters as well. Whereas X13 seasonally adjusted values are subject to revision when observations are added to the series, CAMPLET outcomes stay the same. In contrast to our first illustration on U.S. non-farm payroll employment, revisions are considerable.

Fig. 9
figure 9

Real GDP in the Netherlands (levels: left axis; growth rates: right axis)

5 Conclusion

Over the years, seasonal adjustment has become standard in empirical economic research and many other fields where periodic time series are being used and analysed. Various methods exist to seasonally adjust time series as noted in the Introduction. In this paper we present a new seasonal adjustment program called CAMPLET, which does not produce revisions when new observations become available. CAMPLET consists of a simple adaptive procedure to separate the seasonal and the non-seasonal component from an observed time series. Once this process is carried out there will be no need to revise these components at a later stage when new observations become available.

A controlled simulation experiment revealed that X13 generally performs better than CAMPLET in the set-up of the simulation experiments. In particular RMSEs of X13 are lower than RMSEs of CAMPLET. This does not come as a surprise given the fact that X13 ‘smoothens’ the unobserved components, while CAMPLET ‘filters’ the components, i.e., only uses information when it comes available. In our simulations CAMPLET outperforms X13 in terms of MEs for the 100-period horizon if the series have a season break. A comparison in quasi real-time shows that X13 still performs better than CAMPLET according to RMSE outcomes. However, on the basis of ME outcomes CAMPLET is preferred for a large variety of the data generating processes studied.

The potential of CAMPLET is illustrated for U.S. non-farm payroll employment, operational income of AHOLD, and real GDP in the Netherlands. CAMPLET does a solid job in seasonal adjustment, although small differences in the timing of turning points with respect to X13 do occur. CAMPLET does not produce revisions, and can pick up changes in seasonal patterns. Additional advantages are its low computational effort and its capability to deal with short, volatile series.