News Shocks and Optimal Simple Rules


#1

Hello,
I want to replicate the paper “news shocks and optimal simple rules” - 2010 ( Wohltmann & Winkler).

My problem is the loss function, which is
Loss = Var(πt − γπt−1) + αx Var(xt − δxt−1) (Page 9 Eq. 23)
The loss function contains lags. Dynare doesnt accept lags and leads and gives me always an error. I usually used a loss function of the form: 1/2*(pi^2+lambda*x^2)

Can u help me to solve this problem? How can I transform the loss function?

Thanks in advance

[https://www.econstor.eu/bitstream/10419/37341/1/VfS_2010_pid_388.pdf]


#2

You need to define the lagged variables as variables in the model. E.g.

model;
pi_lag=pi(-1);
x_lag=x(-1);
end;

and use those in the loss function.