Anticipated shocks

Dear all,

I am trying to write in Dynare a model in which I could study the anticipated shocks. I have succeeded doing it in REDS&SOLDS but Dynare gives me an error message by saying that : the matrix is singular and so on…the variables cannot be determined uniquely.
Here it is a simple example (which works in REDS&SOLDS):

y = y(+1)-sigmar+sigmapi(+1);
r = royy+ropipi+ror(-1)+er;
pi = k

z1 and z2 stand for the lead and lagged natural output (yn(+1), yn(-1)). EXPS is the anticipated productivity shock which will occur in two periods time.
So the predetermined variables in my setting are: z1, z2 and also r(-1).
I will be grateful for any suggestion.


Please, can you write the maths with explicit expectation operators. I don’t understand what you want to do.




My objective is to analyze the anticipated shocks, e.g. a productivity shocks that occurs in two periods time from now and is known for the agents.
The simplest possible model that I consider includes:

  • IS equation:


-Phillips curve:


-Monetary policy rule


y - output
yn - natural level of output
pi - inflation
r - nominal interest rate
Et-stands for expectation symbol.

Now I define the anticipated productivity shocks as the shock to ‘natural’ level of output which will occur at period (t+2).
I define the process for ‘natural’ level of output (it is like AR(1) but also includes the expectations concerning the natural level of output):




e_yn(t) - unanticipated productivity shock
ea_yn(t) - anticipated productivity shock
Et(yne(t+1)) - expectations at time t about natural level of output at (t+1)
(it is a predetermined variable)
Et(yne(t+2)) - expectations at time t about natural level of output at (t+2)
(it is also predeterminate variable).

This is the way I introduce the equations into the REDS&SOLDS framework. The variables considered were:
y(t), pi(t), r(t), yn(t), yne(t+1), yne(t+2), r(t-1), yn(t-1) (where the last 4 variables are predeterminate - one has to add to complete the system in the REDS&SOLDS framework: Et(r(t-1+1)=r(t), Et(yn(t-1+1)=yn(t)).

So observing impulse response of the anticipated productivity shock (ea_yn(t)) what we see is that natural level of output changes only at period (t+2).

I tried to input this model into Dynare but it states that the model does not solve the variables uniquely…

I hope that this exposition is clearer. (if not I can also add the corresponding codes)


I’m attaching mod1.mod that does what you want I believe.

Note that you could simplify your model as
Et(yne(t=1)) is simply ea_yn(t-1)

But I’m not sure to understand the economics behind it

Best wishes

mod1.mod (716 Bytes)


Thanks a lot. The code that you posted exactly reproduces my code in REDS&SOLDS.
My main interest are the effects of anticipated fiscal shocks (and this was rather treated as an exercise): so announcement of a tax change which takes place in some specific future and how this affects the other variables.
Once again thanks.