Lecture - ECON 7223 - 2
Lecture - ECON 7223 - 2
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 1 / 23
Estimation
I Identification:
- Identify the order of integration d: must run d + 1 unit root tests
- Filter yet = ∆d (yt ) ≡ I(0) transformed series
I Proceed to forecasting
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 2 / 23
Estimation
command in STATA
- First test is run with drift + trend, the second with only a drift
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 3 / 23
Estimation
Application: correlogram
(b) ACF
(c) PACF
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 4 / 23
Estimation
Correlogram
- ACFs ⇒ pure AR(p) processes: couple (p, q) candidates lie in {2, 4} × {0},
i.e., (p, q) ∈ {(2, 0); (4, 0)}
- Presence of seasonal variations may impede on p and q’s identification!!!
Do-file:
use "your file direction", clear
generate tdate=tq(1960q1)+ −n-1
format tdate tsset tdate
tsline lnwpi
varsoc lnwpi
dfuller lnwpi, lags(2) trend regress
dfuller d.lnwpi, lags(2) regress /*First-Dif*/
ac d.lnwpi, lags(40)
pac d.lnwpi, lags(40)
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 5 / 23
Estimation
Estimation results
I Estimation:
- Estimates store in a table with their s.e’s
- The AIC indicates that ARIMA (4,1,0) model fits the data better
- As is often the case, different model-selection criteria have led to conflicting conclusions
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 6 / 23
Estimation
Estimation code
Do-file:
arima lnwpi, arima(2,1,0)
estat ic
estimates store ARIMA210
estat aroots /* check stability of polynomial roots*/
arima lnwpi, arima(4,1,0)
estat ic
estimates store ARIMA410
/* store all models in a Table */
estimates table ARIMA210 ARIMA410, se stats(N)
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 7 / 23
Forecasting with ARIMA
Forecasting techniques
I Static forecasts: produces forecast from past data; limited in out-of-sample forecasting
I Dynamic forecasts: uses past forecasts for the currents; unrestricted in out-of-sample case
Forecasts: 1 step-ahead
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 9 / 23
Forecasting with ARIMA
Forecasts: 1 step-ahead
- Static > Dynamic: prior forecast errors accumulate over time with dynamic
forecasts ⇒ Static is better!
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 10 / 23
Forecasting with ARIMA
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 11 / 23
Forecasting with ARIMA
- Static forecasts: ARIMA (2,1,0) & ARIMA (4,1,0) show equal performance:
both do well in mimicking the real data
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 12 / 23
Seasonal ARIMA models
- Monthly data for which high values tend always to occur in some particular months & low
values tend always to occur in other particular months ⇒ S = 12. If quarterly data ⇒ S = 4
I Seasonal ARIMA model:
- seasonal AR and MA terms predict the series using data values and errors at times with lags
that are multiples of S
- with monthly data (and S = 12), a seasonal first-order autoregressive model would use
yt−12 to predict yt . A seasonal second-order autoregressive model would use yt−12 and
yt−24 to predict yt
- a seasonal first-order MA(1) model (with S = 12) would use εt−12 as a predictor. A
seasonal second-order MA(2) model would use εt−12 and εt−24.
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 13 / 23
Seasonal ARIMA models
- average values at some particular times within the seasonal span may be different than the
average values at other times
- Seasonal differencing renders the series stationary: With S = 12, (1 − L12)yt = yt − yt−12 is
purged of seasonal variations.
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 14 / 23
Seasonal ARIMA models
I Non-seasonal differencing:
- If trend is present in the data, we may also need non-seasonal differencing
- Often (not always) a first-difference (nonseasonal) will “detrend" the data, i.e., we use
(1 − L)yt = yt − yt−1 in the presence of trend
- Removing trend doesn’t mean that we have removed the dependency: We may have
removed the mean, µt , part of which may include a periodic component
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 15 / 23
Seasonal ARIMA models
SARIMA Models
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 16 / 23
Seasonal ARIMA models
SARIMA Models
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 17 / 23
Seasonal ARIMA models
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 18 / 23
Seasonal ARIMA models
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 19 / 23
Seasonal ARIMA models
- Coefficient on εt−13 is the product of the coefficients on the εt−1 and εt−12 terms:
- ARIMA labeled the dependent variable DS12.lnair to indicate that it has applied the
difference operator ∆ and the lag-12 seasonal difference operator ∆12 to “lnair "
- For simple multiplicative models, using the sarima() option is easier, though this second
syntax allows us to incorporate more complicated seasonal terms
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 20 / 23
Seasonal ARIMA models
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 21 / 23
X-12-ARIMA Seasonal Adjustment
I X-12-ARIMA was the U.S. Census Bureau’s software package for seasonal
adjustment:
H can be used together with many statistical packages:
- Statistics Canada
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 22 / 23
X-12-ARIMA Seasonal Adjustment
Firmin Doko Tchatoka (UoA) ECON 7223-Time Series Metrics IV August 6, 2021 23 / 23