class arch.unitroot.cointegration.DynamicOLS(y: ndarray | Series, x: ndarray | DataFrame, trend: 'n' | 'c' | 'ct' | 'ctt' = 'c', lags: int | None = None, leads: int | None = None, common: bool = False, max_lag: int | None = None, max_lead: int | None = None, method: 'aic' | 'bic' | 'hqic' = 'bic')[source]

Dynamic OLS (DOLS) cointegrating vector estimation

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

lags: int | None = None

The number of lags to include in the model. If None, the optimal number of lags is chosen using method.

leads: int | None = None

The number of leads to include in the model. If None, the optimal number of leads is chosen using method.

common: bool = False

Flag indicating that lags and leads should be restricted to the same value. When common is None, lags must equal leads and max_lag must equal max_lead.

max_lag: int | None = None

The maximum lag to consider. See Notes for value used when None.

max_lead: int | None = None

The maximum lead to consider. See Notes for value used when None.

method: 'aic' | 'bic' | 'hqic' = 'bic'

The method used to select lag length when lags or leads is None.

  • ”aic” - Akaike Information Criterion

  • ”hqic” - Hannan-Quinn Information Criterion

  • ”bic” - Schwartz/Bayesian Information Criterion


The cointegrating vector is estimated from the regression

\[Y_t = D_t \delta + X_t \beta + \Delta X_{t} \gamma + \sum_{i=1}^p \Delta X_{t-i} \kappa_i + \sum _{j=1}^q \Delta X_{t+j} \lambda_j + \epsilon_t\]

where p is the lag length and q is the lead length. \(D_t\) is a vector containing the deterministic terms, if any. All specifications include the contemporaneous difference \(\Delta X_{t}\).

When lag lengths are not provided, the optimal lag length is chosen to minimize an Information Criterion of the form

\[\ln\left(\hat{\sigma}^2\right) + k\frac{c}{T}\]

where c is 2 for Akaike, \(2\ln\ln T\) for Hannan-Quinn and \(\ln T\) for Schwartz/Bayesian.

See [1] and [2] for further details.



fit([cov_type, kernel, bandwidth, ...])

Estimate the Dynamic OLS regression