cultivars.multivariate.reduced_form.error_correction#
Vector error-correction models: the VAR in levels rewritten around its unit roots.
A VAR of order \(p\) in \(k\) integrated variables can be written without loss as
and the content of cointegration is the rank of \(\Pi\). Rank \(k\) is a stationary system better fitted in levels; rank zero is a VAR in differences with no long-run relations; rank \(r\) strictly between is the interesting case, \(\Pi = \alpha\beta'\) with \(\beta\) spanning \(r\) stationary combinations of non-stationary series, \(\alpha\) the speed at which each variable corrects them, and \(k - r\) common stochastic trends driving everything else. Johansen’s reduced-rank maximum likelihood estimates the pair by concentrating out the short-run terms and solving an eigenvalue problem for \(\beta\); the sequence of trace and maximum-eigenvalue tests chooses \(r\) from the same eigenvalues. The conditional variant of Pesaran, Shin and Smith models only a block \(y\) of the system given weakly exogenous integrated regressors \(x\) that share the cointegrating space but receive no equations of their own.
Two commitments shape the surface. First, the results hold two coordinate
systems and are explicit about which member reads which. Inference –
params, bse, pvalues, conf_int, the weak-exogeneity and
Granger tests – reads the short-run regression that was actually run,
conditional on \(\beta\), which converges at rate \(T\) and so can
be treated as known; propagation – impulse responses, variance and
historical decompositions, forecasts – reads the levels representation
\(A_1 = I + \Pi + \Gamma_1, \; A_i = \Gamma_i - \Gamma_{i-1}, \; A_p =
-\Gamma_{p-1}\) the fit implies, so a VECM has no separate impulse-response
theory, only different coordinates, and the stability check permits exactly
the unit roots the rank specifies. Only the cointegrating space is
identified, so beta is printed on a readable normalization and carries
no standard errors, and the rank is chosen on the model by rank_test()
rather than on the result by a likelihood ratio, whose distribution under a
rank restriction is not chi-squared. Second, the conditional model refuses
what it does not have. A VECMXResult keeps every short-run member
and the conditional forecast, which needs only a path for \(x\), and
raises on the companion matrix, the stability check and every propagation
member, because a law of motion for \(x\) was never written; what it
does offer is VECMXResult.to_varx(), its own equations in levels,
which is the currency a global system links.
Layout. VECM and VECMX validate on
_VectorErrorCorrectionModel and its exogenous extension in
_internals, which hold the Johansen case, the rank and the optional
exogenous block, map the case onto the unrestricted trend the short-run
regression sees through _UNRESTRICTED_TREND in _core, run the
reduced-rank estimation in _fit_family – concentration, eigenvalue
problem, then one multivariate regression on [deterministic | lagged
differences | error-correction terms] that reproduces Johansen’s
\(\alpha\) exactly by Frisch-Waugh-Lovell – and expose rank_test()
with simulated critical values for the closed and conditional nulls.
VECMResult extends _ErrorCorrectionResult with the summary,
comparison, inference and propagation mixins, maps the Johansen case to the
levels trend through _LEVELS_TREND, and overrides the coefficient
stack, the stability check, the forecast and the two tests;
VECMXResult adds the exogenous block and the refusals, worded by
_CONDITIONAL_REFUSAL in _core, and packs its levels form into a
_ConditionalLevels record for
closed_global. The levels
system a VECM reparameterizes is
vector_autoregression; the
rank test’s public record is
JohansenRankTest, and the
unit-root tests that establish integration beforehand are in
unit_roots.
References
Johansen, S. (1991). Estimation and hypothesis testing of cointegration vectors in Gaussian vector autoregressive models. Econometrica, 59(6), 1551-1580.
Johansen, S. (1995). Likelihood-Based Inference in Cointegrated Vector Autoregressive Models. Oxford University Press.
Pesaran, M. H., Shin, Y., & Smith, R. J. (2000). Structural analysis of vector error correction models with exogenous I(1) variables. Journal of Econometrics, 97(2), 293-343.
Harbo, I., Johansen, S., Nielsen, B., & Rahbek, A. (1998). Asymptotic inference on cointegrating rank in partial systems. Journal of Business & Economic Statistics, 16(4), 388-399.
Lütkepohl, H. (2005). New Introduction to Multiple Time Series Analysis. Springer. Chapters 6-8.
Example
Three integrated series, two of them tied to the first. The rank test reads two relations off the eigenvalues, the fit at that rank leaves one common trend, the first series does not adjust to either relation, and the levels companion carries exactly the unit root the rank specifies:
>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> trend = np.cumsum(rng.standard_normal(400))
>>> y = np.column_stack([
... trend,
... trend + rng.standard_normal(400),
... 0.5 * trend + rng.standard_normal(400),
... ])
>>> model = VECM(y, order=2, rank=1)
>>> rank = model.rank_test(simulations=2000).selected_rank()
>>> rank
2
>>> res = VECM(y, order=2, rank=rank).fit()
>>> res.n_common_trends, res.stability_check().n_unit_roots
(1, 1)
>>> bool(res.weak_exogeneity("y1").pvalue > 0.05)
True
>>> res.normalized_beta().round(1)[0]
array([1., 1.])
Classes#
Vector error-correction model, estimated by Johansen's reduced-rank ML. |
|
Conditional vector error-correction model with weakly exogenous I(1) regressors. |
|
A fitted vector error-correction model. |
|
A fitted conditional vector error-correction model. |