I have a SOE model of Gali-Monacelli (2005) type, but with non-stationary technology. So, macro aggregates are detrended by technology. To generate the 2nd moments of the model, I shock the growth rate of technology, which is stationary. However, I get negative correlation between private consumption and output.
I would appreciate if anyone can comment on this and provide some suggestions.
In the code model is nonlinear; aggregate variables are detrended by dividing technology already (as mentioned in my question, technology is non-stationary); I create a new variable of technology growth, which is stationary, and shock the growth rate of technology (AR(1)) to generate the 2nd moments of the model variables.
In short, in the code variables are stationary and the model is nonlinear.
That does not really answer my question. The growth rate of consumption in your model will be the growth rate of the detrended, stationary consumption variables plus the growth rate of the technology trend. Did you look at this sum for the comparison or just the detrended variables?
I just compare the detrended variables, like C and Y with their corresponding data.
In the model, C is stationary (detrended), which is consistent with the C in the data, also stationary (detrended). Both Cs are not in growth rate. I guess the problem is that I shock the growth rate of technology, not (a stationary) technology itself? As I mentioned previously, technology is nonstationary.
You decomposed the trending variable Y_t into a stationary component \tilde Y_t and a trend X_t so that Y_t=\tilde Y_tX_t. That means in the model the growth rate of the trending object Y_t observed in the data is \Delta \log X_t=\Delta \log \tilde Y_t +\Delta \log X_t
All objects in that equation are stationary, can be computed in the model, and compared to the growth rates in the data.