function [ys,params,check] = Zacek_2020_steadystate(ys,exo,M_,options_)% for dynare 4.5.6

 
%% DO NOT CHANGE THIS PART.
%%
%% Here we load the values of the deep parameters in a loop.
%%
NumberOfParameters = M_.param_nbr;
for ii = 1:NumberOfParameters
  paramname = M_.param_names{ii};
  eval([ paramname ' = M_.params(' int2str(ii) ');']);
end
% initialize indicator
check = 0;
%
%%


%% THIS BLOCK IS MODEL SPECIFIC.
%%
%% Here the user has to define the steady state.
%%

pie = 1;
A = 1;
q = 1;
R = 1/betap-1;
Rb = R;
Re = R + mul;
xe = epsilonp/(epsilonp-1);                                  
mb = mb_ss;

% solve for eight vars using eq. 2,4,5,6,8,9,10,21
fun = @(x)root270624(x, etap, xe, deltak, Re, alphae, etapen, mb, betae, R, nub );
x0 = [2, 6, 1.5, 1, 3, 0.1, 0.1, 0.6, 0.2, 0.01, 2, 0.05];
x = fsolve(fun,x0)

Y = x(1);
k = x(2);
w = x(3);
l = x(4);
b = x(5);
psib = x(6);
ce = x(7);
cp = x(8);
kc = x(9);
jc = x(10);
d = x(11);
deltab = x(12);

I = deltak*k;
lambdap = 1/cp;
lambdae = 1/ce;

C = ce + cp;
slope = (1+Re)*psib;
penalty = (1/etapen)*psib;
difff = (1+Re)*b - mb*q(+1)*(1-deltak)*k;

ss_leverage = ((1+Rb)*b)/((1-deltak)*k)
ss_by = b/Y
ss_iy = I/Y

%% END OF THE MODEL SPECIFIC BLOCK.

%% DO NOT CHANGE THIS PART.
%%
%% Here we define the steady state values of the endogenous variables of
%% the model.
%%
% %%
params=NaN(NumberOfParameters,1);
for iter = 1:length(M_.params) %update parameters set in the file
  eval([ 'params(' num2str(iter) ') = ' M_.param_names{iter} ';' ])
end

NumberOfEndogenousVariables = M_.orig_endo_nbr; %auxiliary variables are set automatically
for ii = 1:NumberOfEndogenousVariables
  varname = M_.endo_names{ii};
  eval(['ys(' int2str(ii) ') = ' varname ';']);
end

                                                           % End of the loop.
%%