%RAMSEY_RUN.M %Compute a second-order approximation of the Ramsey equilibrium conditions of the model developed in ``Optimal Fiscal and Monetary Policy Under Sticky Prices,'' by S. Schmitt-Grohe and Martin Uribe (JET, February 2006) %(c) Stephanie Schmitt-Grohe and Martin Uribe, May 2006 %Prerequisits: run RAMSEY_SS.mat (produced by RAMSEY_SS.M) and RAMSEY_F.MAT (produced by RAMSEY_F.M) %Output: RAMSEY_RUN.MAT clear all load ramsey_f %produced by RAMSEY_F.M load ramsey_ss %produced by ramsey_ss.m approx = 2; num_eval [gx,hx, exitflag] = gx_hx(nfy,nfx,nfyp,nfxp, 1+1e-4); disp('done with gx_hx') %Recall that the innovation to the state vector is given by sigma * ETAMATRIX * eps_{t+1}, where sigma is a scalar, ETAMATRIX is a nx*ne matrix and eps_t is a vector of exogenous innovations of size neX1 distributed (0,I); ne=2; ETAMATRIX = zeros(size(fx,2),ne); %The gov't purchases and techno shocks take the last 2 elements of the state vector x (see ramsey_f.M). Thus, ETAMATRIX(end-1,1)=STD_EPSG; ETAMATRIX(end,2)=STD_EPSZ; if approx==2 & (exitflag==1) [gxx,hxx] = gxx_hxx(nfx,nfxp,nfy,nfyp,nfypyp,nfypy,nfypxp,nfypx,nfyyp,nfyy,nfyxp,nfyx,nfxpyp,nfxpy,nfxpxp,nfxpx,nfxyp,nfxy,nfxxp,nfxx,hx,gx); disp('done with gxx_hxx') [gss,hss] = gss_hss(nfx,nfxp,nfy,nfyp,nfypyp,nfypy,nfypxp,nfypx,nfyyp,nfyy,nfyxp,nfyx,nfxpyp,nfxpy,nfxpxp,nfxpx,nfxyp,nfxy,nfxxp,nfxx,hx,gx,gxx,ETAMATRIX); disp('done with gss_hss') sig =1; end %if approx==2 save ramsey_run.mat