I’m trying to run an exercise with unexpected shocks. The shock is “eb”. I want to compare two scenarios. Scenario 1 where agents know in advance that the shock will take the value -0.01 from period 11 to 15 and then -0.075.

Then scenario 2, they think at period 1 that the shock will always be -0.01 and then they learn at period 15 that it will be -0.075 from now on. Attached here the lines for both scenarios. My problem is that when I compare the plots, I lose the first 10 or so observations in scenario 2, the variables don’t start from SS as in scenario 1. I’m using the constant_simulation_length option.

SCENARIO 1

steady;

shocks(learnt_in=1);
var eb;
periods 11:15 16:750;
values -0.01 -0.075;
end;

To give you some context: in period 1, a negative TFP shock hit the economy and the CB engages in QE. After that unwinding starts: from 11 on. In the first scenatio the QT strategy is announced while in the second one, agents learn at a later period (15) that a more aggresive unwinding will take place. The thing is that in the second one, the economy does not start at the SS, I lose some initial periods. Forum.zip (1.5 MB)

When I text the first scenario, to compute the second one, I activate the endval one for bcb=0.2.

The initval is always the SS called at the beginning.

I even simplified the setting: Scenario 2 is

shocks(learnt_in=1);
var eb;
periods 1:10 11:750;
values 0.5 -0.00001;
end;

shocks(learnt_in=15);
var eb;
periods 16:750;
values -0.075;
end;

while the original one is

shocks(learnt_in=1);
var eb;
periods 1:10 11:15 16:750;
values 0.5 -0.000001 -0.075;
end;

The first one works as expected. But for the second one, It “kills” the first ten periods or similar, no variable start at SS. Could there be a bug in the learnt_at command?

I got it now. It exactly kill the first 15 periods, that is when shocks(learnt_in=15) period is. To make the sequences comparable, I am interested in the changes along all the path. Is there a way to compare both scenarios?

Thanks for the answer. But I still have the same issue. I check the bcb (the shockes variable) series and the first entry is lik 15 periods after the SS. (In scenario 2, in 1 it works well. The code after the end of the model is:

end;

initval;
eb=0;
end;

steady;

shocks(learnt_in=1);
var eA;
periods 1:10;
values -2.5 ;
end;

shocks(learnt_in=1);
var eb;
periods 1:10 11:750 ;
values 0.5 -0.00001;
end;

shocks(learnt_in=15);
var eb;
periods 16:750;
values -0.075;
end;

By default, every time the information set changes, the simulation with the new information set is shorter than the previous one (because the terminal date is getting closer). When this option is set, every new simulation has the same length (as specified by the periods option of [perfect_foresight_with_expectation_errors_setup](https://www.dynare.org/manual-unstable/the-model-file.html#perfect_foresight_with_expectation_errors_setup); as a consequence, the simulated paths as stored in oo_.endo_simul` will be longer when this option is set (if s is the last period in which the information set is modified, then they will contain s+periods-1 periods, excluding initial and terminal conditions).

The problem is that I give the program some values learnt at 1 and then some values learnt at 15. And it cuts the first 15 periods. I wanted to have the whole simulation.