function F=funcheck_LTV(x)


beta_p   = 0.996;
beta_e   = 0.975;
j        = 0.2;
phi      = 1; 
m_e_ss   = 0.35; 
defr_ss  = 0.92;
gam_p  = 1;
gam_e  = 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.5;    
phi_B    = 0.5;    
rho_A_e      = 0.95; 
rho_mk_y     = 0.5; 
rho_me      = 0.90129;

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

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) + beta_p * exp(lam_p);
 +exp(c_p)+exp(d_p)- exp(w_p) * exp(l_p) - (1+r_ib)*exp(d_p)- exp(J_R)/(gam_p);  
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)+beta_e*exp(lam_e)*(1+r_b)*defr_ss;
exp(c_e)+defr_ss*(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);
-exp(B)+gam_e*exp(b_ee);
-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);
-(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(m_e)- m_e_ss*(exp(Y1)/exp(Y1))^phi_y *(exp(B)/exp(B))^phi_B;
-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(m_e)+(1-rho_me)*m_e_ss + rho_me * exp(m_e);
-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