Incorporating Capital into NK Model

Hi, I would like to add endogenous capital accumulation into Mr. Pfeifer’s Gali Chapter 3 Nonlinear model. (Link:
I followed Sim’s note on medium scale NK and seemed to have solved out the model ‘correctly’.
However, if I run the model, then the result seems to be very counter-intuitive: the output seems to increase after the preference shock!
There must be some problem in the code / derivation, but I wasted days without spotting any. Can someone help me spotting the problem? Thank you so much in advance!

NK_Capital.mod (3.7 KB)

Is there anyone who can lend me a help!! Sorry for bumping the thread!

Are you sure your preference shock timing is correct? In your model, beta only appears at time t. In, there is a Z(+1) in some instances.

Instead of using beta as shock directly, I used the shock as your code with d and the graph looks much nicer now! Thank you for the reply :slight_smile: