A problem with the pulse diagram

Greetings to all professors and researchers
I’m having a problem doing pulse images, and the images are very strange. I tried to modify the parameters, but the result seems to be not good, may I ask what the problem should be?
Please kindly advise
dsge.mod (3.5 KB)

Looking at your codes, it seems your timing for ke and ke is wrong.

The timing of ke should be “ke = delta*inve+(1-delta)*ke(-1)”?

Most probably yes. I don’t know your model.