Navigation: Examples >

EHLJME2000.RPF

 

 

 

 

EHLJME2000.RPF sets up and solves the DSGE model from Erceg, Henderson & Levin(2000).


Full Program


 

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"||)
 

 

 

 

 

Copyright © 2024 Thomas A. Doan