DSGE-2015-Apr icon indicating copy to clipboard operation
DSGE-2015-Apr copied to clipboard

bugs in prior density and unconstrained optimization

Open ikarib opened this issue 7 years ago • 1 comments

Bug 1: Rstard should be defined as (1 + Rstarn/100) * bstar Proof: Rstarn was defined as 100 * (rstar*pistar-1) and used in measurement equations for short-term and long-term nominal interest rates and expected FFR.

Bug 2: incorrect prior density of inverse-gamma distribution: Proof: correct PDF is given at https://en.wikipedia.org/wiki/Scaled_inverse_chi-squared_distribution

Bug 3: the mode is constrained at the upper boundary on parameter rho_sigw Proof: Unconstrained minimization algorithm such as csminwel requires rescaling of constrained parameters. The problem is that we don't know if any of the constraints will become binding at the mode. For example, parameter rho_sigw becomes binding at the upper boundary 0.99 that was imposed in original v990 code (as evidenced from output from IRIS optimizer fmincon). That caused the csminwel to slow down to a crawl since the unscaled parameter tried to go to infinity. I therefore had to increase this upper limit to 0.999 (since the mode is at 0.9945). As a result the Julia csminwel code which was running several days, now runs in 4 hours after binding constraint on rho_sigw was removed. We can avoid this problem in IRIS by using constrained minimization method such as fmincon (with active-set algorithm), which can estimate the model in 5 minutes.

You can see the fixed code in pull request #3 and my replication in IRIS at https://github.com/ikarib/FRBNY-IRIS

ikarib avatar Feb 03 '17 01:02 ikarib