Filter shocks from actual data

Hi,

I am performing a welfare analysis by using a second-order approximation of the equilibrium conditions and calculating the consumption equivalent values from the stochastic steady states. The stdev and persistence of the shocks in the model are calibrated to match some second moments from actual data (stdev, correlations, etc.).

By doing so, however, the IRFs are unlikely to match the data. Is there a way to filter the shocks directly from actual data, and conduct the welfare analysis under the path of the filtered shocks?

Many thanks

Hi,

What do you mean by “The IRFs are unlikely to match the data”? Instead of calibrating the model by matching second-order moments, you could use a method of moments matching a set of IRFs to estimate the parameters. Estimation aside, you can always infer the shocks using a Kalman smmother (see the calib_smoother command in the reference manual), but I fail to see how this could help with respect to welfare analysis…

Best,
Stéphane

Many thanks for your help Stéphane.

Since I am looking at the pandemic period, by “The IRFs are unlikely to match the data” I meant that if I plotted the IRFs to a pandemic shock calibrated with moments matching, the decline in variables such as aggregate consumption or hours would not match the decline we can find in the data for Q2 2020, for example.

IRFs matching is definitely a good idea, but I guess I would need a much longer sample than the pandemic to estimate a VAR model. When I performed moment matching, instead, although I used a long sample to filter the data, I then zoomed in on the two years in which I was interested to calculate the stdev and correlations.

Does it make sense?

Best,
Manuel

I don’t think it makes much sense to compare sample second order moments calculated over a very limited number of periods with theoretical second order moments which are asymptotic. These moments are different things in nature. As the fluctuations were much larger during this period, this would have a serious impact on the estimation of the parameters and your welfare evaluation.

I don’t really understand your issue about matching the decline (drop) of consumption or hours. Cannot you simply consider a larger shock? I have the impression that we don’t have an interface to do that with Dynare… By default the shocks are one std, but you would need to increase the size of the shock without changing the standard deviation of the shock. You can do that by rescaling the fourth argument of the irf routine called in stoch_simul (line 243 for a second order approximation).

Best,
Stéphane

Let me add that you can use the simult_ function for user-define scenarios like large shocks. See the thread at

Many thanks to both of you.

Best,
Manuel