function [ys,check] = ea_ge10est2_steadystate(ys,exe)
global M_ lgy_

if isfield(M_,'param_nbr') == 1
NumberOfParameters = M_.param_nbr;
for i = 1:NumberOfParameters
  paramname = deblank(M_.param_names(i,:));
  eval([ paramname ' = M_.params(' int2str(i) ');']);
end
check = 0;
end



%%%% Model equations to be entered here
    betaa=0.99;                  %discount factor 
    RR=(1/betaa);
    deltaa=0.025;                %capital depreciation rate 
    S_ss=1+(0.02/4);            %SS level of the finance premium
    alphaa=0.3;                  %capital share on output 
    Rk=S_ss*RR;
    KNW=2;                      %capital net worth ratio	
    NWK=1/KNW;
    rhopi=1;        	
    lambdaw=3;                  %SS wage markup 
    %KY=8.8;
    %thetaf=0.00000001;
    %GY=0.195;
    %Z=0.04;
    thetaest=6;                 %goods elasticity of substitution 
    c_y=0.68;                    %consumption-output ratio
    gz=1;



%posterior means of estimated parameters

    vkappa=0.0267;              %elasticity of external finance premium w.r.t. the leverage ratio
    phim=0.9075;                %smooth parameter in instrument rule
    thetae=0.9797;              %entrepreneur's rate of survival   
    rhob=0.8969;                %persistence param. preference shock
    rhol=0.9707;                %persistence param. labor supply shock
    rhox=0.6941;                %persistence param. invest.specific shock
    rhoa=0.9644;                %persistence param. technology shock
    rhog=0.8685;                %persistence param. gov.spending shock
    rpi=1.6633;                 %response of int.rate to inflation
    ry=0.1054;                  %response of int.rate to output
    h=0.6551;                   %habit formation
    sigmal=2.0183;              %inverse of the elasticity of work effort w.r.t. real wage
    sigmac=1.5081;              %inverse of elasticity of substitution in consumption
    gammaw=0.3892;              %past wage indexation
    gammapi=0.2784;             %past inflation indexation
    cw=0.8768;                  %Calvo wage
    thetaa=0.8618;               %Calvo price
    pis=6.5431;                 %inverse of investments adjustment cost
    phii=0.2;                 %fixed cost over output
    FI=0.0294;                  %inverse elast. capital util. cost function
    rdeltapi=0.1417;            %response of int.rate to infl. first diff.
    rdeltay=0.2061;             %response of int.rate to output growth
    xie=0.7458;                 %Calvo employment



    Z_ss=S_ss*(1/betaa)-1+deltaa;
    mc_ss=(thetaest-1)/thetaest;
    abar=alphaa^alphaa*(1-alphaa)^(1-alphaa);
    w_ss=(mc_ss*abar/Z_ss^alphaa)^(1/(1-alphaa));
    l_k=(1-alphaa)/alphaa*(Z_ss/gz)/w_ss;
    k_y=l_k^(alphaa-1)*(1+phii)*gz^alphaa;
    inv_y=deltaa*l_k^(alphaa-1)*(1+phii); %inv/y
    GY=1-(c_y+inv_y);
    c_kap=(1-GY)/(1+phii)*l_k^(1-alphaa)-deltaa;  % c/k 
    kap_ss=( w_ss*(lambdaw-1)/lambdaw*((1-h)*c_kap)^(-sigmac)*l_k^(-sigmal) )^(1/(sigmac+sigmal));
    cons_ss=c_kap*kap_ss;
    inv_ss=deltaa*kap_ss;
    Y_ss=(cons_ss+inv_ss)/(1-GY);
    lab_ss=l_k*kap_ss;
    KY=kap_ss/Y_ss;

    ZF_ss=1/betaa-1+deltaa;
    mcF_ss=(thetaest-1)/thetaest;
    wF_ss=(mcF_ss*abar/ZF_ss^alphaa)^(1/(1-alphaa));
    l_kF=(1-alphaa)/alphaa*(ZF_ss/gz)/wF_ss;
    k_yF=l_kF^(alphaa-1)*(1+phii)*gz^alphaa;
    inv_yF=deltaa*l_kF^(alphaa-1)*(1+phii);
    g_yF=1-(c_y+inv_yF);
    c_kF=(1-g_yF)/(1+phii)*l_kF^(1-alphaa)-deltaa;  %c/k 
    kapF_ss=( wF_ss*(lambdaw-1)/lambdaw*((1-h)*c_kF)^(-sigmac)*l_kF^(-sigmal) )^(1/(sigmac+sigmal));
    consF_ss=c_kF*kapF_ss;
    invF_ss=deltaa*kapF_ss;
    yF_ss=(consF_ss+invF_ss)/(1-g_yF);
    labF_ss=l_kF*kapF_ss;
    KYF=kapF_ss/yF_ss;


% now the vars
    r=0;
    c=0;
    l =0;
    inv =0;
    q=0;  
    k =0;
    nw=0; 
    rk=0; 
    y =0;
    pi=0; 
    z =0;
    mc =0;
    a=0; 
    x=0; 
    eb =0;
    el =0; 
    S =0;
    g  = 0;
    rn=0; 
    wp=0; 
    EMP=0; 
    ypot =0;
      
    cf =0;
    invf =0;
    qf=0; 
    rkf =0;
    rf =0;
    kf =0;
    wpf=0; 
    lf=0; 
    zf =0;
    mcf =0;
    ug =0;
          
    y_obs =Y_ss/400;
    p_obs =3/400;
    c_obs =Y_ss/400;
    inv_obs=Y_ss/400;

    interest=0; 
    inflation=0; 
    inflationq=0; 
    output=0; 
    outputgap=0; 
    fispol  =0;

    
    


for iter = 1:length(M_.params)
  eval([ 'M_.params(' num2str(iter) ') = ' M_.param_names(iter,:) ';' ])
end

if isfield(M_,'param_nbr') == 1

if isfield(M_,'orig_endo_nbr') == 1
NumberOfEndogenousVariables = M_.orig_endo_nbr;
else
NumberOfEndogenousVariables = M_.endo_nbr;
end
ys = zeros(NumberOfEndogenousVariables,1);
for i = 1:NumberOfEndogenousVariables
  varname = deblank(M_.endo_names(i,:));
  eval(['ys(' int2str(i) ') = ' varname ';']);
end
else
ys=zeros(length(lgy_),1);
for i = 1:length(lgy_)
    ys(i) = eval(lgy_(i,:));
end
check = 0;
end
end
