Universidad Privada Boliviana / Universidad del Pacífico (Lima, Perú)
Prof. J. Dávalos (Ph.D.)
The fundamentals of non-stationary series
Most time series that look non-stationary exhibit trend behaviors i.e. economic stocks such as GDP, infrastructure, exports, government expenditure, household consumption, etc.
GDP (US)
Others, do not exhibit a clear trend, but do not look stable at various windows, think about interest rates or certain stock prices.
A very fundamental non-stationary process is an AR(1) whose coefficient is 1. This is a unit-root process.
\[ Y_t = a + \delta Y_{t-1} + \varepsilon_t \] * Remember that we needed \(\delta < 1\) and large history so that:
\(Y_t = a \sum_{j=0}^{t-1}\delta^j + \delta^t Y_0 + \sum_{j=0}^{t-1}\delta^j\varepsilon_{t-j}\)
becomes…
\(Y_t = a /(1-\delta) + \sum_{j=0}^{t-1}\delta^j\varepsilon_{t-j}\)
with \(\delta =1\) we do not need large T:
\(Y_t = a t + Y_0 + \sum_{j=0}^{t-1}\varepsilon_{t-j}\)
When \(\delta = 1\) this is a random walk with drift (constant term) \(Y_1 = a + Y_{t-1} + \varepsilon_t\):
\(Y_t = a t + Y_0 + \sum_{j=0}^{t-1}\varepsilon_{t-j}\)
\(at\) is noted the deterministic trend
\(\sum_{j=0}^{t-1}\varepsilon_{t-j}\) is the stochastic trend
Given that \(\delta=1\) any past shock never dies. Past shocks exhibit perpetual effects on every future realizations of \(Y_t\)
Deterministic and stochastic trend, random walk with drift
\[Y_t = a t + Y_0 + \sum_{j=0}^{t-1}\varepsilon_{t-j}\]
\(at\) is noted the deterministic trend
\(\sum_{j=0}^{t-1}\varepsilon_{t-j}\) is the stochastic trend
Fist-differentiate the series. This leads to \(\Delta y_t = a + \varepsilon_t\) which leads to a feasible statistical specification of the new residual (WN). It can be estimated by OLS.
This is a difference stationary process
Deterministic trend and no stochastic trend
Consider the model with deterministic trend and no stochastic trend:
\(Y_t = Y_0 + at + \varepsilon_t\)
A first difference creates a \(\Delta \varepsilon_t\) residual, that is not WN: \(\Delta Y_t = a + u_t\), where the new residual is \(u_t = \Delta\varepsilon_t=\varepsilon_{t}-\varepsilon_{t-1}\). Two consecutive \(u_t\) are autocorrelated by definition in a TS process.
So you must detrend the series, i.e. estimate \(Y_t\) as a function of a constant: \(Y_t = \beta_0 + \beta_1 t + u_t\), calculate the residual \(Y_t - \hat\beta_0 - \hat\beta_1 t\) and specify a model for the residual which should be stationary.
The trend can be a polynomial one
This a trend stationary process
Empirically, you are advised to perform both procedures and check which one delivers well behaved WN residuals.
Detrending signals a trend stationary process
First differencing signals a unit root proces
Example:
Detrend the series and check its correlogram (ACF, PACF, Portmanteau). If trend stationary (TS), the correlogram must reflect a WN process. If there is an stochastic trend (difference stationary (DS) process), then the correlogram will show evidence of autocorrelation.
First differentiate (FD) the series and check its correlogram (ACF, PACF, Portmanteau). If trend stationary (TS), the residual will show evidence of autocorrelation. If difference stationary (DS), then the residuals will show no autocorrelation (WN).
Nelson and Plosser (1982)
The ACFs show no statistical significance, however we can identify some patterns.
From the level ACFs, Real and nominal GNP and Industrial production seem to be very persistent (ACF(1 2) close 1). We know they exhibit trend like behavior.
FD these 3 series downsizes the ACFs notably. This is not the case of detrending as the ACFs keep closer to 1. They seem DS. Thus, they are likely to contain both, deterministic and stochastic trends that result of a random-walk with drift model.
Unemployment gets better also by FD. Detrending it does not improve the ACFs so it is likely to be a DS series as well. This is coherent with the visual inspection of any unemployment rate TS (they do not exhibit trend like behavior).
Dickey-Fuller test
It provides a formal test to asses whether a series that seems to exhibit a trend is either:
\(DS\) : \(Y_t = a + Y_{t-1} + \varepsilon_t\) This is a Random-Walk (with drift) that exhibits both, deterministic and stochastic trend (in its building block eq.).
if both \(H_0:\)\(\gamma = 0\) and \(\beta_1 = 0\) are true, then this implies a random-walk, a DS process
The previous equation is an unrestricted model while a restricted by \(H_0\) model is:
\(\Delta Y_t = \beta_0 + \epsilon_t\)
To find out if \(H_0\) holds (DS process) we can manually test the restricted against the unrestricted model using and F-statistic with Dickey-Fuller (DF) tabulated critical values. This test statistic is denominated \(\phi_3\)
(Federal Reserve Economic Data, St. Louis Fed)
Contains data from http://www.stata-press.com/data/r13/gdp2.dta
Observations: 236 Federal Reserve Economic Data, St. Louis Fed
Variables: 5 24 Feb 2013 08:45
--------------------------------------------------------------------------------------------------------------------------------
Variable Storage Display Value
name type format label Variable label
--------------------------------------------------------------------------------------------------------------------------------
date str10 %10s fed string date
gdp double %10.0g real gross domestic product (GDP)
daten float %td numeric (daily) date
tq float %tq quarterly time variable
gdp_ln double %10.0g natural log of real GDP
--------------------------------------------------------------------------------------------------------------------------------
Sorted by: tq
Time variable: tq, 1952q1 to 2010q4
Delta: 1 quarter
Source | SS df MS Number of obs = 235
-------------+---------------------------------- F(2, 232) = 1.91
Model | .000336844 2 .000168422 Prob > F = 0.1500
Residual | .020430073 232 .000088061 R-squared = 0.0162
-------------+---------------------------------- Adj R-squared = 0.0077
Total | .020766917 234 .000088748 Root MSE = .00938
------------------------------------------------------------------------------
D.gdp_ln | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
gdp_ln |
L1. | -.0085604 .0143258 -0.60 0.551 -.0367856 .0196648
|
tq | .0000519 .0001153 0.45 0.653 -.0001752 .000279
_cons | .0774632 .1144143 0.68 0.499 -.1479607 .302887
------------------------------------------------------------------------------
Source | SS df MS Number of obs = 235
-------------+---------------------------------- F(0, 234) = 0.00
Model | 0 0 . Prob > F = .
Residual | .020766917 234 .000088748 R-squared = 0.0000
-------------+---------------------------------- Adj R-squared = 0.0000
Total | .020766917 234 .000088748 Root MSE = .00942
------------------------------------------------------------------------------
D.gdp_ln | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
_cons | .0076518 .0006145 12.45 0.000 .0064411 .0088625
------------------------------------------------------------------------------
phi3 = 1.9125697
DF Critical value for \(\phi_3\)
Our test statistic does not reject the null, thus the logarithm of the GDP follows a unit-root process i.e it should be differentiated instead of detrended in order to get an stationary process.
The GDP trend behavior must come from either the unit root or the deterministic trend. So, let’s test whether \(H_0: \gamma = 0\).
This may imply that the TS does not have an unit-root, thus being TS. So we must test \(H_0\) after using \(\phi_3\). If rejected, then there is no unit-root and the trend behavior in the GDP must be explained by a trend-stationary process.
The test statistic is just the t-stat of our \(\hat\gamma\) (-0.6). The critical values are provided by DF (\(\tau_{\tau}\) in our case Constant + Time trend )
DF Critical value for \(\gamma\) given alternative models
Had we rejected the null with \(\phi3\) our \(\hat \gamma\) t-stat (-0.6) would still be below the 10% critical value of -3.12 (model with constant and trend), thus we would not have rejected the unit-root process either (this is a DS series)
Note that this procedure is adapted for a series with an apparent “trend” that we want to either detrend of first-differentiate, in order to get an stationary process to be scrutinized.
U-root test : DF Tests with no apparent trend
Many economic time series may not exhibit a long-run trend ($_1 = $). Thus, the Dickey-Fuller test can focus on testing for unit-root only. Thus, estimate your DF model with a constant and check the \(\tau_{\mu}\) table.
Augmented DF
We assumed that the DF equation was WN. This might not be the case.
General to specific approach. Start by including as many lags (\(\Delta Y_{t-k}\)) as reasonable and check the last one is significant.
Decrease the lag order if not the last one is not significant.
When a significant lag is achieved, check for WN residuals (Correlogram, Portmanteau test).
Exercise 1
-1 Apply the general to specific approach that replicates our TS vs DS test (\(\phi_3\)). You are expected to retrieve the following:
use http://www.stata-press.com/data/r13/gdp2.dta, cleartsset tq* Augmented DF* {YOUR GENERAL TO SPECIFIC PROCEDURE HERE}** Ha: Unrestricted modelregd.gdp_ln l.gdp_ln tq l1.D.gdp_lnpredictresid, rcorrgramresid , lags(10)scalar SSRa = e(rss)scalar defree = e(df_r)** Ho: Restricted modelregd.gdp_ln l1.D.gdp_ln scalar SSR0 = e(rss)scalar phi3 = (SSR0-SSRa)*(defree)/(SSRa*2)scalardi phi3
Given the previous answers, we should agree that there is a unit-root process behind the log of GDP. Calculate its first difference and perform the ADF on it. Test that the FD does not exhibit a unit-root i.e. is it a stationary TS.
Exercise 3
Identify whether Bolivia’s inflation rate is non-stationary: either trend stationary or unit-process. If not a stationary process, detrend of FD the series. Evaluate whether the latter is stationary.
ADF caveats
As in every statistical model, the baseline assumptions must hold.
Some TS may exhibit structural breaks in drifts and slopes (e.g. Bolivia’s inflation at 1985 or US macro indicators during the 1929 crash of the stock market). These will ruin any conclusions based on standard assumptions.
An alternative to not having WN errors in the ADF test is to correct the variance covariance matrix of the estimated parameters by using an alternative to \(\sigma^2(X'X)^{-1}\) where \(X\) is data matrix containing the regressors of the ADF. The Newey-West variance covariance estimator is implemented by the Phillips-Perron test. Still, the user must provide a guess for the number of lags.