I have two policies Taylor rule A and B.

I want to follow Taylor rule A for certain periods time and then switch to rule B for the rest of time.

Is there anyone who can help! Thanks a million!

More information is needed. Do you want a determinstic switch or Markov-switching? Is the change anticipated or a surprise?

I want a deterministic switch at first.

Taylor rule A: i_t = alpha1*pi_t + beta1*y_t

Taylor rule B: i_t = alpha2*pi_t + beta2*y_t

I want to stick rule A for 10 periods and afterward, I want to follow rule B.

How Can I code this in Dynare?

If could be great if you can give some hint! Thank very much!

You define alpha and beta as exogenous variables, i.e. use varexo for them. Then you use the shocks command to set their values for simul. E.g.:

```
shocks;
var alpha;
periods 1:10 , 11:20;
values 2, 1.5;
end;
```

[quote=“jpfeifer”]You define alpha and beta as exogenous variables, i.e. use varexo for them. Then you use the shocks command to set their values for simul. E.g.:

```
shocks;
var alpha;
periods 1:10 , 11:20;
values 2, 1.5;
end;
```

[/quote]

Thanks very much, jpfeifer! You are so helpful! By the way, could you give me some ideas on how to do this for Markov-switching?

That is not easy. See e.g. ideas.repec.org/p/fip/fedkrw/rwp13-01.html. For easy linearized models there may be easier ways, but this is not my area of expertise.