cultivars.multivariate.reduced_form.closed_global#
The global VAR: conditional units closed into one system by a weight matrix.
A global VAR is the answer to a counting problem. A panel of \(N\) units with \(k_i\) variables each has \(k = \sum_i k_i\) variables, and an unrestricted VAR on all of them has \(p k^2\) autoregressive coefficients that no sample of macro data can estimate. The GVAR (Pesaran, Schuermann and Weiner, 2004) spends those degrees of freedom differently: each unit is a small conditional model of its own variables given a weighted average of the others’,
estimated unit by unit, and the restriction that the rest of the world enters only through \(y^*_{it}\) is what makes the counting work. Each unit alone is open – it has no equation for the foreign aggregate it conditions on – but substituting \(z_{it} = (y_{it}', y^{*\prime}_{it})' = W_i x_t\) and stacking the units gives the square system \(G_0 x_t = d_t + \sum_l G_l x_{t-l} + u_t\), and inverting \(G_0\) closes it: every variable in the panel now has a law of motion, so the global system can be propagated, decomposed and forecast like any VAR.
Two commitments shape the surface. First, the closing step is algebra, not
estimation, and the objects say so. GVAR exposes solve()
rather than fit, and GVARResult stands beside the estimated
results rather than descending from them: it has no design matrix,
likelihood, parameter count or coefficient table, because an assembled
system has none, and it refuses to carry hollow versions. What it does
carry is the full propagation surface – moving-average representation,
impulse responses, variance decompositions, forecasts – and the
closed-system contract, so a global system feeds straight into
Spillover for
connectedness across units. Second, the condition the construction rests
on is tested, not assumed. Least squares on a unit equation is consistent
only if the foreign aggregate is weakly exogenous for that unit’s
parameters, and that is a property of the data: a dominant unit whose
partners adjust toward it fails it, by design, and should be modelled
with a reduced foreign set. GVARResult.weak_exogeneity_test() runs
the Johansen-style auxiliary regression for an error-correction unit,
GVARResult.exogeneity_table() runs it for every unit that supports
it, and the summary names any unit that fails. The other diagnostic the
result keeps is GVARResult.linkage_condition, the condition number
of \(G_0\), because a weight matrix that gives two units nearly the
same foreign aggregate makes the closing solve ill-posed without making it
fail.
Layout. The units are ordinary conditional results from this package:
VARX
in levels or
VECMX in
error-correction form, each fitted against the aggregate its own row of
the weight matrix defines. GVAR validates the weight matrix
through validate_weights in _core – zero diagonal, non-negative
entries, unit row sums – maps global columns to units and shared
variable labels, and in solve() reads every unit through its
to_varx() levels form into solve_global in _internals, which
builds the link matrices with link_matrix from _core, stacks and
inverts \(G_0\), and returns the solved coefficient stack. The unit
residuals are aligned on the common sample, rotated through
\(G_0^{-1}\), and packed with the panel into GVARResult,
which takes its summary from _SummaryMixin and its propagation surface
from _VectorPropagationMixin. The estimated closed systems the global
one stands beside are vector_autoregression
and error_correction; the
shrinkage route to the same counting problem is
large_dim.
References
Pesaran, M. H., Schuermann, T., & Weiner, S. M. (2004). Modeling regional interdependencies using a global error-correcting macroeconometric model. Journal of Business & Economic Statistics, 22(2), 129-162.
Dees, S., di Mauro, F., Pesaran, M. H., & Smith, L. V. (2007). Exploring the international linkages of the euro area: A global VAR analysis. Journal of Applied Econometrics, 22(1), 1-38.
Chudik, A., & Pesaran, M. H. (2016). Theory and practice of GVAR modelling. Journal of Economic Surveys, 30(1), 165-197.
Johansen, S. (1992). Cointegration in partial systems and the efficiency of single-equation analysis. Journal of Econometrics, 52(3), 389-402.
Example
A dominant unit and two satellites that error-correct toward it, each fitted as a conditional error-correction model against its own trade-weighted aggregate and closed into one system. The satellites pass the weak-exogeneity test and the dominant unit fails it, which is the right reading: its partners adjust to it, not the other way round. Fed to the spillover machinery, the closed system names the dominant unit as the only net transmitter:
>>> import numpy as np
>>> from cultivars.multivariate.reduced_form.error_correction import VECMX
>>> from cultivars.multivariate.large_dim.spillover import Spillover
>>> rng = np.random.default_rng(0)
>>> us = np.cumsum(rng.standard_normal(400))
>>> eu, jp = np.zeros(400), np.zeros(400)
>>> for t in range(1, 400):
... eu[t] = eu[t - 1] + 0.3 * (us[t - 1] - eu[t - 1]) + 0.6 * rng.standard_normal()
... jp[t] = jp[t - 1] + 0.2 * (us[t - 1] - jp[t - 1]) + 0.6 * rng.standard_normal()
>>> panel = np.column_stack([us, eu, jp])
>>> weights = np.array([[0.0, 0.5, 0.5], [0.7, 0.0, 0.3], [0.7, 0.3, 0.0]])
>>> units = [
... VECMX(panel[:, [i]], (panel @ weights[i])[:, None], order=1, rank=1).fit()
... for i in range(3)
... ]
>>> names = ("us", "eu", "jp")
>>> res = GVAR(units, weights, variable_labels=["p"] * 3, unit_names=names).solve()
>>> res.names, res.is_stable
(('us.p', 'eu.p', 'jp.p'), True)
>>> [(row[0], row[-1]) for row in res.exogeneity_table().rows]
[('us', 'REJECT'), ('eu', ''), ('jp', '')]
>>> network = Spillover(res, horizon=10).compute()
>>> network.transmitters(), bool(network.net[0] > 100.0)
(('us.p',), True)
Classes#
Link fitted conditional units into one closed global system. |
|
A closed global system assembled from conditional units. |