inflation in DSGE
inflation in DSGE
Dear Tom
Is there available a code for the calibration of a simple DSGE New Keynesian model for output inflation and the interest rate?
In the forum I can find only codes for RBC models. I need that because I want to see how we introduce the inflation rate into the code.
Thank you very much in advance
Best
Is there available a code for the calibration of a simple DSGE New Keynesian model for output inflation and the interest rate?
In the forum I can find only codes for RBC models. I need that because I want to see how we introduce the inflation rate into the code.
Thank you very much in advance
Best
Re: inflation in DSGE
This is the EHL model. Did you have a different one in mind?
Code: Select all
*
* Model from Erceg, Henderson & Levin(2000), "Optimal monetary policy
* with staggered wage and price contracts," Journal of Monetary
* Economics, vol. 46, no 2, 281-313.
*
dec series g mpl mrs dp dw realw r y
dec series rstar wstar ystar
dec series x u z
*
dec real beta sigma chi alpha thetaW thetaP xiW xiP
dec real ubar zbar xbar kbar
dec real rhox
dec real lbar ybar cbar
dec real kappaP kappaW
*
* Household parameters
*
compute beta = .99
compute sigma = 1.5
compute chi = 1.5
compute ubar = 0.3163
compute zbar = 0.03
*
* Production function parameters
*
compute alpha = .3
compute rhox = 0.95
compute xbar = 4.0266
compute kbar = 30.0*ubar
*
* Calvo process parameters
*
compute thetaW = 1.0/3.0
compute thetaP = 1.0/3.0
compute xiW = .75
compute xiP = .75
compute eps = 6.0
compute phi = 6.0
*
* Policy parameters
*
compute rhor = 0.9
compute gammapi = 2.0
compute gammaogap = 0.125
*
compute lbar = .27
compute ybar = 10.0*ubar
compute cbar = ybar
*
* Simplifications depending upon deep parameters
*
compute lcbar = cbar/(cbar-ubar)
compute lubar = ubar/(cbar-ubar)
compute llbar = lbar/(1-lbar-zbar)
compute lzbar = zbar/(1-lbar-zbar)
compute lambda = alpha + chi * llbar + (1-alpha) * sigma * lcbar
compute kappaP = (1-xiP*beta)*(1-xiP)/xiP
compute kappaW = (1-xiW*beta)*(1-xiW)/(xiW*(1+chi*llbar*((1+thetaW)/thetaW)))
*
frml(identity) eqn1 = g - (g{-1} - 1.0/(sigma*lcbar)*(r{0}-dp{-1}-rstar{0}))
frml(identity) eqn2 = mpl - (wstar{0} - alpha/(1+alpha)*g{0})
frml(identity) eqn3 = mrs - (wstar{0} + (chi*llbar/(1-alpha) + sigma*lcbar)*g{0})
frml(identity) eqn4 = dp - (beta*dp{-1}+kappaP*(realw-mpl))
frml(identity) eqn5 = dw - (beta*dw{-1}+kappaW*(mrs-realw))
*
* Pareto optima
*
frml(identity) opt1 = ystar - (((1-alpha)*sigma*lubar/lambda)*u{0}-(1-alpha)*chi*lzbar/lambda*z{0}+(1+chi*llbar)/lambda*x{0})
frml(identity) opt2 = wstar - ((-alpha*sigma*lubar/lambda)*u{0}+alpha*chi*llbar/lambda*z{0}+(chi*llbar+alpha*lcbar)/lambda*x{0})
frml(identity) opt3 = rstar - (sigma*lcbar*(ystar{-1}-ystar)+sigma*lubar*(u{-1}-u))
*
frml(identity) def1 = realw - (realw{1}+dw-dp)
frml(identity) def2 = g - (y - ystar)
*
* The model above needs to be closed with a rule for setting the interest rate
*
frml(identity) c1 = r - (rhor*r{1}+(1-rhor)*(gammapi*dp+gammaogap*g))
*
frml s1 = (x-xbar)-(rhox*(x{1}-xbar))
frml s2 = (u-ubar)
frml s3 = (z-zbar)
group dsge eqn1 eqn2 eqn3 eqn4 eqn5 opt1 opt2 opt3 def1 def2 s1 s2 s3 c1
dsge(model=dsge,a=adlm,f=fdlm) g dp dw y mpl mrs realw ystar wstar rstar x u z r
@dlmirf(page=byshock,a=adlm,f=fdlm,$
shocks=||"Productivity","Consumption","Leisure"||,$
variables=||"Gap","Price Inflation","Wage Inflation"||)Re: inflation in DSGE
Dear Tom,
You asked about other DSGE models. One which is rather prominent is:
Lubik, Thomas A. & Schorfheide, Frank, 2007. "Do central banks respond to exchange rate movements? A structural investigation," Journal of Monetary Economics, vol. 54(4), pages 1069-1087, May 2007
Code exists for this under Dynare (see "http://www.dynare.org/phpBB3/viewtopic. ... ubik#p2925"), but it would be very interesting to compare results and functionality with RATS if you had RATS code for it.
Regards
You asked about other DSGE models. One which is rather prominent is:
Lubik, Thomas A. & Schorfheide, Frank, 2007. "Do central banks respond to exchange rate movements? A structural investigation," Journal of Monetary Economics, vol. 54(4), pages 1069-1087, May 2007
Code exists for this under Dynare (see "http://www.dynare.org/phpBB3/viewtopic. ... ubik#p2925"), but it would be very interesting to compare results and functionality with RATS if you had RATS code for it.
Regards
Prof. J.D.A. Cuddy
Graduate Institute of International Studies
132, rue de Lausanne
CH-1211 Geneva
Switzerland
john.cuddy@graduateinstitute.ch
Graduate Institute of International Studies
132, rue de Lausanne
CH-1211 Geneva
Switzerland
john.cuddy@graduateinstitute.ch
Re: inflation in DSGE
You can see how this looks.
Code: Select all
*
* Model from Lubik, Thomas A. & Schorfheide, Frank, 2007. "Do central
* banks respond to exchange rate movements? A structural investigation,"
* Journal of Monetary Economics, vol. 54(4), pages 1069-1087, May 2007
*
dec series y phi r q exch A phistar ystar
dec series er eq eystar ephistar ez
dec real beta tau k alpha rhor rhoq rhoystar rhophistar rhoz gamma1 gamma2 gamma3
*
compute beta=0.96
compute tau=0.5
compute k=0.5
compute alpha=0.10
compute rhor=0.5
compute rhoq=0.4
compute rhoystar=0.9
compute rhophistar=0.8
compute rhoz=0.2
compute gamma1=1.5
compute gamma2=0.25
compute gamma3=0.25
frml(identity) eqn1 = y - (y{-1}-(tau+alpha*(2-alpha)*(1-tau))*(r-phi{-1})-rhoz*(A-A{1})-$
alpha*(tau+alpha*(2-alpha)*(1-tau))*q{-1}+alpha*(2-alpha)*((1-tau)/tau)*(ystar))
frml(identity) eqn2 = phi - (beta*phi{-1}+alpha*beta*q{-1}-(alpha*q)+(k/(tau+alpha*(2-alpha)*(1-tau)))*$
(y+alpha*(2-alpha)*((1-tau)/tau)*ystar))
frml(identity) eqn3 = r - (rhor*r{1}+(1-rhor)*(gamma1*phi+gamma2*y+gamma3*exch)+er)
frml(identity) eqn4 = exch - (phi-(1-alpha)*q-phistar)
frml(identity) eqn5 = q - (rhoq*q{1}+eq)
frml(identity) eqn6 = A - (A{1}+ez)
frml(identity) eqn7 = phistar - (rhophistar*phistar{1}+ephistar)
frml(identity) eqn8 = ystar - (rhoystar*ystar{1}+eystar)
frml eqn9 = er
frml eqn10 = eq
frml eqn11 = eystar
frml eqn12 = ephistar
frml eqn13 = ez
group dsge eqn1 eqn2 eqn3 eqn4 eqn5 eqn6 eqn7 eqn8 eqn9 eqn10 eqn11 eqn12 eqn13
dsge(model=dsge,a=adlm,f=fdlm,z=zdlm) y phi r q exch A phistar ystar er eq eystar ephistar ez
@dlmirf(a=adlm,f=fdlm,page=byshock,$
shocks=||"R","Q","YSTAR","PHISTAR","Z"||,$
variables=||"Y","PHI","R","Q","EXCH","A"||)Re: inflation in DSGE
Thank you, Tom, for your amazingly quick reply. I will look into it immediately.
Regards
Regards
Prof. J.D.A. Cuddy
Graduate Institute of International Studies
132, rue de Lausanne
CH-1211 Geneva
Switzerland
john.cuddy@graduateinstitute.ch
Graduate Institute of International Studies
132, rue de Lausanne
CH-1211 Geneva
Switzerland
john.cuddy@graduateinstitute.ch
Re: inflation in DSGE
Dear Tom,
Following up on this, having run it, I conclude that the code you posted seems to provide almost exactly the same IRFs as does the Dynare code for the calibrated model; thank you! A natural next step would be to estimate (some of) the parameters, rather than calibrate everything. This is easily done in Dynare; is it possible in RATS? If so, the next step would be to use the estimated DSGE to provide a prior for a BVAR. Again, this is easily done in Dynare; could you explain how (if at all) it can be done in RATS?
Regards
Following up on this, having run it, I conclude that the code you posted seems to provide almost exactly the same IRFs as does the Dynare code for the calibrated model; thank you! A natural next step would be to estimate (some of) the parameters, rather than calibrate everything. This is easily done in Dynare; is it possible in RATS? If so, the next step would be to use the estimated DSGE to provide a prior for a BVAR. Again, this is easily done in Dynare; could you explain how (if at all) it can be done in RATS?
Regards
Prof. J.D.A. Cuddy
Graduate Institute of International Studies
132, rue de Lausanne
CH-1211 Geneva
Switzerland
john.cuddy@graduateinstitute.ch
Graduate Institute of International Studies
132, rue de Lausanne
CH-1211 Geneva
Switzerland
john.cuddy@graduateinstitute.ch
Re: inflation in DSGE
An example of estimation is provided in http://www.estima.com/forum/viewtopic.php?f=26&t=310.jdacuddy wrote:Dear Tom,
Following up on this, having run it, I conclude that the code you posted seems to provide almost exactly the same IRFs as does the Dynare code for the calibrated model; thank you! A natural next step would be to estimate (some of) the parameters, rather than calibrate everything. This is easily done in Dynare; is it possible in RATS? If so, the next step would be to use the estimated DSGE to provide a prior for a BVAR. Again, this is easily done in Dynare; could you explain how (if at all) it can be done in RATS?
Regards
The attached procedure converts a selection of variables out of a state space model to their representation as a VAR.
Re: inflation in DSGE
Thank you, Tom. I should have thought of the Ireland example myself!
Regards
Regards
Prof. J.D.A. Cuddy
Graduate Institute of International Studies
132, rue de Lausanne
CH-1211 Geneva
Switzerland
john.cuddy@graduateinstitute.ch
Graduate Institute of International Studies
132, rue de Lausanne
CH-1211 Geneva
Switzerland
john.cuddy@graduateinstitute.ch
Re: inflation in DSGE
Hi all,
I want to calibrate a DSGE model where the Central Bank uses a threshold interest rate rule (say of TAR form). I guess the model must be simulated in order to generate the IRFs. Is there any sample any model that has done something like that?
Thanks
I want to calibrate a DSGE model where the Central Bank uses a threshold interest rate rule (say of TAR form). I guess the model must be simulated in order to generate the IRFs. Is there any sample any model that has done something like that?
Thanks
Re: inflation in DSGE
Lubik and Shorfheide (2004 AER) Testing for Indeterminacy:An Application to U.S. Monetary Policy
Is there code for this paper? Or some suggestions on this one?
Is there code for this paper? Or some suggestions on this one?
-
gabriel_rodriguez
- Posts: 4
- Joined: Fri Sep 04, 2015 5:47 pm
Identification by Sign-Restrictions PLUS Zero-Restrictions
Dear Tom,
I am trying to replicate Lubik, Thomas A. &Schorfheide, Frank, 2007. "Do central * banks respond to exchange rate movements? A structural investigation," published in the Journal of Monetary Economics, vol. 54(4), pages 1069-1087. I am using the file "lsjme2007_canada.rpf" with Canadian data. May you or somebody may help me with the following questions:
1) The code runs. However, it gives IRFunctions completely different to the Figure # 1 of the paper mentioned. What I have to do in order to have the same results?
2) In addition to (1), NO confidence intervals are obtained. How may I modified the code to obtain these confidence intervals?
3) I would like to replicate the estimates presented in the Table #1 where there are the posterior estimates for the candian data. In the Table there are 17 parameters. However, the code apparently only estimate 12 parameters I think. What may I do to obtain the same number and same values of the coefficients as in Table #1 of the paper?
4) The code does not print or display the estimated parameters. I have to print or display myself them. But there are not all parameters as I said. May you help me abou how to show the complete set of parameters? Further: these parameters as indicated in Table #1 of the paper have confidence intervals and I do not know what to do to obtain them? May you help me, please?
best,
Gabriel
I am trying to replicate Lubik, Thomas A. &Schorfheide, Frank, 2007. "Do central * banks respond to exchange rate movements? A structural investigation," published in the Journal of Monetary Economics, vol. 54(4), pages 1069-1087. I am using the file "lsjme2007_canada.rpf" with Canadian data. May you or somebody may help me with the following questions:
1) The code runs. However, it gives IRFunctions completely different to the Figure # 1 of the paper mentioned. What I have to do in order to have the same results?
2) In addition to (1), NO confidence intervals are obtained. How may I modified the code to obtain these confidence intervals?
3) I would like to replicate the estimates presented in the Table #1 where there are the posterior estimates for the candian data. In the Table there are 17 parameters. However, the code apparently only estimate 12 parameters I think. What may I do to obtain the same number and same values of the coefficients as in Table #1 of the paper?
4) The code does not print or display the estimated parameters. I have to print or display myself them. But there are not all parameters as I said. May you help me abou how to show the complete set of parameters? Further: these parameters as indicated in Table #1 of the paper have confidence intervals and I do not know what to do to obtain them? May you help me, please?
best,
Gabriel
Re: inflation in DSGE
I'm not convinced that the model as described in the JME paper is correct. With the parameters from the Canadian data, it produces unreasonable results. Someone on the Dynare web site put in what appears to be exactly the same model as I did and also came to the conclusion that something was seriously wrong. In trying to actually fit it to the Canadian data, I come up with completely different parameters for the Taylor rule, which, since it seems to be the main point of the paper, isn't promising.
If this is something that is of particular interest to you, you should contact the authors to see if they know about any problems with the model as written.
If this is something that is of particular interest to you, you should contact the authors to see if they know about any problems with the model as written.