arch.unitroot.cointegration.phillips_ouliaris¶
-
arch.unitroot.cointegration.
phillips_ouliaris
(y, x, trend='c', *, test_type='Zt', kernel='bartlett', bandwidth=None, force_int=False)[source]¶ Test for cointegration within a set of time series.
- Parameters
y (array_like) -- The left-hand-side variable in the cointegrating regression.
x (array_like) -- The right-hand-side variables in the cointegrating regression.
trend ({"n","c","ct","ctt"}, default "c") --
Trend to include in the cointegrating regression. Trends are:
"n": No deterministic terms
"c": Constant
"ct": Constant and linear trend
"ctt": Constant, linear and quadratic trends
test_type ({"Za", "Zt", "Pu", "Pz"}, default "Zt") --
The test statistic to compute. Supported options are:
"Za": The Zα test based on the the debiased AR(1) coefficient.
"Zt": The Zt test based on the t-statistic from an AR(1).
"Pu": The Pᵤ variance-ratio test.
"Pz": The Pz test of the trace of the product of an estimate of the long-run residual variance and the inner-product of the data.
See the notes for details on the test.
kernel (str, default "bartlett") -- The string name of any of any known kernel-based long-run covariance estimators. Common choices are "bartlett" for the Bartlett kernel (Newey-West), "parzen" for the Parzen kernel and "quadratic-spectral" for the Quadratic Spectral kernel.
bandwidth (int, default None) -- The bandwidth to use. If not provided, the optimal bandwidth is estimated from the data. Setting the bandwidth to 0 and using "unadjusted" produces the classic OLS covariance estimator. Setting the bandwidth to 0 and using "robust" produces White's covariance estimator.
force_int (bool, default False) -- Whether the force the estimated optimal bandwidth to be an integer.
- Returns
Results of the Phillips-Ouliaris test.
- Return type
See also
arch.unitroot.ADF()
Augmented Dickey-Fuller testing.
arch.unitroot.PhillipsPerron()
Phillips & Perron's unit root test.
arch.unitroot.cointegration.engle_granger()
Engle & Granger's cointegration test.
Notes
Warning
The critical value simulation is on-going and so the critical values may change slightly as more simulations are completed. These are still based on far more simulations (minimum 2,000,000) than were possible in 1990 (5000) that are reported in 1.
Supports 4 distinct tests.
Define the cross-sectional regression
\[y_t = x_t \beta + d_t \gamma + u_t\]where \(d_t\) are any included deterministic terms. Let \(\hat{u}_t = y_t - x_t \hat{\beta} + d_t \hat{\gamma}\).
The Zα and Zt statistics are defined as
\[\begin{split}\hat{Z}_\alpha & = T \times z \\ \hat{Z}_t & = \frac{\hat{\sigma}_u}{\hat{\omega}^2} \times \sqrt{T} z \\ z & = (\hat{\alpha} - 1) - \hat{\omega}^2_1 / \hat{\sigma}^2_u\end{split}\]where \(\hat{\sigma}^2_u=T^{-1}\sum_{t=2}^T \hat{u}_t^2\), \(\hat{\omega}^2_1\) is an estimate of the one-sided strict autocovariance, and \(\hat{\omega}^2\) is an estimate of the long-run variance of the process.
The \(\hat{P}_u\) variance-ratio statistic is defined as
\[\hat{P}_u = \frac{\hat{\omega}_{11\cdot2}}{\tilde{\sigma}^2_u}\]where \(\tilde{\sigma}^2_u=T^{-1}\sum_{t=1}^T \hat{u}_t^2\) and
\[\hat{\omega}_{11\cdot 2} = \hat{\omega}_{11} - \hat{\omega}'_{21} \hat{\Omega}_{22}^{-1} \hat{\omega}_{21}\]and
\[\begin{split}\hat{\Omega}=\left[\begin{array}{cc} \hat{\omega}_{11} & \hat{\omega}'_{21}\\ \hat{\omega}_{21} & \hat{\Omega}_{22} \end{array}\right]\end{split}\]is an estimate of the long-run covariance of \(\xi_t\), the residuals from an VAR(1) on \(z_t=[y_t,z_t]\) that includes and trends included in the test.
\[z_t = \Phi z_{t-1} + \xi_\tau\]The final test statistic is defined
\[\hat{P}_z = T \times \mathrm{tr}(\hat{\Omega} M_{zz}^{-1})\]where \(M_{zz} = \sum_{t=1}^T \tilde{z}'_t \tilde{z}_t\), \(\tilde{z}_t\) is the vector of data \(z_t=[y_t,x_t]\) detrended using any trend terms included in the test, \(\tilde{z}_t = z_t - d_t \hat{\kappa}\) and \(\hat{\Omega}\) is defined above.
The specification of the \(\hat{P}_z\) test statistic when trend is "n" differs from the expression in 1. We recenter \(z_t\) by subtracting the first observation, so that \(\tilde{z}_t = z_t - z_1\). This is needed to ensure that the initial value does not affect the distribution under the null. When the trend is anything other than "n", this set is not needed and the test statistics is identical whether the first observation is subtracted or not.
References