Pegging the interest rate - perfect foresight simulation

Hi all,

In a perfect foresight setup, I am trying to simulate a model where the CB implements QE while keeping the policy rate constant for X periods, i.e. pegging the interest rate to its steady state value for X periods, and then let it freely move according to a Taylor rule.

The problem is I don’t know how to implement such an experiment. Any intuition/suggestions would be highly appreciated.

Thanks

may be a starting point.