Page 1 of 1

Optimal simple rule

PostPosted: Fri Mar 24, 2017 6:35 pm
by S_V
Dear Prof. Pfeifer,

I am having a bit of difficulty fully understanding how the optim_weights block works with the optimal simple rule.

In the user manual for the optimal policy package (attached), a variable in the optim-weights section only appears once (page 5). However, in a different example (below) from the Dynare optimal policy manual, inflation appears twice in this block and I don't understand the purpose of its second appearance (with 0.5 next to it)?

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;

gammarr = 0;
gammax0 = 0.2;
gammac0 = 1.5;
gamma_y_ = 8;
gamma_inf_ = 3;

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;
y, inflation 0.5;
end;

osr_params gammax0 gammac0 gamma_y_ gamma_inf_;
osr y;

My other questions are:
2) Must the shock I include in the shock block be associated with the equations for the variables I have in optim_weight (as in both examples) or can the shock be for another variable in my model, say a technology shock?
3) Does the weight of the first variable in the rule ('y' in both examples) have to be 1?
4) Also, do the weights simply just represent the relative importance you are placing on the variables in the rules. I ask because they don't seem to sum to 1 or some value.

Many thanks

Re: Optimal simple rule

PostPosted: Sat Mar 25, 2017 9:11 am
by jpfeifer
As documented in the manual, the
Code: Select all
optim_weights

block determines the weight placed on the respective variances and covariances. Thus,
Code: Select all
optim_weights;
inflation 1;
y 1;
y, inflation 0.5;
end;

means that the loss functin is given by

Code: Select all
L=1*var(y)+1*var(inflation)+0.5*cov(y,inflation)

where var denotes the unconditional variance and cov the covariance. The covariances are the reason a variable can appear multiple times in the block.

2) As typically any shock in the model will affect the variance of the controlled variables, it does not matter where you put the shock.
3) We are looking for a minimum in the loss function. Minima are invariant to multiplicative constants. Thus, what matters is the relative weight of the terms in the loss function, not their absolute value. An appropriate normalization is often to set the first term to 1 and specify all other weights relative to this.
4) Yes, see 3)