function [ys,check]=ftt_steadystate(junk, ys)

global M_ 
% options_

check=0;

% These are a puzzle (the loop below should do), but it just won't work otherwise.
beta=M_.params(1);
eta=M_.params(3);
psi=M_.params(6);
sigc=M_.params(8); 
eps=M_.params(2); 

for j=1:size(M_.param_names,1) 
  eval([deblank(M_.param_names(j,:)),' = M_.params(j);']) 
  assignin('base',deblank(M_.param_names(j,:)),M_.params(j)); 
end

% for j=1:size(M_.endo_names,1)
%     eval([deblank(M_.endo_names(j,:)),' = NaN;']) 
% end

%% STEADY STATE



p = 1;
pst = 1;
ph = 1;
phst = 1;
pf = 1;
pfst = 1;
xh = 1;
xhst = 1;
xf = 1;
xfst = 1;
s = 1;
es = 1;
stilde = s-es;
mu = 1;
must = 1;
r = mu/beta - 1;
rst = must / beta - 1 ;
% rho = 0;
bhst = 0;
bst = 0;
% b = 0;
% ct = 0;
w = (theta - 1)/theta;
ew = w;
wtilde = w - ew;
wst = (theta - 1)/theta;
l = ((theta-1)/theta/eta)^(1/(psi+sigc));
el = l;
ltilde=l-el;
lst = ((theta-1)/theta/eta)^(1/(psi+sigc));
c = l;
ec = c;
ctilde = c - ec; 
% chh = c;
cst = lst;
ch = om*c;
cf = (1-om)*c;
cfst = om*cst;
chst = (1-om)*cst;
m = p*c^(sigc/eps)*etam^(1/eps)*(1-1/(1+r))^(-1/eps);
mst = pst*cst^(sigc/eps)*etam^(1/eps)*(1-1/(1+rst))^(-1/eps);
% m = 2;
% mst = 2;
% etam = (m/p)^eps*chh^(-rho)*(1-1/(1+r));
t = 0;
tst = 0;
lam = c^(-sigc)/p;
lamst = cst^(-sigc)/pst;
% nu = 0;
emu = 0;
emust = 0;
% enu = 0;

% check

ys=[
    lam
%     chh
    p
    r
    m
    l
    el
    ltilde
    w
    ew
    wtilde
    ch
    chst
%     ct
    bhst
    s
    es
    stilde
    ph
    phst
    c
    ec 
    ctilde
    t
%     rho
%     b
    mu
    lamst
    cst
    pst
    rst
    mst
    lst
    wst
    cf
    cfst
    bst
    pf
    pfst
    must
    tst
%     nu
    xh
    xhst
    xf
    xfst];
