# Steady state convergence

Hi!

My model is indeed too long: 46 equations!
After several attempts I am not able to find the “right” initial values to compute the steady state.
How can I proceed?
I attach the model with the error messages.
Thank you for your help.
Amedeo

var y, ys, yu, yc, lambda_s, lambda_u, lambda_c, lambda_gu, lambda_gc, prs, ws, ns, rs, ks, pru, d, wu, nu, ru, ku, prc, pc, wc, nc, rc, kc, e, mdem, msu, ml, kappa, cl, cc, g, xs, xu, xc, R, Rs, Ru, Rc, prg, wu_g, wc_g, nu_g, nc_g;
varexo es, eu, ec, em;

parameters sigma_s, sigma_u, sigma_c, sigma_m, gamma, delta, zeta, tau_s, s, vartheta, acca, eta_l, eta_c, eta_m, q1, q2, q3, psi, varpi, rho, rho_u, rho_c, varkappa, Bu, Bc, tau_n, tau_k, omega_s, omega_u, omega_c, effe, elle, psi_gu, psi_gc;

sigma_s = 0.95;
sigma_u = 0.95;
sigma_c = 0.95;
sigma_m = 0.60;
gamma = 1/3;
delta = 1/4;
zeta = 1/5;
tau_s = 0.2;
s = 0.33;
vartheta = 0.4;
acca = 0.8;
rho = 0.99;
rho_u=0.9;
rho_c=0.85;
eta_l = 0.4;
eta_c = 0.05;
eta_m = 0.5;
q1 = 0.5;
q2 = 0.1;
q3 = 0.1;
psi = 3;
varpi = 2;
varkappa = 3.5;
Bu = 1.85;
Bc = 4;
tau_n = 0.4;
tau_k = 0.3;
omega_s = 0.09;
omega_u = 0.09;
omega_c = 0.09;
effe = 1/2;
elle =1/2;
psi_gu = 3;
psi_gc = 3;

model;
y = ys+yu+yc;//0,653
ys = lambda_s*((ks)^(gamma))((ns)^(1-gamma));//0.47 con k=0.94
yu = lambda_u
((ku)^(delta))((nu)^(1-delta));//0.1
yc = lambda_c
((kc)^(zeta))((nc)^(1-zeta));//0,083
lambda_s = 0.05+sigma_s
lambda_s(-1)+es;//1
lambda_u = 0.05+sigma_ulambda_u(-1)+eu;//0.8
lambda_c = 0.05+sigma_c
lambda_c(-1)+ec;//0,7
prs = ((1-tau_s)ys-(1+s)wsns-rsks);//0.14
pru = d*(yu-wunu-ruku)+(1-d)((1-tau_s)yu-(1+s)wunu-ku(ru+vartheta));//0.006
prc = e
(pcyc-wcnc-rckc);//-0.008
ml = mdem-msu;//0.36
kappa=ml/prc;//-44,39
msu = sigma_m
msu(-1)+acca*(ys+yu)+em;//1.14
cl+pccc+xs+xu+xc+mdem = mdem(-1)+(1-tau_n)wsns+(1-tau_k)rsks+d(wunu+ruku)+(1-d)((1-tau_n)wunu+(1-tau_k)ruku)+e(wcnc+rckc)+(1-e)wcnc+prs+pru+(1-kappa)prc;
xs = ks(+1)-(1-omega_s)ks;//0.08
xu = ku(+1)-(1-omega_u)ku;//0.0027
xc = kc(+1)-(1-omega_c)kc;//0,0027
d = 1-((wu_g)/((1/lambda_gu)+wu_g));//0.25
e = 1-((wc_g)/((1/lambda_gc)+wc_g));//0,68
R = Rs+Ru+Rc;
Rs = tau_s
ys+s
ws
ns+tau_n
wsns+tau_krsks;//0.17
Ru = (1-d)
(tau_syu+swunu+varthetaku+tau_nwunu+tau_kruku);//0.05
Rc = (1-e)(kc-wcnc);//-0,01
lambda_gu = Ru/((nu_g)^(effe));
lambda_gc= Rc/((nc_g)^(elle));
wu_g = lambda_gueffe((nu_g)^(effe-1))/(1+s);//0.18
wc_g = lambda_gcelle((nc_g)^(elle-1))/(1+s);//0.18
prg = R-wu_g-wc_g;//-0,15
g = prg;//-0,15
ws = ((1-tau_s)lambda_s((ks)^(gamma))(1-gamma)((ns)^(-gamma)))/(1+s);//0.26
rs = (1-tau_s)lambda_s((ks)^(gamma-1))(gamma)((ns)^(1-gamma));//0.13
wu = (lambda_u*((ku)^(delta))(1-delta)((nu)^(-delta)))(1-tau_s+dtau_s)/(1+s-ds);//0.30
ru = lambda_u
((ku)^(delta-1))(delta)((nu)^(1-delta))(1-(1-d)tau_s)-vartheta(1-d);//ku=0,03 e ru=0,26
wc/pc = lambda_c
((kc)^(zeta))(1-zeta)((nc)^(-zeta));//0.34
rc/pc = lambda_c*((kc)^(zeta-1))(zeta)((nc)^(1-zeta));//kc=0,03 e rc=0,39
eta_l*(1/(cl)^(q1))/((ns)^(psi))=1/((1-tau_n)ws);//cl=2,78
eta_l
(1/(cl)^(q1))/((nu)^(varpi))Bu=1/((1-d)(1-tau_n)wu+dwu);
eta_l*(1/(cl)^(q1))/((nc)^(varkappa))Bc=1/wc;
eta_c
(1/(cc)^(q2))=eta_l*(1/(cl)^(q1))pc;//cc=0,00000063403
eta_m
(1/(mdem)^(q3))=eta_l*(1/(cl)^(q1))+rhoeta_l(1/(cl(+1))^(q1));//m=1,5
((nu_g)^(psi_gu))=eta_l*(1/(cl)^(q1))((1-tau_n)wu_g);
((nc_g)^(psi_gc))=eta_l
(1/(cl)^(q1))
((1-tau_n)wc_g);
-eta_l
(1/(cl)^(q1))+rhoeta_l(1/(cl(+1))^(q1))((1-omega_s)+(1-tau_k)rs(+1)) = 0;
-eta_l
(1/(cl)^(q1))+rho_u
eta_l*(1/(cl(+1))^(q1))((1-omega_u)+d(+1)ru(+1)+(1-d(+1))(1-tau_k)ru(+1)) = 0;//d=0,25
-eta_l
(1/(cl)^(q1))+rho_c
eta_l*(1/(cl(+1))^(q1))*((1-omega_c)+e(+1)*rc(+1)) = 0;//e=0,68
y=cc+cl+xs+xu+xc+g;

end;

lambda_s=1;
lambda_u=1;
lambda_c=1;
d=0.25;
e=0.68;
rs=((1/rho)-(1-omega_s))/(1-tau_k);//0.14
ru=((1/rho_u)-(1-omega_u))/(1-tau_k+dtau_k);//0.19
rc=(((1/rho_c)-(1-omega_c))/e);//0,15
ws=((1-tau_s)lambda_s(1-gamma)
((1+s)^(gamma))((gamma/(1-gamma))^(gamma))((rs)^(-gamma)))^(1/1-gamma);//0.84
ns=1;
ks=4.03;
cl=((((ns)^(psi))((1-tau_n)ws))/eta_l)^(-1/q1);
wu=lambda_u
(1-delta)
(delta/(1-delta))((1-(1-d)tau_s)-vartheta(1-d)/(1-tau_s+dtau_s)/(1+s-ds))^(delta)((ru)^(-delta))((1-tau_s+dtau_s)/(1+s-ds))^(1/1-delta)+0.098256;//0.24
nu=(eta_l
(1/(cl)^(q1))/Bu)((1-d)(1-tau_n)wu+dwu)^(1/varpi);
ku=nuwu/ru(delta/(1-delta))((1-(1-d)tau_s)-vartheta(1-d)/(1-tau_s+dtau_s)/(1+s-ds));
wc=1.7;
nc=(((eta_l
(1/(cl)^(q1))/Bc)wc)^(1/varkappa));
kc=nc
wc/rc*((zeta)/(1-zeta));
ys = lambda_s*((ks)^(gamma))((ns)^(1-gamma));
yu = lambda_u
((ku)^(delta))((nu)^(1-delta));
yc = lambda_c
((kc)^(zeta))((nc)^(1-zeta));
prs = ((1-tau_s)ys-(1+s)wsns-rsks);
pru = d
(yu-wunu-ruku)+(1-d)((1-tau_s)yu-(1+s)wunu-ku(ru+vartheta));
prc = e
(2yc-wcnc-rckc);
y=ys+yu+yc;
xs = omega_s
ks;
xu = omega_uku;
xc = omega_c
kc;
msu=(acca*(ys+yu)+em)/(1-sigma_m);
Rs = tau_sys+swsns+tau_nwsns+tau_krsks;
Ru = (1-d)
(tau_syu+swunu+varthetaku+tau_nwunu+tau_kruku);
Rc = (1-e)(kc-wcnc);
R = Rs+Ru+Rc;
mdem=eta_m*(eta_l*(1/(cl)^(q1))+rhoeta_l(1/(cl)^(q1)))^(1/q3);
ml = mdem-msu;
kappa = ml/prc;
lambda_gu=1;
lambda_gc=1;
nu_g=((Ru/lambda_gu)^(1/effe));
nc_g=((Ru/lambda_gc)^(1/elle));
wu_g = lambda_gueffe((nu_g)^(effe-1))/(1+s);
wc_g = lambda_gcelle((nc_g)^(elle-1))/(1+s);
prg = R-wu_g-wc_g;
g = prg;
cc=y-cl-xs-xu-xc-g;
pc=(((1-tau_n)wsns+(1-tau_k)rsks+d*(wunu+ruku)+(1-d)((1-tau_n)wunu+(1-tau_k)ruku)+e(wcnc+rckc)+(1-e)wcnc+prs+pru+(1-kappa)prc-cl-xs-xu-xc)/((eta_l/eta_c)(1/(cl)^(q1)))^(-1/q2))^(q2/(q2-1));

end;

shocks;
var es = 0.009^2;
var eu = 0.009^2;
var ec = 0.009^2;
var em = 0.009^2;
end;

stoch_simul(irf=12, hp_filter=1600, order=1);

Configuring Dynare …
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Starting Dynare (version 4.3.2).
Starting preprocessing of the model file …
Found 46 equation(s).
Evaluating expressions…done
Computing static model derivatives:

• order 1
Computing dynamic model derivatives:
• order 1
Processing outputs …done
Preprocessing completed.
Starting MATLAB/Octave computing.

Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0
Equation number 9 : 0
Equation number 10 : 0.88688
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : -1.9309
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0.12675
Equation number 19 : 0.55675
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : 0
Equation number 23 : 0
Equation number 24 : 0
Equation number 25 : 3.4668
Equation number 26 : 0
Equation number 27 : 0
Equation number 28 : 0
Equation number 29 : 0
Equation number 30 : 0.28726
Equation number 31 : 0.037701
Equation number 32 : -0.030577
Equation number 33 : -0.064871
Equation number 34 : 26.871
Equation number 35 : 6.1941
Equation number 36 : -1.2458
Equation number 37 : 45.5594
Equation number 38 : 8.8235
Equation number 39 : 0.0041583
Equation number 40 : -0.61993
Equation number 41 : -2.3698
Equation number 42 : -2.3698
Equation number 43 : 0
Equation number 44 : 0
Equation number 45 : 0
Equation number 46 : 0

Error using print_info (line 55)
The steadystate file did not compute the steady state

Error in resid (line 116)
print_info(info,options_.noprint)

Error in steady (line 90)
resid;

Error in ame4 (line 339)