My objective is actually to feed in the shocks and get the impulse responses of key variables like GDP and inflation. Then I’ll compare them to the actual data to see if my model is a fair representation of past economic shocks.
How can I feed in the shocks from an m-file and simulate the impulse responses?
Do you mean this portion of your code:
// set shocks for pure news
shock_matrix(1,strmatch(‘eps_z_news’,M_.exo_names,‘exact’)) = 1; %set news shock to 1 (use any shock size you want)
shock_matrix(1+8,strmatch(‘eps_z_surprise’,M_.exo_names,‘exact’)) = -1; %8 periods later use counteracting shock of -1