Question about Iacoviello (2005) model method

Dear all, I want to follow Iacoviello (2005)model in the paper(House Prices, Borrowing Constraints, and Monetary Policy in the Business Cycle). But the model has problem, so I decompose the model. In the basic model, there are households, entrepreneurs and monetary authorities.
X be the relative price of wholesale goods,so X is the gross markup of retail goods over wholesale goods. When there is no gross markup in the model, there is no problem. However , when thegross markup was added, there was a problem. I have checked the calculation of the steady state carefully. I’m sure there is no question. I can’t find the problem in the model,can anybody help me?
The problem is “There are 3 eigenvalue(s) larger than 1 in modulus
for 4 forward-looking variable(s)

The rank condition ISN’T verified!

MODEL_DIAGNOSTICS: No obvious problems with this mod-file were detected.
Error using print_info (line 45)
Blanchard Kahn conditions are not satisfied: indeterminacy

Error in stoch_simul (line 100)
print_info(info, options_.noprint, options_);

Error in WithEntrepreneur (line 303)
info = stoch_simul(var_list_);

Error in dynare (line 223)
evalin(‘base’,fname) ; ”Without_relativeprice.mod (2.9 KB)
WithEntrepreneur.mod (3.2 KB)

Summary

%----------------------------------------------------------------
% 1. Defining variables
%----------------------------------------------------------------

var y // output
ch // household consumption
ce // entrepreneur consumption
w // wages
l // labour
pi // inflation
r // risk-free rate of return
rk // rate of return on capital rent
k // capital
i // investment
x // x be the relative price of wholesale goods. x is the gross markup of retail goods over wholesale goods.
a // technology shocks
mu_r // monetary policy impact
;

varexo eps_a eps_r_surp ;

parameters alpha gamma sigmma delta beta theta beta1
kappa_r kappa_y kappa_pi rho_a rho_pi rho_r chi rho_x ce_ss
l_ss a_ss x_ss r_ss rk_ss
w_ss k_ss i_ss y_ss ch_ss ;

alpha = 0.5 ;
gamma = 1 ;
sigmma = 1 ;
delta = 0.035 ;
beta = 0.99 ;
beta1 = 0.985 ;
theta = 0.75 ;
rho_a = 0.5 ;
rho_x = 0.5;
rho_pi = 0.5 ;
rho_r = 0.5 ;
kappa_r = 0.5 ;
kappa_y = 0.5 ;
kappa_pi = 1.5 ;

l_ss = 1/3 ;
a_ss = 1 ;
x_ss = 1.05 ;
r_ss = 1 / beta ;
rk_ss = (1 / beta1 - (1 - delta)) ;
k_ss = (rk_ss * x_ss / alpha)^(1/(alpha - 1 ) ) * l_ss ;
w_ss = (1 - alpha ) * (rk_ss * x_ss / alpha)^( alpha /(alpha - 1)) / x_ss ;

y_ss = a_ss * k_ss^alpha * l_ss^(1 - alpha);

i_ss = 0.3318 * y_ss ;
ce_ss = 0.1389 * y_ss;

ch_ss = 0.5293 * y_ss ;

chi = ch_ss^(-sigmma) * w_ss / l_ss^gamma ;

%----------------------------------------------------------------
% 3. Model
%----------------------------------------------------------------

model(linear);

%%%%%%%%%% HOUSEHOLD PROBLEM %%%%%%%%%%%%%%%%%%%%%%%%%%%
//1. labor supply equation
w = sigmma * ch + gamma * l ;

//2. Euler equation

  • sigmma * ch = - sigmma * ch(+1) + (r - pi(+1) );

%%%%%%%%%% FIRM PROBLEM %%%%%%%%%%%%%%%%%%%%%%%%%%%
//3.Entrepreneurial Resource Constraints
ce_ss * ce + w_ss * l_ss * (w + l) + i_ss * i = y_ss * ( y - x ) / x_ss ;

//4. Capital accumulation equation
k = (1 - delta) * k(-1) + i_ss / k_ss * i ;

//5. Production Function
y = a + alpha * k(-1) + (1 - alpha) * l ;

//6. Entrepreneurial Euler equation2
ce = ce(+1) - (1/sigmma)*(rk(+1) * rk_ss /(rk_ss + 1 - delta) );

//7. wages condition
w = y - l - x ;

//8. Rate of return on capital
rk = y - k(-1) - x ;

//9. philipus curve
pi = beta1 * pi(+1) - (1 - theta)*(1 - beta1 * theta) * x / theta ;

%%%%%%%%%% EQUATION PROBLEM %%%%%%%%%%%%%%%%%%%%%%%%%%%
//10. resource equation
y = (ch_ss/y_ss) * ch + (ce_ss/y_ss) * ce(+1) + (i_ss/y_ss) * i ;

//11. Taylor Rule
r = kappa_r * r(-1) + (1 - kappa_r) * (kappa_y * y(-1) + kappa_pi * pi(-1)) + mu_r;

//shocks
a = rho_a * a(-1) + eps_a;
mu_r = rho_r * mu_r(-1) + eps_r_surp ;

end;

initval;

y=0.0;
ch=0.0;
w=0.0;
l=0.0;
pi=0.0;
r=0.0;
rk=0.0;
ce=0.0;
k=0.0;
i=0.0;
x=0.0;
a=0.0;
mu_r=0.0;
end;

resid(1);
steady;
check;
model_diagnostics;

shocks;
var eps_a =0.01^2;
var eps_r_surp =0.01^2;

end;

stoch_simul(irf=40,order=1,hp_filter=100,periods=2100)y ch pi r rk i x ;

Please do not cross-post. See Error about the basic NK model like Iacoviello (2005)model