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?

Thx a lot. It works now…
I want to run the model but I have a problem in the loss. My loss value is completely different than the loss from the paper.
My loss is L=0.817 and the one from the paper is L= 0.0899. So a huge difference but I cant find my mistake. I checked all equations and variables but couldnt find my mistake.
I used for delta the smalller root of the quadratic equation, which is 2.220446049250313e-16.
Is there anything I did wrong?

And when I change the anticipation of the cost push shock from eps to eps(-3) there is no change in the loss. It is still the same amount as before… So there must be something wrong in my code…

I will try to help by tomorrow evening. At a first glimps it seems to be you are only interested in the loss value under commitment and not the OSRs, right?.

I haven´t reviewed your code yet. But maybe the paper is wrong.

By the way, I rely on the published version from 2011 and not the working paper.
I hope that there are no differences, otherwise communication might be difficult.

Hi Max1,
I am also interested on the OSR’s but at first I wanted to solve the problem with the loss.
I tried to find the OSR but dynare says my system is not stable (Blanchard kahn condition is not satisfied). So, I guess my code is wrong.

I think there are no differences between the paper.

I checked your code and it makes more sense now.
But I have one question: from where did u get the value for oo_.var(pi_pos,pi_lag_pos) . Its 0.0018. Is it the covariance of Pi and Pi_lag?

yes, oo_.var stores the variance-covariance matrix of all model endogenous variables.

I guess you refer with gamma_pi and gamma_x to your starting values for the numerical optimizer, right?

Please post your code, otherwise I can not help you with the OSR. Unfortunately, I do not have enough time this weekend and I am not working on that paper.

%optimal Simple Rule
optim_weights;
pi 1;
x a_x;
pi_lag 1;
x_lag a_x;
end;
and have a Loss = 0.0965

My questions are:
What should I do with the coeffiecients gamma and delta from the loss function? And do I need to state the covariances of
pi, pi_lag 1;
x,x_lag a_x ;
also as optimal weights?

I will have to look at this in more detail in April. But yes, you need to specify covariances when required. Note that there have been a couple of important bugfixes to OSR when covariances were involved. That might explain differences.