FRBNY-DSGE / DSGE-2015-Apr

Replication files for Liberty Street Economics blog post "The FRBNY DSGE Model Forecast--April 2015"
http://libertystreeteconomics.newyorkfed.org/2015/05/the-frbny-dsge-model-forecast-april-2015.html
30 stars 23 forks source link

bugs in steady state and equilibrium conditions #1

Open ikarib opened 7 years ago

ikarib commented 7 years ago

Hello,

I followed derivations of non-linear conditions and log-linearization of FRBNY model in sections 7 and 8 of the online technical appendix to Chapter 2 - DSGE Model-Based Forecasting in Handbook of Economic Forecasting, kindly made available online.

Below I explain a few bugs in the code which I found by replicating FRBNY model (version 990) using IRIS toolbox. My IRIS code replicates the impulse responses exactly (up to 10 digits after decimal point).

The are four bugs in steady state calculation (getpara00_990.m):

Bug #1: Labor can not be normalized to one (as in SW) since it violates FOC for labor in steady state. Proof: This was mentioned in appendix (page 58) but not implemented in the code.

Bug #2: "bet" should be replaced by "betbar" in equation for wekstar, zeta_nR, zeta_nqk and zeta_nn Proof: In sections 7.4 and 7.5, equations 7.25 and 7.44 assume log-utility (unlike section 8.1.2 where sigmac is not equal 1 and hence can not cancel out). Therefore in these equations "bet" should be replaced by "betbar".

Bug #3: "kstar" should be replaced by "kbarstar" in equation for nstar and vstar Proof: In the same equation 7.25, the ratios nkstar and wekstar are taken w.r.t. to kbarstar not kstar.

Bug #4: zeta_bmue should have a minus sign Proof: zeta_bmue has a minus sign in equation 7.86 (as a typo zetab,x) and the whole expression on r.h.s. can be simplified to just "zeta{b,mue}=1-\tilde{R}^k/R".

The are also two bugs in equilibrium conditions (eqcond990.m):

Bug #5: missing normalization of shock bt in evolution of net worth Proof: In equation 7.51 when adding shock -b{t-1} after -R{t-1}, the shock needs to normalized by -(sigmac(1+h_exp(-zstar)))/(1-h*exp(-zstar)).

Bug #6: missing term z_{t-1} and incorrect coefficient for term z_t in Phillips curve for wages Proof: If we take wage Phillips curve (equation 13 in SW) and replace pi_t with pi_t+z_t then we don't get the same equation as 8.106.

You can see the fixed code on my forked version at GitHub.

emoszkowski commented 7 years ago

@MarcoDelNegro, @mpgiannoni - I think this one's for you. If you verify the changes, I can merge #2.

emoszkowski commented 7 years ago

@ikarib, my most recent push (with some extensions on #2) should address the following:

Steady state calculations Bug 2: Since Rstard/(pistar * exp(zstar)) = (bet)^{-1} exp((sigmac-1)*zstar) when bstar = 1 (where Rstard = Rstarn*bstar), we prefer to use the left hand side as betbar (to generalize for cases in which bstar != 1). This is the reciprocal of the definition you provided, so the definitions of wekstar, zeta_nR, zeta_nqk and zeta_nn have been modified appropriately.

Bug 3: Completed

Bug 4: Completed

Equilibrium conditions Bug 1: The normalization of the b shock has been incorporated.

I'll leave this issue open until we resolve the remaining 2 bugs.

ikarib commented 7 years ago

Note that Rstarn was defined as 100(rstarpistar-1) and used in measurement equations for short-term and long-term nominal interest rates and expected FFR. Therefore, Rstard should be defined as (1 + Rstarn/100)*bstar

pearlzli commented 6 years ago

@ikarib, I addressed the Rstard definition in 22d7d870. Thanks for pointing this out!