Regime switching based on volatility

Dear Johannes,

Thank you so much for all your help. Highly appreciated. Unfortunately, I still cannot produce the results I want. Couple of issues:

  1. In your code (https://sites.google.com/site/pfeiferecon/RBC_state_dependent_GIRF.mod?attredirects=0), you define shocks_baseline and shocks_impulse. What is the purpose of the shocks_baseline? If I just want to calculate the GIRFs of output to a government expenditure shock, do I need to have in the IRF_mat only (y_shock) or the difference (y_shock-y_baseline)?

  2. Following your suggestions and if my understanding is correct, I specified the size of the government shock in the part where I calculate the GIRFs (setting it equal to 1). Then, when I change the value of the variance of the volatility shock in the shock block (i.e. the shock distribution), the simulated series are almost the same regardless if the value of the volatility shock is high or low. The simulated series can be accessed in the matlab folder GIRF_positive (I am following the names of your original code). Is that correct? If so, I don’t know what I am doing wrong to be getting the same simulations regardless of the shock distribution I specify. I am attaching my code.

Thank you in advance!

king_rebelo3.mod (8.1 KB)