osr by grid search

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.

osr by grid search

Postby nazanin » Sat Jun 04, 2011 10:06 am

hello everyone

I have a problem about grid search for the optimal simple rule(osr)
my model have 24 endogenouse variables and 24 equations
one of equation is below monetary policy rule:

phivariant = landa1*phivariant(-1)+landa2*pi(-1)+landa3*Y(-1)+epsilon
where : phivariant=money growth , pi= inflation and Y = output
I also have a quadratic loss function of inflation and outputgap

i need to find optimal coefficients of landa1 , landa2 and landa3 that minimized loss function
also i want to use policy rule in alternative time and get impulse responses

can i use grid search for finding this coefficient in dynare?
I know below osr command :

optim_weights;
inflation 1;
y 1;
end;
osr_params gammax0 gammac0 gamma_y_ gamma_inf_;
gammarr = 0;
gammax0 = 0.2;
gammac0 = 1.5;
gamma_y_ = 8;
gamma_inf_ = 3;
osr;

but i don,t know after present parameter , what is value for parameters and how can find it? is it initial value?

also i know how to write a loop over different values for a parameter like :

rhos = 0.8:0.05:1.05;
for i=1:length(rhos);
rho = rhos(i);
stoch_simul(order=1);
if info;
disp(['Computation fails for rho = ' num2str(rho)]);
end;
// results can be saved here
end;

for finding osr by grid search, do we must mix osr command with loop command?
does osr command apply grid search for finding optimal coeficients?
what is the value of parameters after present parameters and how can find it?

I need to find optimal monetary policy by osr in dynare

please told me anything about my problem that you know.
and introduse some dynare sources about this problem and osr command mechanism.
and recommend your suggestion that can run the model better.

i attach my mod file.

THANKS
Alireza Bagherpour
Attachments
finalmodel6.mod
(2 KiB) Downloaded 174 times
nazanin
 
Posts: 8
Joined: Sun Feb 27, 2011 10:32 am

Re: osr by grid search

Postby SébastienVillemot » Tue Aug 23, 2011 12:08 pm

I think there is a misunderstanding here: osr will precisely do the search for the parameters which minimize the objective. So you need not do grid search when using osr, you can just remove the loop.

The loop around stoch_simul for doing a grid search is a very inefficient way of doing what osr does. However it can be useful in order to give a good starting point to the optimization algorithm implemented in osr.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France


Return to Dynare help

Who is online

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