function F=DSGE_19(x)

beta_p   = 0.996;
beta_e   = 0.975;
beta_i   = 0.975;
j        = 0.2;
phi      = 1; 
m_e_ss   = 0.35;
m_i_ss   = 0.70;
gam_p  = 1;
gam_e  = 1;
gam_i  = 1;
eps_y    = 6; 
mk_y_ss  = eps_y   / (eps_y  - 1);
alpha    = 0.20;
kappa_p  =  28.65;
kappa_i  = 5;
deltak    = 0.050;
piss     = 1.00;
r_ib_ss  = (piss/beta_p - 1) ;
theta        = 11; 
vi           = 0.09; 
mcspread = 0.0050;
delta_b      =  r_ib_ss + mcspread/vi;
rho_ib   = 0.77; 
phi_pie  = 1.50; 
phi_y    = 0.50; 
phi_AP   = 0;    
phi_B    = 0;   
rho_A_e      = 0.95;
rho_mk_y     = 0.50;
rho_defr     = 0.70;


c_p = x(1);
d_p = x(2);
lam_p=x(3);
l_p=x(4);
h_p=x(5);
c_i=x(6);
h_i=x(7);    
b_i=x(8);    
lam_i=x(9);   
s_i=x(10);   
c_e=x(11);
k_e=x(12); 
b_ee=x(13);
lam_e=x(14);
s_e=x(15);
l_pd=x(16);
y_e=x(17);
r_k=x(18);
pie=x(19);
mc_E=x(20);
J_R=x(21);
q_k=x(22);
x_p=x(23);
I=x(24);
C=x(25);
Y=x(26);
w_p=x(27);
B=x(28);
D=x(29);
K=x(30);
q_h=x(31);
H=x(32);
r_ib=x(33);
J_B=x(34);
r_b=x(35);
spread=x(36);
K_b=x(37);
R_b=x(38);
lev=x(39);
rr=x(40);
Y1=x(41);
mk_y=x(42);
A_e=x(43);
defr=x(44);

F=[exp(c_p) ^(-1)- exp(lam_p);  
-exp(lam_p)+beta_p*exp(lam_p)*(1+r_ib);
-exp(l_p)^phi+exp(lam_p)* exp(w_p);
 j * (1/ exp(h_p)) - exp(lam_p) * exp(q_h) + beta_p * exp(lam_p) * exp(q_h);
 +exp(c_p) + exp(q_h)*(exp(h_p)-exp(h_p))+exp(d_p)- exp(w_p) * exp(l_p) - (1+r_ib)*exp(d_p) - exp(J_R)/(gam_p);  
exp(c_i)^(-1)-exp(lam_i); 
exp(lam_i)-beta_i*(1-exp(defr))*exp(lam_i)*(1+exp(r_b))-exp(s_i)*(1+exp(r_b));
exp(c_i) + exp(q_h) * (exp(h_i) - exp(h_i)) + (1-exp(defr))*(1+exp(r_b))*exp(b_i)-exp(w_p)*exp(l_p)-exp(b_i);
-(1+exp(r_b))*exp(b_i)+exp(m_i_ss)*exp(q_h)*exp(h_i); 
j*(1/exp(h_i)) - exp(lam_i) * exp(q_h) + beta_i*exp(lam_i)*exp(q_h)+exp(s_i)*exp(m_i_ss)*exp(q_h);
exp(c_e)^(-1)-exp(lam_e);
-exp(w_p)+(1-alpha)*exp(y_e)/(exp(l_pd)*exp(x_p));
exp(s_e)*m_e_ss*exp(q_k)*(1-deltak)/(1+r_b)+beta_e*exp(lam_e)*(exp(q_k)*(1-deltak)+exp(r_k))-exp(lam_e)*exp(q_k);
-exp(lam_e)+exp(s_e)+(1-exp(defr))*beta_e*exp(lam_e)*(1+r_b);
exp(c_e)+(1-exp(defr))*(1+r_b)*exp(b_ee)+exp(w_p)*exp(l_pd)+exp(q_k)*exp(k_e)-exp(y_e)/exp(x_p)-exp(b_ee)-exp(q_k)*(1-deltak)*exp(k_e);
-exp(y_e)+exp(A_e)*(exp(k_e))^alpha*(exp(l_pd))^(1-alpha);
-(1+r_b)*exp(b_ee)+ m_e_ss*exp(q_k)*exp(k_e)*(1-deltak);
-exp(r_k)+alpha*exp(A_e)*exp(k_e)^(alpha-1)*(exp(l_pd))^(1-alpha)/exp(x_p);
-exp(K)+(1-deltak)*exp(K)+(1-kappa_i/2*(exp(I)/exp(I)-1)^2)*exp(I);
-1+exp(q_k)*(1-kappa_i/2*(exp(I)/exp(I)-1)^2-kappa_i*(exp(I)/exp(I)-1)*exp(I)/exp(I))+beta_e*exp(lam_e)/exp(lam_e)*exp(q_k)*kappa_i*(exp(I)/exp(I)-1)* (exp(I)/exp(I))^2;
-exp(mc_E)+1/exp(x_p);
1-exp(mk_y)/(exp(mk_y)-1)+exp(mk_y)/(exp(mk_y)-1)*exp(mc_E)-kappa_p*(exp(pie)-1)*exp(pie)+ beta_p* exp(lam_p)/exp(lam_p)*kappa_p*(exp(pie)-1)*exp(pie)*(exp(Y)/exp(Y));
-exp(C)+gam_p*exp(c_p)+gam_e*exp(c_e)+gam_i*exp(c_i);
-gam_e*exp(l_pd)+gam_p*exp(l_p);
-exp(B)+gam_e*exp(b_ee)+gam_i*exp(b_i);
-exp(D)+gam_p*exp(d_p);
-exp(K)+gam_e*exp(k_e);
-exp(B)+exp(D)+exp(K_b);
-exp(Y)+gam_e*exp(y_e);
-exp(Y)+exp(C)+exp(q_k)*(exp(K)-(1-deltak)*exp(K))+delta_b*exp(K_b);
-exp(H)+gam_p*exp(h_p)+gam_i*exp(h_i);
-(1+r_ib)+(1+r_ib_ss)^(1-rho_ib)*(1+r_ib)^rho_ib*((exp(pie)/piss)^phi_pie*(exp(Y1)/exp(Y1))^phi_y*(exp(q_k)/exp(q_k))^phi_AP*(exp(B)/exp(B))^phi_B)^(1-rho_ib);
-exp(A_e)+1-rho_A_e+rho_A_e*exp(A_e);
-exp(mk_y)+(1-rho_mk_y)*mk_y_ss+rho_mk_y*exp(mk_y);
-exp(defr)+(1-rho_defr)+rho_defr* exp(defr);
-exp(J_B)+(r_b*exp(B)-r_ib*exp(D)- theta/2*(exp(K_b)/exp(B)-vi)^2*exp(K_b));
-r_b+R_b+mcspread;
-spread+r_b-r_ib;
-R_b+theta*(exp(K_b)/exp(B)-vi)*(exp(K_b)/exp(B))^2+r_ib;
-exp(K_b)+((1-delta_b)*exp(K_b)+exp(J_B));
-rr+r_b- exp(pie);
-exp(Y1)+exp(C)+exp(I);
-exp(lev)+exp(B)/exp(K_b)];
end