RecursiveSVAR#

class cultivars.multivariate.structural.zero_restrictions.RecursiveSVAR(result, *, order=None)[source]#

Recursive identification: a declared causal ordering, Sims (1980).

The impact matrix is the Cholesky factor of the innovation covariance in the declared ordering: the first variable responds to no shock but its own on impact, the second to the first and its own, and so on down the triangle. This is the same arithmetic the reduced-form irf performs with orthogonalized=True – the difference, and the reason this model exists, is that here the ordering is an argument someone chose rather than an accident of column order.

Parameters:
  • result (ClosedSystemResult) – The fitted closed reduced-form result to identify.

  • order (Sequence[str] | None) – The causal ordering, most exogenous first. None declares the ordering to be the variables as they stand.

Raises:

SpecificationError – If the result is not a closed system, or the ordering is not a permutation of its variable names.

Example

>>> rng = np.random.default_rng(0)
>>> from cultivars.multivariate.reduced_form.vector_autoregression import VAR
>>> y = np.diff(rng.standard_normal((121, 2)).cumsum(axis=0) * 0.1, axis=0)
>>> svar = RecursiveSVAR(VAR(y, order=1).fit()).identify()
>>> svar.impact.shape
(2, 2)

Attributes#

k_endog

Number of variables in the source system.

names

Variable labels of the source system.

ordering

The declared causal ordering.

source

The fitted reduced-form result being identified.

Methods#

identify()

Factor the innovation covariance in the declared ordering.