Simple Optimal Monetary Rules

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.

Simple Optimal Monetary Rules

Postby lamach » Wed Jul 18, 2012 2:33 pm

Hi all,

I'm trying to compare different simple monetary rules within a basic 3 equation hybrid NK model:

Code: Select all
y=alpha1*y(-1)+alpha2*y(-2)-sigma*(i(-1)-infl(+1)-r(-1))+e_y;
AD
Code: Select all
infl=gamma*infl(-1)+(1-gamma)*infl(+1)+kappa*y(-1)+e_infl;
NKPC
Code: Select all
ihat=phi1*ihat(-1)+phi2*(infl-infls)+phi3*y;
Taylor rule

With the CB's preferences described as:

Code: Select all
planner_objective lambda1*infl^2 + lambda2*y^2 + lambda3*ihat^2;


The parameters are calibrated with typical values from the literature.

I wish to run the model with different simple monetary rules (i.e. replacing the taylor rule) and find the optimal parameters for the various simple rules and also the variance and welfare loss of the system.

I am new at Dynare and have written a basic model which is attached. I just want to check whether this is along the right line.

Thanks in advance
Attachments
example.mod
(926 Bytes) Downloaded 195 times
lamach
 
Posts: 3
Joined: Wed Jul 18, 2012 2:17 pm

Re: Simple Optimal Monetary Rules

Postby lamach » Thu Jul 19, 2012 1:21 pm

hi

the OSR code provided at http://www.dynare.org/DynareWiki/OptimalPolicy does not work.

it comes out with:


??? Attempt to execute SCRIPT osr as a function:
C:\dynare\thesis\osr.m

Error in ==> example at 126
osr(var_list_,osr_params_,obj_var_,optim_weights_);

Error in ==> dynare at 120
evalin('base',fname) ;
lamach
 
Posts: 3
Joined: Wed Jul 18, 2012 2:17 pm

Re: Simple Optimal Monetary Rules

Postby selima » Sat Jul 27, 2013 3:29 pm

Optimal Policy

Dynare can compute Ramsey policy and optimal simple rules

Ramsey policy

computes the first order approximation of the policy that maximizes the policy maker objective function submitted to the constraints provided by the equilibrium path of the economy.

Ramsey policy replaces OLR in Dynare version 3:

Example:

var y inflation r;
varexo y_ inf_;

parameters delta sigma alpha kappa gammarr gammax0 gammac0 rbar lambda1 lambda2;

delta = 0.44;
kappa = 0.18;
alpha = 0.48;
sigma = -0.06;
lambda1 = 0.5;
lambda2 = 0.1;

model(linear);
y = delta * y(-1) + (1-delta) * y(+1) + sigma *(r - inflation(+1)) + y_;
inflation = alpha * inflation(-1) + (1-alpha) * inflation(+1) + kappa*y + inf_;
end;

shocks;
var y_;
stderr 0.63;
var inf_;
stderr 0.4;
end;

planner_objective inflation^2 + lambda1*y^2 + lambda2*r^2;

ramsey_policy(planner_discount=0.95);
Notes:

There must be less equations than endogenous variables. The difference is the number of instrument to be chosen optimally.
For this reason, you can't use steady or check before ramsey_policy
Pure Ramsey policy or optimal policy in a timeless perspective depends on the initial values of the Lagrange multipliers, but the recursive equations are the same.
ramsey_policy isn't limited to linear models or quadratic objective functions.
The default value of planner_discount is one.
ramsey_policy is limited to the first order approximation.
Optimal simple rule

With optimal simple rule (OSR), Dynare searches numerically the best value for the coefficients of some prespecifed policy rule.

Example:

var y inflation r;
varexo y_ inf_;

parameters delta sigma alpha kappa gammarr gammax0 gammac0 gamma_y_ gamma_inf_;

delta = 0.44;
kappa = 0.18;
alpha = 0.48;
sigma = -0.06;


model(linear);
y = delta * y(-1) + (1-delta)*y(+1)+sigma *(r - inflation(+1)) + y_;
inflation = alpha * inflation(-1) + (1-alpha) * inflation(+1) + kappa*y + inf_;
r = gammax0*y(-1)+gammac0*inflation(-1)+gamma_y_*y_+gamma_inf_*inf_;
end;

shocks;
var y_;
stderr 0.63;
var inf_;
stderr 0.4;
end;


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;
Notes:

There must be as many equations as endogenous variables
Currently, the only objective function is a weighted sum of the variances of some variables of the model
The fragment

gammarr = 0;
gammax0 = 0.2;
gammac0 = 1.5;
gamma_y_ = 8;
gamma_inf_ = 3;
provides numerical initialization for the optimization.
On the forum, otb reports that he/she encountered numerical problems with models that have very small variances. He/she suggests to multiply the weights in the objective function by 100 or 1000
Warning

Don't call your files osr.mod or osr1.mod because it conflicts with internal Dynare names.
selima
 
Posts: 46
Joined: Thu Jan 10, 2013 5:13 pm


Return to Dynare help

Who is online

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