SetIdentifiedSVARResult#

class cultivars.multivariate.structural.set_identification.SetIdentifiedSVARResult(*, source, shock, restriction, horizons, _factor, _basis, _inequalities, _projectors)[source]#

The exact bounds of a set-identified shock’s response surface.

Restrictions on one shock confine its rotation column \(q\) to the unit sphere cut by a polyhedral cone,

\[\mathcal{Q} = \{\, q : \lVert q \rVert = 1,\; Z q = 0,\; S q \ge 0 \,\},\]

where the rows of \(Z\) are the zero-restricted responses and the rows of \(S\) the sign-restricted ones, each written as the row of \(\Psi_h L\) for the lead \(h\) it binds at. Every response to the shock, \(e_i' \Psi_h L q\), is linear in \(q\), so its smallest and largest values over \(\mathcal{Q}\) are attained on faces of the region and can be enumerated exactly. The record holds that geometry – the whitening factor \(L\), an orthonormal basis of the null space of \(Z\), the sign rows projected onto it, and the precomputed face projectors – so that bounds at any horizon are a cheap query rather than a fresh enumeration. Every number it reports is an endpoint of the set, pointwise per response and horizon.

Note

Two caveats keep the endpoints honest, and the summary carries both. The bounds depend on no prior over rotations, which is what separates them from the quantile bands of SignRestrictedSVARResult; and they are pointwise, so the box they outline across horizons is not the set of admissible paths – no single rotation traces an edge of it. They are computed at the reduced-form point estimate.

Variables:
  • source – The reduced-form result the set was computed from.

  • shock – Label of the restricted shock.

  • restriction – The declared restrictions, stated as a sentence.

  • horizons – Leads at which the declared signs bind.

See also

References

Giacomini, R., & Kitagawa, T. (2021). Robust Bayesian inference for set-identified models. Econometrica, 89(4), 1519-1556.

Gafarov, B., Meier, M., & Montiel Olea, J. L. (2018). Delta-method inference for a class of set-identified SVARs. Journal of Econometrics, 203(2), 316-327.

Example

Two variables, both restricted to rise on impact. With only sign restrictions in two dimensions the lower bounds are zero – the column can lie on either edge of the cone – and each upper bound is the variable’s own innovation standard deviation, the largest response any unit column can produce:

>>> import numpy as np
>>> from cultivars.multivariate.reduced_form.vector_autoregression import VAR
>>> rng = np.random.default_rng(0)
>>> B = np.array([[1.0, 0.5], [0.3, 1.0]])
>>> A = np.array([[0.5, 0.1], [0.0, 0.4]])
>>> eps = rng.standard_normal((402, 2))
>>> y = np.zeros((402, 2))
>>> for t in range(1, 402):
...     y[t] = A @ y[t - 1] + B @ eps[t]
>>> res = VAR(y, order=1, names=("gdp", "infl")).fit()
>>> sset = SetIdentifiedSVAR(res, {"gdp": "+", "infl": "+"}, shock="demand").identify()
>>> sset.shock, sset.horizons, sset.names, sset.k_endog
('demand', (0,), ('gdp', 'infl'), 2)
>>> sset.impact_bounds.round(3).tolist()
[[0.0, 1.123], [0.0, 1.042]]
>>> bool(np.allclose(sset.impact_bounds[:, 1], np.sqrt(np.diag(res.sigma_u))))
True
>>> b = sset.impact_bounds
>>> bool(np.all((b[:, 0] <= B[:, 0]) & (B[:, 0] <= b[:, 1])))
True

Attributes#

source

The closed reduced-form result the set was computed from.

shock

Label of the restricted shock.

restriction

The declared signs, horizons and zeros, stated as a sentence.

horizons

Leads at which the declared signs bind.

impact_bounds

Exact (k, 2) lower and upper impact responses to the shock.

k_endog

Number of variables.

names

Variable labels, from the reduced form.

Methods#

irf([horizon, cumulative])

Exact pointwise response bounds to the restricted shock.

summary()

The estimation summary, renderable as text, HTML, or a dataframe.