Shock decomposition at higher order

A couple of notes for future reference. Doing a shock decomposition for models solved at higher order like third order runs into a couple of problems:

  1. There is the standard issue that there is no linear decomposition at higher order. You could in principle follow the approach of the variance decomposition and consider what happens with 1 or couple of shocks only and shutting the other shocks down. This brings us to the second issue.
  2. At first order, you can use the Kalman smoother to get estimates of the smoothed states and shocks. At higher order, that does not work. You could use a particle smoother, but that is usually not feasible for the whole model due to computational constraints. What people therefore usually do is estimate the exogenous shock processes separately. This is done in papers like Fernandez-Villaverde et al (2011) or Born/Pfeifer (2014). But that solves only part of the problem for two reasons. First, you also need the initial value of the unobserved states like capital, which are not estimated here. Now, you can get around this by simply starting at the steady state, the ergodic mean or the stochastic steady state. If the model does not exhibit too much persistence, the effect of the initial condition should vanish quite quickly. The second issue is more problematic: because you estimate the exogenous processes separately from the rest of the model, there is nothing that guarantees that the initial condition together with the estimated shocks add up to the observed data. That latter problem is why a true shock decomposition does not work without fully estimating the model at higher order. You end up rather with a bunch of counterfactuals.