Dear friends, I am new in this field. I have a trivial question that I want to add government spending exogenous to baseline DSGE Model (Fernandez). But it does not work.

i think i must add a condition for government and bond and seinorage.

i need to sb help me

Hi

You have created non-stationary shocks for G

```
log(mu_A)=LambdaA+epsA;
log(mu_G)=LambdaG+epsG;
//28. Defininition composite technology
mu_z=mu_A^(1/(1-alppha))*mu_I^(alppha/(1-alppha));
mu_G=mu_z;
```

This seems unconventional and I am not sure whether a balanced growth path exists given your functional forms and other non-stationary technology shocks in your model.

Usually G is given a stationary shock like the one that you have created for the labour shock.

log(G)=rhoG*log(G(-1))+epsG;

Cheers

Reuben

thank so much

i check and change the shock for G

thank you

i have another primary question?

how can i be sure that a balanced growth path exists in the model?

In case of the model at hand, a BGP implies the existence of a steady state.

Thanks. Is it necessary to have a condition to avoid exploding bond?

This looks like it is a closed economy model and the economy cannot borrow infinitely from overseas to finance expenditure, unlike in open-economy bond economies. The private sector’s assets are the government’s liabilities, and they cancel each other out in the national accounts. So the bond position will not cause non-stationarity and hence the model does not have to be ‘closed’.

Reuben

Thanks again for your help

I am not sure I understand @punnoosejacob’s answer. Conceptually, an model economy does not need to be saddle path stable or have a non-stationarity. So even a small open economy does not have to be closed.

That being said, we usually think that saddle path stable equilibria are the ones that interest us. In that case, there is a transversality+No-Ponzi condition that rules out explosive paths for debt. From that point of view, the models needs to include a condition that assures that debt does not explode.

Thanks Johannes. What I meant was ‘closing’ in the sense of Schmitt-Grohe and Uribe (JIE 2003) , so that the steady-state could be pinned down in incomplete market models. https://www.sciencedirect.com/science/article/pii/S0022199602000569.

Yes, the end-point restrictions, for the optimisation problem, would ensure the debt is not explosive.

NK1_baseline.mod (9.9 KB)

hello and thank again.

i changed G shock but i encountered with another problem.

the results show the blanchard-khan is not satisfied.

can you help me?

There are 14 eigenvalue(s) larger than 1 in modulus

for 15 forward-looking variable(s)

The rank condition ISN’T verified!

Error using print_info (line 45)

Blanchard Kahn conditions are not satisfied: indeterminacy

Error in stoch_simul (line 100)

print_info(info, options_.noprint, options_);

Error in NK1_baseline (line 408)

info = stoch_simul(var_list_);

Error in dynare (line 223)

evalin(‘base’,fname) ;

```
var d //preference shock
c //consumption
G //consumption
mu_z //trend growth rate of the economy (from neutral and investment specific technology)
mu_I //growth rate of investment-specific technology growth
mu_A //growth rate of neutral technology
lambda //Lagrange multiplier
R //Nominal Interest rate
PI //Inflation
r //rental rate of capital
x //investment
u //capacity utilization
q //Tobin's marginal q
f //variable for recursive formulation of wage setting
ld //aggregate labor demand
w //real wage
wstar //optimal real wage
PIstarw //optimal wage inflation
PIstar //optimal price inflation
g1 //variable 1 for recursive formulation of price setting
g2 //variable 2 for recursive formulation of price setting
yd //aggregate output
mc //marginal costs
k //capital
vp //price dispersion term
vw //wage dispersion term
l //aggregate labor bundle
phi //labor disutility shock
F; //firm profits
varexo epsd epsphi epsmu_I epsA epsG epsm;
predetermined_variables k;
predetermined_variables G;
parameters h //consumption habits
betta //discount factor
gammma1 //capital utilization, linear term
gammma2 //capital utilization, quadratic term
delta //depreciation rate
kappa //capital adjustment costs parameter
eta //elasticity of substitution between labor varieties
epsilon //elasticity of substitution between goods varieties
varpsi //labor disutility parameter
gammma //inverse Frisch elasticity
chiw //wage indexation parameter
chi //price indexation
thetap //Calvo parameter prices
thetaw //Calvo parameter wages
alppha //capital share
Rbar //steady state interest rate
Gbar //steady state interest rate
PIbar //steady state inflation
gammmaR //interest smoothing coefficient Taylor rule
gammmaPI //feedback coefficient to inflation monetary policy rule
gammmay //feedback coefficient to output growth deviation in monetary policy rule
Phi //firms fixed costs
rhod //autocorrelation preference shock
rhoG // shock
rho
rhophi //autocorrelation labor disutility shock
Lambdamu //steady state growth rate of investmentment-specific technology
LambdaA //steady state neutral technology growth
LambdaG //steady state neutral technology growth
Lambdax //steady state growth rate of investment
LambdaYd //steady state growth rate of output
sigma_d //standard deviation preference shock
sigma_phi //standard deviation labor disutility shock
sigma_mu //standard deviation investment-specific technology
sigma_A //standard deviation neutral technology
sigma_G //standard deviation neutral technology
sigma_m; //standard deviation preference shock
//Note that the parameter naming in FV(2010) differs from FV(2006)
//Fixed parameters, taken from FV(2010), Table 2, p. 37
delta=0.025;
epsilon=10;
eta= 10;
Phi=0;
gammma2=0.001;
//Estimated parameters, taken from FV(2010), Table 3, p. 38, median estimate parameters
betta =0.998;
h=0.97;
varpsi =8.92;
gammma = 1.17;
kappa =9.51;
alppha =0.21;
thetap =0.82;
chi = 0.63;
thetaw =0.68;
chiw =0.620;
gammmaR =0.77;
gammmay =0.19;
gammmaPI =1.29;
PIbar = 1.0358948808339;
Gbar =1;
rhod = 0.12;
rhophi = 0.93;
rhoG = 0.2;
rho=1-rhoG;
sigma_A = -3.97;
sigma_G = -3.97;
sigma_d = -1.51;
sigma_phi =-2.36;
sigma_mu =-5.43;
sigma_m =-5.85;
Lambdamu =3.4e-3;
LambdaA = 2.8e-3;
/*
%%The following parameters are set in the steady state file as they depend on other
deep parameters (some were estimated in the original study). Setting them in the
steady state file means they are updated for every parameter draw in the MCMC
algorithm, while the parameters initialized here are only set once for the initial
values of the parameters they depend on:
gammma1=mu_z*mu_I/betta-(1-delta);
R=1+(PIbar*mu_z/betta-1);
Lambdax=exp(LambdaYd);
LambdaYd=(LambdaA+alppha*Lambdamu)/(1-alppha);
LambdaG=exp(LambdaYd);
*/
/*
The following model equations are the stationary model equations, taken from
FV(2006), p. 20, section 3.2.
*/
model;
//1. FOC consumption
d*(c-h*c(-1)*mu_z^(-1))^(-1)-h*betta*d(+1)*(c(+1)*mu_z(+1)-h*c)^(-1)=lambda;
//2. Euler equation
lambda=betta*lambda(+1)*mu_z(+1)^(-1)/PI(+1)*R;
//3. FOC capital utilization
r=gammma1+gammma2*(u-1);
//4. FOC capital
q=betta*lambda(+1)/lambda*mu_z(+1)^(-1)*mu_I(+1)^(-1)*((1-delta)*q(+1)+r(+1)*u(+1)-(gammma1*(u(+1)-1)+gammma2/2*(u(+1)-1)^2));
//5. FOC investment
1=q*(1-(kappa/2*(x/x(-1)*mu_z-Lambdax)^2)-(kappa*(x/x(-1)*mu_z-Lambdax)*x/x(-1)*mu_z))
+betta*q(+1)*lambda(+1)/lambda*mu_z(+1)^(-1)*kappa*(x(+1)/x*mu_z(+1)-Lambdax)*(x(+1)/x*mu_z(+1))^2;
//6-7. Wage setting
f=(eta-1)/eta*wstar^(1-eta)*lambda*w^eta*ld+betta*thetaw*(PI^chiw/PI(+1))^(1-eta)*(wstar(+1)/wstar*mu_z(+1))^(eta-1)*f(+1);
f=varpsi*d*phi*PIstarw^(-eta*(1+gammma))*ld^(1+gammma)+betta*thetaw*(PI^chiw/PI(+1))^(-eta*(1+gammma))*(wstar(+1)/wstar*mu_z(+1))^(eta*(1+gammma))*f(+1);
//8-10. firm's price setting
g1=lambda*mc*yd+betta*thetap*(PI^chi/PI(+1))^(-epsilon)*g1(+1);
g2=lambda*PIstar*yd+betta*thetap*(PI^chi/PI(+1))^(1-epsilon)*PIstar/PIstar(+1)*g2(+1);
epsilon*g1=(epsilon-1)*g2;
//11-12. optimal inputs
u*k/ld=alppha/(1-alppha)*w/r*mu_z*mu_I;
mc=(1/(1-alppha))^(1-alppha)*(1/alppha)^alppha*w^(1-alppha)*r^alppha;
//13. law of motion wages
1=thetaw*(PI(-1)^chiw/PI)^(1-eta)*(w(-1)/w*mu_z^(-1))^(1-eta)+(1-thetaw)*PIstarw^(1-eta);
//14. law of motion prices
1=thetap*(PI(-1)^chi/PI)^(1-epsilon)+(1-thetap)*PIstar^(1-epsilon);
G/Gbar=(G(-1)/Gbar)^rhoG*exp(rho*LambdaYd)*exp(epsG);
//15. Taylor Rule
R/Rbar=(R(-1)/Rbar)^gammmaR*((PI/PIbar)^gammmaPI*((yd/yd(-1)*mu_z)/exp(LambdaYd))^gammmay)^(1-gammmaR)*exp(epsm);
//16-17. Market clearing
yd=G+c+x+mu_z^(-1)*mu_I^(-1)*(gammma1*(u-1)+gammma2/2*(u-1)^2)*k;
yd=(mu_A*mu_z^(-1)*(u*k)^alppha*ld^(1-alppha)-Phi)/vp;
//18-20. Price and wage dispersion terms
l=vw*ld;
vp=thetap*(PI(-1)^chi/PI)^(-epsilon)*vp(-1)+(1-thetap)*PIstar^(-epsilon);
vw=thetaw*(w(-1)/w*mu_z^(-1)*PI(-1)^chiw/PI)^(-eta)*vw(-1)+(1-thetaw)*(PIstarw)^(-eta);
//21. Law of motion for capital
k(+1)*mu_z*mu_I-(1-delta)*k-mu_z*mu_I*(1-kappa/2*(x/x(-1)*mu_z-Lambdax)^2)*x=0;
//22. Profits
F=yd-1/(1-alppha)*w*ld;
//23. definition optimal wage inflation
PIstarw=wstar/w;
//exogenous processes
//24. Preference Shock
log(d)=rhod*log(d(-1))+epsd;
//25. Labor disutility Shock
log(phi)=rhophi*log(phi(-1))+epsphi;
//26. Investment specific technology
log(mu_I)=Lambdamu+epsmu_I;
//27. Neutral technology
log(mu_A)=LambdaA+epsA;
//28. Defininition composite technology
mu_z=mu_A^(1/(1-alppha))*mu_I^(alppha/(1-alppha));
%%G=mu_A^(1/(1-alppha))*mu_I^(alppha/(1-alppha));
end;
shocks;
var epsd; stderr exp(sigma_d);
var epsphi; stderr exp(sigma_phi);
var epsmu_I; stderr exp(sigma_mu);
var epsA; stderr exp(sigma_A);
var epsG; stderr exp(sigma_G);
var epsm; stderr exp(sigma_m);
end;
steady;
check;
stoch_simul(order=1,irf=20) yd c R G PI;
```

Not sure, but it could be the line

predetermined_variables G

G(t) is an exogenous shock and not a choice variable like K(t+1).