FactorAugmentedSVAR#
- class cultivars.multivariate.structural.factor_augmented.FactorAugmentedSVAR(favar, structural=None, *, order=None)[source]#
Structural identification on a factor block, Bernanke-Boivin-Eliasz (2005).
Constructs with a fitted
FAVARresult; the closed system being identified is its factor VAR, and the model adds what no factor-space scheme can: the observation-equation map onto the panel. Two ways in, one result out. By defaultidentifyruns the paper’s own scheme – recursive, observed block last, so the policy shock moves no factor within the period. Alternatively, identify the factor VAR yourself with any point-identified model in this package and pass what it returns asstructural; the declaration then lives where you stated it, and this model only maps it.- Variables:
_source – The factor VAR being identified,
favar.factors._favar – The fitted factor-augmented reduced form.
_structural – The supplied factor-space identification, or
Nonefor the recursive route._order – The recursive ordering, or
Nonefor factors first and the observed block last.
See also
FactorAugmentedSVARResult– the recordidentify()returns.RecursiveSVAR– the default factor-space scheme.MarkovSwitchingSVAR– the same packaging pattern over regimes instead of a panel.
References
Bernanke, B. S., Boivin, J., & Eliasz, P. (2005). Measuring the effects of monetary policy: A factor-augmented vector autoregressive (FAVAR) approach. Quarterly Journal of Economics, 120(1), 387-422.
Example
>>> import numpy as np >>> from cultivars.multivariate.large_dim.factor_augmented import FAVAR >>> rng = np.random.default_rng(0) >>> factor = np.zeros(300) >>> for t in range(1, 300): ... factor[t] = 0.7 * factor[t - 1] + rng.standard_normal() >>> panel = np.outer(factor, rng.uniform(0.5, 1.5, 30)) >>> panel += 0.3 * rng.standard_normal((300, 30)) >>> policy = 0.4 * factor + rng.standard_normal(300) >>> res = FAVAR(panel, policy[:, None], n_factors=1, order=1).fit() >>> svar = FactorAugmentedSVAR(res).identify() >>> svar.impact.shape (30, 2)
The mapping route takes an identification of this fit’s own factor VAR and refuses one built from another:
>>> from cultivars.multivariate.structural.zero_restrictions import RecursiveSVAR >>> mine = RecursiveSVAR(res.factors).identify() >>> bool(np.allclose(FactorAugmentedSVAR(res, mine).identify().impact, svar.impact)) True >>> other = FAVAR(panel, policy[:, None], n_factors=1, order=2).fit() >>> FactorAugmentedSVAR(res, RecursiveSVAR(other.factors).identify()) Traceback (most recent call last): cultivars.exceptions.SpecificationError: the supplied identification was not built from ...
Attributes#
Methods#
|
Identify the factor system and bind the panel map to it. |