BGG model with OSR

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

BGG model with OSR

Postby flaminia2010 » Tue Apr 06, 2010 6:29 pm

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
Attachments
BGGEUosr3.mod
(2.02 KiB) Downloaded 230 times
flaminia2010
 
Posts: 12
Joined: Fri Mar 26, 2010 10:53 am

Re: BGG model with OSR

Postby jpfeifer » Wed Apr 07, 2010 12:33 pm

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
Code: Select all
steady;

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: BGG model with OSR

Postby flaminia2010 » Wed Apr 07, 2010 5:05 pm

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?

2. 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
flaminia2010
 
Posts: 12
Joined: Fri Mar 26, 2010 10:53 am

Re: BGG model with OSR

Postby flaminia2010 » Wed Apr 07, 2010 7:32 pm

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
flaminia2010
 
Posts: 12
Joined: Fri Mar 26, 2010 10:53 am

Re: BGG model with OSR

Postby flaminia2010 » Wed Apr 07, 2010 7:34 pm

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
flaminia2010
 
Posts: 12
Joined: Fri Mar 26, 2010 10:53 am

Re: BGG model with OSR

Postby jpfeifer » Thu Apr 08, 2010 4:43 pm

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
Code: Select all
stoch_simul;

and you will see that is also gives you an error.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: BGG model with OSR

Postby flaminia2010 » Fri Apr 09, 2010 7:32 am

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!
Attachments
BGGEUfl.mod
(2.01 KiB) Downloaded 171 times
flaminia2010
 
Posts: 12
Joined: Fri Mar 26, 2010 10:53 am

Re: BGG model with OSR

Postby jpfeifer » Fri Apr 09, 2010 11:01 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: BGG model with OSR

Postby flaminia2010 » Sun Apr 11, 2010 8:31 am

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
Attachments
BGGosra.mod
(2.09 KiB) Downloaded 194 times
flaminia2010
 
Posts: 12
Joined: Fri Mar 26, 2010 10:53 am

Re: BGG model with OSR

Postby jpfeifer » Mon Apr 12, 2010 8:27 am

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.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 13 guests