function Feqss=xss_house_v6(xh)

global lambdal_ss pbetal ra_ss pia_ss br_ss ltva_ss lambdar_ss pbetar mu_ss ptau housestock;
global lambdalf_ss pbetalf rb_ss pib_ss brf_ss ltvb_ss lambdarf_ss pbetarf muf_ss ptauf housestockf;

% xh(1) = pjota
% xh(2) = hr_ss
% xh(3) = hl_ss
% xh(4) = phouse_ss
% xh(5) = pjotaf
% xh(6) = hrf_ss
% xh(7) = hlf_ss
% xh(8) = phousef_ss
      
Feqss  = [ xh(1)/xh(3) - lambdal_ss*xh(4)*(1-pbetal);
           ra_ss/pia_ss*br_ss - ltva_ss*xh(4)*xh(2);
           xh(1)/xh(2) - xh(4)*(lambdar_ss - pbetar*lambdar_ss - mu_ss*ltva_ss*pia_ss);
           housestock - ptau*xh(2)-(1-ptau)*xh(3);
           xh(5)/xh(7) - lambdalf_ss*xh(8)*(1-pbetalf);
           rb_ss/pib_ss*brf_ss - ltvb_ss*xh(8)*xh(6);
           xh(5)/xh(6) - xh(8)*(lambdarf_ss - pbetarf*lambdarf_ss - muf_ss*ltvb_ss*pib_ss);
           housestockf - ptauf*xh(6)-(1-ptauf)*xh(7);];
       
      