GVARResult.historical_decomposition#
- GVARResult.historical_decomposition()[source]#
Attribute each observation to the shocks that produced it.
- Return type:
- Returns:
An array of shape
(nobs, k, k)whose entry[t, i, j]is shock \(j\)’s cumulative contribution to variable \(i\) at time \(t\). Summing over \(j\) recovers the stochastic component of the path, not the observed series: the deterministic terms and the influence of pre-sample initial conditions are excluded by construction, since neither is attributable to any shock. Add the deterministic path back before comparing againstendog.
Note
Costs \(O(\mathrm{nobs}^2)\) moving-average terms, because the contribution at \(t\) sums over every shock up to \(t\). Fine for macro samples; noticeable past a few thousand observations.