Some questions regarding OSR

Dear professor, I have some questions regarding OSR. Actually, I write a linear model and input it to the dynare file. After basic analysis, I want to find the best policy which aims at minimizing the welfare loss function:welfare= r*var(pi)+(1-r)*var(y). I see the Dynare reference manual and use the osr command like:

stoch_simul(linear,irf=20,periods=250) Y pi; optim_weights; pi 0.5; Y 0.5; end; osr_params gammaq; osr Y pi;
And I got some figures which is listed in the attachment. But I am confused about the figures and get some questions:
1:the first two figures are the stoch_simul figures and the last two are the osr figures, what’s the difference between them?
2:I set the osr_parameter gammaq, but how can I get the best value of gammq.
3:I even don’t know if I should use the OSR command. Actually I just want to get the value of welfare loss and compare the welfare loss caused when gammaq=0 and that caused when gammaq>0, but I know little about welfare loss function, is that caused by some single shock and how can I set the size of the shock? (In my model , there are six exogenous shocks including interest rates shocks). So could you please help me with these problems?
welfare loss.pdf (147 KB)

1 Like
  1. The stoch_simul figures are under the value for gamma_q you provided, while the osr figures are under the optimal value for gamma_q computed by OSR.
  2. In the command window Dynare should display something like


  gammax0            0.258511

  gammac0             1.77387

  gamma_y_            16.6621

  gamma_inf_          2.54093

Objective function : 0.442155

  1. You need to understand the question you want to answer. The OSR command gives you the welfare under

which depends on the unconditional variance of inflation and output. When you allude to shock sizes, you seem to care about conditional welfare, which is a very different object.

Dear professor, thanks for your reply, I try again and get the result as following,


   gammaq             5.90495

   gammaY             13.6422

   gammapi            2.06038

Objective function : 0.404872[/code]

  1. But the optimal value of parameters seems so large. For example, the three parameters here are the reaction coefficient in the Taylor-type interest rate rule, but compared to the calibration, they’re so large. In addition, what’s the meaning of the objection function, is 0.404872 the minimal vaule of the welfare loss?

  2. As for your answer to the third question, I did confuse the conditional variance and the unconditional variance of inflation and output. Actually I use both of them in my thesis. For example, when I modify the value of certain parameter and want to study the effect of the parameter, I set the size of the interest rate shock and the housing price shock as 1 unit, respectively, and I get the data of the fluctuations of inflation and output in the subsquent 20 periods, then I calculate the standard deviation of the data, regard it as the conditional variance(or standard deviation) and attempt to find the optimal value of the parameter by comparing the sdt under different parameter calibration. Under some conditions, the changing directions of the std of output and inflation are the same, which increase the convenience of analyzing optimal parameters, but sometimes the changing directions are opposite, so I want to add an welfare loss function and get the unconditional variance to make further analysis. Above is my understanding of conditional variance and unconditional variance, could you please tell my if it is right?

  3. There are still some details that I want to confirm.
    a. For the housing price shocks, the value of the parameter is better when the standard deviation is smaller, which means a weaker economic fluction caused by 1 unit housing price shock. But for the interests shocks, is it right that the value of the parameter is better when the std is larger, which means a stronger regulation of interest rate policy?
    b. For the unconditional variance, I think it represents the long-term volatility, so it’s caused by a series of random shocks, not a single shock like 1 unit housing price shock or interest rate shock. Therefore, the smaller the std, the better the value of parameter. Is my understanding right?

  1. Yes, the objective function is the value of the welfare function you defined attained at the detected minimum. Regarding sizes: it is hard to compare them. One is what is estimated to be going on in practice, the other is the theoretical optimal values. You simply don’t know ex ante (calibration) how far you are away from the optimum.

  2. The variance of the data is the sum of many IRFs, not just one. So generally you cannot simply look at what happens after a particular IRF for conditional welfare. Also, the size of the IRFs is not comparable if you use 1 unit as opposed to one standard deviation.

3a) It is your model and you need to know what the objective is. With adhoc welfare functions, it is always hard to know what is going on. For supply shocks, you always want to fully accomodate them, while you want to stabilize demand shocks. But often there are meaningful tradeoffs that make clearcut conclusion impossible to obtain

Dear professor, thanks for your reply. And I got some other questions.
1.You say that “the size of the IRFs is not comparable if you use 1 unit as opposed to one standard deviation”, and I don’t know if I express myself clearly. Actually, in my model, there are two types of shocks.
a.For the first type, I set the house preference shock as j=rhoj*j(-1)+epsj, where j allows for random disturbances to the marginal utility of housing, and given that it directly affects housing demand, offers a parsimonious way to assess the macro effects of an exogenous disturbance on house prices, so it is an indirect way to define house price shocks. When I change the value of certain parameter, the same epsj causes different size of house price fluctuations, so I attemp to adjust the epsj to make the house price’s peak in the first period 1 unit, which is convenient for the subsequent studies which aim at comparing the effects of house price shocks on macro economy.
b.For the second type, the shock is direct. Taking the interest rate as example, which is defined as following:
And I use the same method to make the interest rate’s peak in the first period 1 unit. So do you mean that it’s comparable only when I set the epsj and epsR 1 unit, respectively? Under my method, the IRFs is not comparable, right?

  1. In addition, I want to ask some details about OSR command. Since the welfare loss given by OSR command depends on the unconditional variance of inflation and output, which represents the long-term volatility and is caused by a series of random shocks, not a single shock, I think it’s different between 500 times of simulation and 1000 times, so how can I set the number of random shocks?
  1. There is no real foundation for what you are doing here. If you can defend approach, you should be fine. The question is what we learn from this approach.
  2. Dynare uses theoretical moments derived from the linear Gaussian state space representation. Therefore, it does not depend on sample length.