arch.unitroot.cointegration.CanonicalCointegratingReg

class arch.unitroot.cointegration.CanonicalCointegratingReg(y: ndarray | Series, x: ndarray | DataFrame, trend: 'n' | 'c' | 'ct' | 'ctt' = 'c', x_trend: 'n' | 'c' | 'ct' | 'ctt' | None = None)[source]

Canonical Cointegrating Regression cointegrating vector estimation.

Parameters:
y: ndarray | Series

The left-hand-side variable in the cointegrating regression.

x: ndarray | DataFrame

The right-hand-side variables in the cointegrating regression.

trend: 'n' | 'c' | 'ct' | 'ctt' = '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

x_trend: 'n' | 'c' | 'ct' | 'ctt' | None = None

Trends that affects affect the x-data but do not appear in the cointegrating regression. x_trend must be at least as large as trend, so that if trend is “ct”, x_trend must be either “ct” or “ctt”.

Notes

The cointegrating vector is estimated from the regressions

\[\begin{split}Y_t & = D_{1t} \delta + X_t \beta + \eta_{1t} \\ X_t & = D_{1t} \Gamma_1 + D_{2t}\Gamma_2 + \epsilon_{2t} \\ \eta_{2t} & = \Delta \epsilon_{2t}\end{split}\]

or if estimated in differences, the last two lines are

\[\Delta X_t = \Delta D_{1t} \Gamma_1 + \Delta D_{2t} \Gamma_2 + \eta_{2t}\]

Define the vector of residuals as \(\eta = (\eta_{1t},\eta'_{2t})'\), and the long-run covariance

\[\Omega = \sum_{h=-\infty}^{\infty} E[\eta_t\eta_{t-h}']\]

and the one-sided long-run covariance matrix

\[\Lambda_0 = \sum_{h=0}^\infty E[\eta_t\eta_{t-h}']\]

The covariance matrices are partitioned into a block form

\[\begin{split}\Omega = \left[\begin{array}{cc} \omega_{11} & \omega_{12} \\ \omega'_{12} & \Omega_{22} \end{array} \right]\end{split}\]

The cointegrating vector is then estimated using modified data

\[\begin{split}X^\star_t & = X_t - \hat{\Lambda}_2'\hat{\Sigma}^{-1}\hat{\eta}_t \\ Y^\star_t & = Y_t - (\hat{\Sigma}^{-1} \hat{\Lambda}_2 \hat{\beta} + \hat{\kappa})' \hat{\eta}_t\end{split}\]

where \(\hat{\kappa} = (0,\hat{\Omega}_{22}^{-1}\hat{\Omega}'_{12})\) and the regression

\[Y^\star_t = D_{1t} \delta + X^\star_t \beta + \eta^\star_{1t}\]

See [1] for further details.

References

Methods

fit([kernel, bandwidth, force_int, diff, ...])

Estimate the cointegrating vector.