Hi Prof. Pfeifer and everyone,

I am trying to write a code to back out the structural shocks by myself. Any papers or sources I can to learn the methods to compute the smoothed shocks/variables from the data like in Dynare? I also want to learn how to do the variance decomposition. Any comments are appreciated. Thanks!

To give more information. I have a very non-linear DSGE model with heterogeneous agents. I have two exogenous shocks following AR(1). The problem is large. I have done the calibration by moment matching. I didn’t plan to do Bayesian estimation because it takes too much time for my model. With all the parameters, including the parameters of my shock processes, I’ve solved my problem using value function iteration. I also finished the code to simulate the model.

Now, I want to use data series to back out the seires of two shocks and conduct variance decomposition. I guess I also need to use the particle filter somewhere because of the non-linearity. But any recommendation to help me to understand the basic method is very welcome. Thank you in advance!