BGG model with OSR

Hi everyone,
I am trying to implement the BGG model with an optimal simple rule where the interest rate respond to asset prices, other than output gap, and inflation but I get the following message for each iteration:

Improvement on iteration … = NaN


f at the beginning of new iteration, Inf
Predicted improvement: 0.000000000
lambda = 1; f = Inf
Norm of dx 0
bad gradient ------------------------
bad gradient ------------------------
bad gradient ------------------------
Cliff. Perturbing search direction.
Predicted improvement: 0.000000000
lambda = 1; f = Inf
Norm of dx 0

and finally, at the last iteration:

Improvement on iteration 1001 = NaN
iteration count termination
OPTIMAL VALUE OF THE PARAMETERS:
gammax0 0.5

  gammac0                 1.1

  gammarr                 0.8

which are the same parameters I put for the initialisation. I am wondering if it is normal. If there is something wrong may I ask what it is?
I attach the .mod file I wrote for an european calibrated model.
Thanks
BGGEUosr3.mod (2.02 KB)

Apparently, you are using bad starting values. Hence, even the first optimization step fails as the model solution cannot be computed. When trying to find the steady state of your model by using the command

after the shocks statement, I get the error message:

STEADY: numerical initial values incompatible with the following equations 18

Hence, you should check if your model is correct and the initial values you supply lead to a well-defined steady state.

Hi, Thank you for your answer.
I hope you will answer to the following questions too:

  1. I cannot use the commmand you wrote, since I get the following message:

??? Error: File: c:\dynare\4.0.4\matlab\BGGEUosr4.m Line: 222 Column: 14
Missing MATLAB operator.

Error in ==> dynare at 102
evalin(‘base’,fname) ;

Why that happens?

  1. what starting values do you mean? The ones of the OSR? How can I find the right ones?
    In fact the model seems to work well when it runs with fixed parameters in the Taylor rule (gammaC0 = 0.11 and gammarr = 0.9). Actually I don’t have any problem because in that case the steady state exists.
    thanks again

I misunderstood the comand you suggest me, i did it right and i get the same message as you. How is it possible that the model runs with the same fixed values in the taylor rule that i put as initialisation values for the osr, that seems to’ be’ incorrect?
Thanks and sorry for the misunderstanding

I misunderstood the comand you suggest me, i did it right and i get the same message as you. How is it possible that the model runs with the same fixed values in the taylor rule that i put as initialisation values for the osr, that seems to’ be’ incorrect?
Thanks and sorry for the misunderstanding

Sorry, but I am not sure what you mean with “the model runs”? With the wrong initial values, there is no steady state and the model does not run. Try for example using

and you will see that is also gives you an error.

You are right, when I add that command there is an error message.
But here what I meant when I said that the steady state exists when the model runs with fixed parameter in the Taylor rule: I have attached a mod file example in which two discretionary parameters has been put in the TR. As you can see dynare solves it and it gives back the steady state value.
Thanks again for your help!
BGGEUfl.mod (2.01 KB)

Apparently, you changed lines 54 and 55 (second and third to last model equations). The latter one is the equation producing the error. So this is the reason why it does not work anymore.

Hi,
I tried to not modify anything of the baseline model, except that the osr command at the end of the file, but I get the following message
??? Error using ==> print_info
MJDGGES returns the following error code11

Error in ==> check at 53
print_info(info);

Error in ==> BGGosra at 208
check;

Error in ==> dynare at 102
evalin(‘base’,fname) ;

which should indicate, if I get right from another post, some problem with the 11th eingenvalue. I still don’t understand how it is possible since the steady state of the baseline model exisists and I put as initialisation values of the osr the ones I used for the baseline model (0.11 and 0.9).
I really appreciate your hel
BGGosra.mod (2.09 KB)

You still did not solve the underlying problem. If you put the check command that gives you the error after the steady command, you will see that you still have incompatible starting values in your model in the first place.