Dear @jpfeifer,

I am trying to estimate a Loss function of the form Loss = var(inflation)+alpha*var(output), with var expressing variance and i am using the format i find in one of your models:

https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Gali_2015/Gali_2015_chapter_6_5.mod

Particularly i write the below and also declare Loss and a_Loss in the variables and paramaters block respectively.

variance.pie=oo_.var(pie_pos,pie_pos);

variance.Y=oo_.var(Y_pos,Y_pos);

Loss = variance.pie + a_Loss*variance.Y;

However, i am geeting the below error:

line 186, col 9 character unrecognized by lexer.

On the other hand if input the above under stoch_simul command i get the below error message:

line 254, cols 8-15: syntax error, unexpected VARIANCE.

Can you please help? Any idea?

You may also find attached the code

DSGE_loss_test.mod (7.1 KB)