function [ys,params,check] = RCG_2014_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.
%%

uj = 0;
a = 1;
pie = 1;
kappa = kappass;
j = 0.1;
mc = 5/6;
R = 1/betas;
y_obs = 0;

betabtilde = kappa*betas + (1-kappa)*betab;
iota = 1- betabtilde + j*kappa*(1-betas);
bovery = (j*kappa*betas*(1-alphas)*mc)/iota;
cbovery = ((1-betabtilde)*(1-alphas)*mc)/iota;
csovery = 1-cbovery;
hb = ((1-betas)*(1-alphas)*mc)/(iota-mc*(betas - betabtilde)*(1-alphas));
hs = 1-hb;
qhbovery = (j*(1-alphas)*mc)/iota;

y = ((1-alphas)^((1-alphas)/(1+eta)))*(alphas^(alphas/(1+eta)))*(mc^(1/(1+eta)))*(cbovery^((alphas-1)/(1+eta)))*(csovery^(-alphas/(1+eta)));
cb = cbovery*y;
cs = csovery*y;
b = bovery*y;
q = qhbovery*(y/hb);
lambda = (betas-betab)/cb;

nb = ((1-alphas)^(1/(1+eta)))*(mc^(1/(1+eta)))*(y^(1/(1+eta)))*(cb^(-1/(1+eta)));
ns = (alphas^(1/(1+eta)))*(mc^(1/(1+eta)))*(y^(1/(1+eta)))*(cs^(-1/(1+eta)));

wb = (nb^eta)*cb;
ws = (ns^eta)*cs;

ub = log(cb) + j*log(hb) - (nb^(1+eta))/(1+eta);
us = log(cs) + j*log(hs) - (ns^(1+eta))/(1+eta);
vb = ub/(1-betab);
vs = us/(1-betas);
v = (1-betab)*vb + (1-betas)*vs;

%% 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.
%%