I have two questions: attached you find a file with a simple standard rbc model which is adjusted a bit to try a quick expected fiscal policy intervention scenario in a late period. One is expected from the beginning on, the other is expected later. I use the new Dynare version which provides also perfect foresight solver with expectation errors.

Is there some more detailed information available on how the perfect foresight solver with expectation errors is working than in the Dynare manual? It’s a cool feature and I would like to know more about this.

I see, there are only the impulse responses of the first simulation run saved in this new version, I do not understand why, without expectation errors it seems to work. Has anyone a little hint what’s the mistake in my code?

I would be very thankful for an answer.
Best regards
4LX rbc_experr.mod (3.2 KB)

The command essentially constructs a sequence of MIT shocks. It uses the first set of specified shocks to compute a simulation conditional on the initial condition, the expected terminal condition, and the known, anticipated shocks. Then, when the next set of surprise shocks is happening (say in period 9 due to learnt_in = 9), the previous simulation output for period 8 is used as the initial condition in that period 9 when agents can react. That allows to construct a full simulation with both anticipated and surprise shocks.

That is also the reason why you only get output for one simulation.

Unfortunately, I do not understand, why the simulation results of the expectation errors simulation are not saved (I mean the whole simulation, not the part simulation with different initial condition). If it is done after the simulation run with perfect foresight setup & solver, then there should be the respective variables overwritten with the simulation output of the perfect foresight with expectation errors solver (see the loop in the last part of the file). At least, that is the case if I take two simulations with perfect foresight setup & solver.