function [res]=steadystate_nontradable_fun(ss0,para)
beta=para(1,1);
theta=para(1,2);
chi=para(1,3);
psi=para(1,4); 
delta=para(1,5); 
m=para(1,6); 
nu=para(1,7); 
omega=para(1,8); 
mu=para(1,9);
mus=para(1,10); 
sigma_hf=para(1,11); 
gy=para(1,12);
sigmat_ss=para(1,13);
nun=para(1,14);%
sigma_nt=para(1,15);%
sigman_ss=para(1,16);
eta=para(1,17);
ztss=1;
ztsss=1;
znss=1;
znsss=1;


l=ss0(1,1);
lt=ss0(1,2);
ls=ss0(1,3);
lts=ss0(1,4);
w=ss0(1,5);
ws=ss0(1,6);



int=1/beta-1;
lnon=max(0,l-lt);
lns=max(0,ls-lts);
c=(w/chi*(1-l)^theta)^(1/theta);
cs=(ws/chi*(1-ls)^theta)^(1/theta);
rer=(cs/c)^(-theta);
kr=1/beta-1+delta;
kt=w/kr*nu/(1-nu)*lt;
kts=ws/kr*nu/(1-nu)*lts;
kn=w/kr*nun/(1-nun)*lnon;
kns=ws/kr*nun/(1-nun)*lns;
k=kt+kn;
ks=kts+kns;
inv=delta*(k);
invs=delta*(ks);
%g=gy*y;
y=m*(c+inv)/(1-m*gy);
%gs=gy*y;
ys=(1-m)*(cs+invs)/(1-(1-m)*gy);
ph=sigmat_ss/(sigmat_ss-1)*kr^nu*w^(1-nu)/(ztss^(1-nu)*nu^nu*(1-nu)^(1-nu));%w
pfs=sigmat_ss/(sigmat_ss-1)*kr^nu*ws^(1-nu)/(ztsss^(1-nu)*nu^nu*(1-nu)^(1-nu));%ws
phs=ph/rer;
pf=pfs*rer;
pt=(mu*(ph)^(1-sigma_hf)+(1-mu)*(pf)^(1-sigma_hf))^(1/(1-sigma_hf));
pts=((1-mus)*(phs)^(1-sigma_hf)+mus*(pfs)^(1-sigma_hf))^(1/(1-sigma_hf));
pn=sigman_ss/(sigman_ss-1)*kr^nun*w^(1-nun)/(znss^(1-nun)*nun^nun*(1-nun)^(1-nun));%w
pns=sigman_ss/(sigman_ss-1)*kr^nun*ws^(1-nun)/(znsss^(1-nun)*nun^nun*(1-nun)^(1-nun));%ws
yn=eta*pn^(-sigma_nt)*y;
yt=(1-eta)*pt^(-sigma_nt)*y;
yns=eta*pns^(-sigma_nt)*ys;
yts=(1-eta)*pts^(-sigma_nt)*ys;
yh=mu*(ph/pt)^(-sigma_hf)*yt;
yf=(1-mu)*(pf/pt)^(-sigma_hf)*yt;
yhs=(1-mu)*(phs/pts)^(-sigma_hf)*yts;
yfs=mu*(pfs/pts)^(-sigma_hf)*yts;


res(1,1)=yh+yhs-m*kt^nu*(ztss*lt)^(1-nu); %[ l, ls, lt, lts, w, ws]
res(1,2)=yf+yfs-(1-m)*kts^nu*(ztsss*lts)^(1-nu); %[ l, ls, lt, lts, w, ws]
res(1,3)=yn-m*kn^nun*(znss*lnon)^(1-nun);%[ l, lt, w]
res(1,4)=yns-(1-m)*kns^nun*(znsss*lns)^(1-nun);%[ ls, lts, ws]
res(1,5)=eta*pn^(1-sigma_nt)+(1-eta)*pt^(1-sigma_nt)-1;%[ l, ls, w, ws]
res(1,6)=eta*pns^(1-sigma_nt)+(1-eta)*pts^(1-sigma_nt)-1;%[ l, ls, w, ws]
