Introduction to seasonal Adjustmnet - CROS

advertisement
X-12 ARIMA
Eurostat, Luxembourg
Seasonal Adjustment
Introduction to X-12 Arima
was developed by US Census Bureau and runs
through the following steps:
1. The series is modified by any user defined prior
adjustments.
2. the program fits a regARIMA model to the series in
order to detect and adjust for outliers and other
distorting effects to improve forecasts and seasonal
adjustment.
3. It detect and estimates additional component (e.g.
calendar effects) and extrapolate forward (forecast) and
backwards (backcast).
Eurostat, Luxembourg
Seasonal Adjustment
Introduction to X-12 Arima (2)
4.
5.
The program then uses a series of moving averages to
decompose a time series into three components. It
does this in three iterations, getting successively better
estimates of the components. During these iterations
extreme values are identified and replaced.
In the last step a wider range of diagnostic statistics
are produced, describing the final seasonal
adjustment, and giving pointers to possible
improvements which could be made.
Eurostat, Luxembourg
Seasonal Adjustment
What is a regARIMA model?
A regARIMA model is a regression model with ARIMA
errors. ARIMA stands for AutoRegressive Integrated
Moving Average. When we use regression models to
estimate some of the components in a time series, the
errors from the regression model are correlated, and we
use ARIMA models to model the correlation in the errors.
ARIMA models are one way to describe the relationships
between points in a time series.
Besides using regARIMA models to estimate regression
effects (such as outliers, trading day, and moving
holidays), we also use ARIMA models to forecast the
series. Research has shown that using forecasted
values gives smaller revisions at the end of the series.
Eurostat, Luxembourg
Seasonal Adjustment
What are seasonal filters?
A filter is a weighted average where the weights sum to
1.
Seasonal filters are the filters used to estimate the
seasonal component. Ideally, seasonal filters are
computed using values from the same month or quarter,
for example, an estimate for January would come from a
weighted average of the surrounding Januaries.
The seasonal filters available in X-12-ARIMA consist of
seasonal moving averages of consecutive values within
a given month or quarter. An n x m moving average is
an m-term simple average taken over n consecutive
sequential spans.
Eurostat, Luxembourg
Seasonal Adjustment
What are seasonal filters? (2)
An example of a 3x3 filter (5 terms) for January 2003 (or Quarter 1,
2003) is:
2001.1 + 2002.1 + 2003.1 +
2002.1 + 2003.1 + 2004.1 +
2003.1 + 2004.1 + 2005.1
9
An example of a 3x5 filter for January 2003 (or Quarter 1, 2003) is:
2000.1 + 2001.1 + 2002.1 + 2003.1 + 2004.1 +
2001.1 + 2002.1 + 2003.1 + 2004.1 + 2005.1 +
2002.1 + 2003.1 + 2004.1 + 2005.1 + 2006.1
15
Eurostat, Luxembourg
Seasonal Adjustment
What are trend filters?
Trend filters are weighted averages of consecutive months or
quarters used to estimate the trend component.
An example of a 2x4 filter (5-terms) for First Quarter 2005:
2004.3 + 2004.4 + 2005.1 + 2005.2
2004.4 + 2005.1 + 2005.2 + 2005.3
_______________________________________
8
Notice that we are using the closest points, not just the closest
points within the First Quarter like with the seasonal filters above.
Notice also that every quarter has a weight of 1/4, though the Third
Quarter uses values in both 2004 and 2005.
Eurostat, Luxembourg
Seasonal Adjustment
Why do the seasonal factors change when new
data are added?
Keep in mind that the data used in the seasonal and the trend filters can go
back several years. Let's look at an example using X-12-ARIMA's seasonal
moving average filters. For example, if the last point in your series is
January 2006, and you're using 3x5 seasonal filters, the value at January
2006 will effect the estimates for Januaries in 2004, and 2005. You can see
the value for January 2003 in the equations below.
The 3x5 filter for January 2004:
2001.1+2002.1+2003.1+2004.1+2005.1
2002.1+2003.1+2004.1+2005.1+2006.1
2003.1+2004.1+2005.1+2006.1+2007.1
_____________________________________________
15
Eurostat, Luxembourg
Seasonal Adjustment
Why do the seasonal factors change when new
data are added?(2)
The 3x5 filter for January 2005:
2002.1+2003.1+2004.1+2005.1+2006.1
2003.1+2004.1+2005.1+2006.1+2007.1
2004.1+2005.1+2006.1+2007.1+2008.1
________________________________________________
15
You can see in the above equations that the new point at January
2006 will affect the estimates for the other Januaries. There is a
similar effect for the trend filters, with new data effecting estimates
for half the filter length.
Eurostat, Luxembourg
Seasonal Adjustment
X12-ARIMA Stage 1. Initial Estimates
Step 1.1: Initial Trend Estimate
Compute a centered 12-term (13-term) moving average as a first estimate
of the trend:
Tt (1) 
1
1
1
1
1
Yt 6  Yt 5    Yt    Yt 5  Yt 6
24
12
12
12
24
The first trend estimation is always 2x12 or 2x4
Step 1.2: Initial Seasonal-Irregular component or “SI Ratio”
The ratio of the original series to the estimated trend is the first estimate of
the detrended series:
SI
(1)
t
Yt
 (1)
Tt
Eurostat, Luxembourg
SI
(1)
t
 Yt  Tt
(1)
Seasonal Adjustment
X12-ARIMA Stage 1. Initial Estimates
(cont..)
Step 1.3: Initial Preliminary Seasonal Factor
5-term weighted moving average (3x3) is calculated for each month of the
seasonal-irregular ratios (SI) to obtain preliminary estimates of the seasonal
factors:
1
2
3
2
1
)
)
Sˆ t(1)  SI t(1)24  SI t(112
 SI t(1)  SI t(112
 SI t(1)24
9
9
9
9
9
Step 1.4: Initial Seasonal Factor
Crude “unbiased” seasonal from step 1.3 via centering:
S
(1)
t

Sˆ t(1)
1
24
Sˆ t(1)6  121 Sˆt(1)5    121 Sˆ t(1)5 
1
24
Sˆt(1)6
 Sˆ t(1)6 Sˆ t(1)5
Sˆt(1)5 Sˆ t(1)6 
(1)
ˆ

S  St  



 24
12
12
24 

1
t
Step 1.5: Initial Seasonal Adjustment
At(1) 
Yt
S t(1)
Eurostat, Luxembourg
At(1)  Yt  St(1)
Seasonal Adjustment
X12-ARIMA Stage 2. Seasonal Factors and
Seasonal Adjustment
Step 2.1: Intermediate Trend
Calculate an intermediate trend (Henderson) of length 2H+1 for datadetermined H.
Tt
where
( 2)

H
h
j  H
( 2 H 1)
j
At(1)j
h (j 2 H 1)  H  j  H , h j  h j are the (2H+1)-term Henderson weights.
Step 2.2: Final SI Ratios
Calculate the detrended series from Henderson trend:
SI
( 2)
t
Yt
 ( 2)
Tt
Eurostat, Luxembourg
SI t(2)  Yt  Tt ( 2)
Seasonal Adjustment
X12-ARIMA Stage 2. Seasonal Factors and
Seasonal Adjustment
Step 2.3: Preliminary Seasonal Factor
Calculate final “biased” seasonal factors via a “3x5”
seasonal moving average:
ˆS ( 2)  1 SI ( 2)  2 SI ( 2)  3 SI ( 2)  3 SI ( 2)  3 SI ( 2)  2 SI ( 2)  1 SI ( 2)
t
t 36
t  24
t 12
t
t 12
t  24
t  36
15
15
15
15
15
15
15
Step 2.4: Seasonal Factor
Calculate final “unbiased” seasonal factors via centering:
S
( 2)
t

Sˆt( 2 )
1
24
Sˆ t(26)  121 Sˆ t(25)    121 Sˆ t(25) 
1
24
Sˆ t(26)
S
( 2)
t
ˆ ( 2) Sˆ ( 2) 
 Sˆt(26) Sˆ t(25)
S
( 2)
ˆ
 St  

   t 5  t  6 
 24
12
12
24 

Step 2.5: Seasonal Adjustment
At( 2 ) 
Yt
S t( 2)
Eurostat, Luxembourg
At(2)  Yt  St(2)
Seasonal Adjustment
Stage 3. Final Henderson Trend and Final
Irregular
Step 3.1: Final Trend
Final trend from a Henderson trend filter determined from data:
Tt
( 3)

H
h
j  H
( 2 H 1)
j
At(2)j
Step 3.2: Final Irregular
Final irregular factors as ratios between the seasonally adjusted series from
Stage 2 and the final trend from Step 3.1:
I
( 3)
t
At( 2)
 ( 3)
Tt
Eurostat, Luxembourg
I t(3)  At(2)  Tt (3)
Seasonal Adjustment
Estimated Decomposition:
Yt  Tt
(3)
S
( 2)
t
I
(3)
t
Yt  Tt S I
(3)
Eurostat, Luxembourg
( 2) (3)
t
t
Seasonal Adjustment
Trend Filter Choices
The first trend estimation (in Stage 1) is always 2x12 or
2x4.
The Henderson trend filter choices (Step 2.1, 3.1) are
based on noise-to-signal ratios, the size of the irregular
variations relative to those of the trend and labelled I / C
in the X-12 output.
 If I / C<1, the 9-term Henderson filter (H=4) is used.
Otherwise, in Stage 2, the 13-term filter (H=6) is used.
 In Stage 3, the 13-term filter is used when 1<I / C
<3.5, but the 23-term Henderson filter (H=11) is used
when I / C≥3.5.
Eurostat, Luxembourg
Seasonal Adjustment
Seasonal Filter Choices
The criterion for selection of the seasonal moving average is based on
the global I / S, which measures the relative size of irregular
movements and seasonal movements averaged over all months or
quarters. It is used to determine what seasonal moving average is
applied using the following criteria:
I/S
Seasonal Moving
Average
0<I / S<2.5
3x3
3.5<I / S<5.5
3x5
6.5<I / S
3x9
The global I / S ratio is calculated using data that ends in the last full
calendar year available.
If 2.5<I / S<3.5 or 5.5<I / S<6.5 then the I / S ratio will be calculated
using one year less of data to see if the I / S ratio than falls into one of
the ranges given above. The year removing is repeated either until the
I / S ratio falls into one of the ranges or after five years a 3x5 moving
average will be used.
Eurostat, Luxembourg
Seasonal Adjustment
Download