function [ F ] = roolz( x , param)
%%%%%
%load parameters.mat

MC=param.MC;
b=param.b;
chi=param.chi;
w=param.w;
p=param.p;
eps=param.eps;
rho=param.rho;
betta=param.betta;
delta=param.delta;
u=param.u;
s=param.s;
theta=param.theta;
V=param.V;
lambda=param.lambda;
C=param.C;
Z=param.Z;
Psi=param.Psi;
r=param.r;
nu=param.nu;
R=param.R;
omega=param.omega;
k=param.k;
A=param.A;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%Define variables%%%%%%%%%%%%%%%%%%%
Q=x(1);Qt=x(2); qm=x(3);
qc=x(4); qt=x(5); a=x(6);
at=x(7); d =x(8);
 S=x(9); nbar=x(10); Y=x(11); cons=x(12);
  gam=x(13);diff=x(14);%k=x(22);
diff2=x(15);diff3=x(16); Omega=x(17);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Find w,MC,chi,b
% F(1)=w-k/(C*theta^(-lambda))*(1/0.4);
% F(2)=MC-(1/Z)*(w+k*((1-betta*(1-delta)*(1-s))/(C*theta^(-lambda))));
% F(3)=w-(chi*(MC*Z+betta*k*theta)+(1-chi)*b);
% F(4)=b-0.95*w;


F(1)=qm-R*nu*a/(S*omega*p);
F(2)=A*Q^(-eps)*(Q/qm)^(1-rho)/p-(1-betta*R*(1-nu))/(betta*R*nu);
F(3)=A*Qt^(-eps)*(Qt/qt)^(1-rho)/p-(1-betta*R*(1-nu))/(betta*R*nu);
F(4)=Q-S^(1/rho)*(omega*qm^(rho)+(1-omega)*qc^(rho))^(1/rho);
F(5)=Qt-S^(1/rho)*qt;
F(6)=d*r/Psi-((1+r-R)*(at-a)+Omega);
F(7)=d-S*(1-omega)*p*qc;
F(8)=at-S*p*qt/(R*nu);
F(9)=S*nbar-(1-u);
F(10)=nbar-(omega*qm+(1-omega)*qc)/Z;
F(11)=Y-(R*nu*a+d+Z);
F(12)=cons-((R-1)*a+Y-k*V);
F(13)=gam-(1-delta)*(p-MC)*(Z*nbar)/(r+delta);
F(14)=diff-(qc-qm);
F(15)=diff2-(qc-qt);
F(16)=diff3-((A*S^((1-rho-eps)/rho)/p)^(1/eps)-qc);
F(17)=Omega-(A*Q^(1-eps)/(1-eps)-A*Qt^(1-eps)/(1-eps)-S*p*(omega*qm...
+(1-omega)*qc-qt));
%F(18)=R*a/cons-0.816;%fraction of liquid assets in cons
%F(22)=gam-5.94*(w*nbar+k*s*nbar);
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here


end

