arch.unitroot.cointegration.FullyModifiedOLS

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

Fully Modified OLS 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

\[Y^\star_t = Y_t - \hat{\omega}_{12}\hat{\Omega}_{22}\hat{\eta}_{2t}\]

as

\[\begin{split}\hat{\theta} = \left[\begin{array}{c}\hat{\gamma}_1 \\ \hat{\beta} \end{array}\right] = \left(\sum_{t=2}^T Z_tZ'_t\right)^{-1} \left(\sum_{t=2}^t Z_t Y^\star_t - T \left[\begin{array}{c} 0 \\ \lambda^{\star\prime}_{12} \end{array}\right]\right)\end{split}\]

where the bias term is defined

\[\lambda^\star_{12} = \hat{\lambda}_{12} - \hat{\omega}_{12}\hat{\Omega}_{22}\hat{\omega}_{21}\]

See [1] for further details.

References

Methods

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

Estimate the cointegrating vector.