Dear all：

When I attempt to a modeling of price addition of the retailer, question appears.It’s not a complicated problem.But I can’t find the problem, I’m tortured. Can someone can find out the error in my model? I would appreciate it very much.

deleverage12.mod (3.1 KB)

deleverage13.mod (2.7 KB)

model.pdf (113.6 KB)

%----------------------------------------------------------------

% 1. Defining variables

%----------------------------------------------------------------

var y ch ce w l pi r rk k i x

a ;

varexo eps_a ;

parameters alpha gamma sigmma delta beta theta nu omega lambda

kappa_r kappa_y kappa_pi rho_a rho_pi rho_r chi rho_x ce_ss s_ss

phi_f_ss phi_p_ss l_ss a_ss mu_p_ss x_ss r_ss rf_ss rk_ss

w_ss k_ss i_ss y_ss f_ss n_ss d_ss cb_ss ch_ss ;

alpha = 0.5 ;

gamma = 1 ;

sigmma = 1 ;

delta = 0.025 ;

beta = 0.99 ;

theta = 0.85 ;

nu = 0.97 ;

omega = 0.002 ;

lambda = 0.19 ;

rho_a = 0.5 ;

rho_x = 0.5;

rho_pi = 0.5 ;

rho_r = 0.5 ;

kappa_r = 0.8 ;

kappa_y = 0.5 ;

kappa_pi = 1.5 ;

phi_f_ss = 10 ;

phi_p_ss = 2 ;

l_ss = 1/3 ;

a_ss = 1 ;

mu_p_ss = 1;

q_ss = 1;

x_ss = 1.1;

r_ss = 1 / beta ;

rf_ss = (1 - nu * r_ss - phi_f_ss * omega )/ (phi_f_ss * nu ) + r_ss;

rk_ss = 1 / beta - (1 - delta) ;

k_ss = (rk_ss * x_ss / alpha)^(1/(alpha - 1 ) ) * l_ss ;

w_ss = (1 - alpha ) * (alpha^alpha / rk_ss^alpha)^(1/(1-alpha))/x_ss ;

i_ss = delta * k_ss ;

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

s_ss = k_ss / phi_p_ss ;

f_ss = k_ss - s_ss ;

n_ss = f_ss / phi_f_ss ;

d_ss = f_ss * (phi_f_ss - 1) / phi_f_ss;

ce_ss = y_ss/x_ss + f_ss - i_ss - rf_ss * f_ss - w_ss * l_ss;

cb_ss = (1 - nu) * (rf_ss * f_ss - r_ss * d_ss);

ch_ss = y_ss - cb_ss - ce_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 / x_ss *( y - x ) ;

//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 = beta * pi(+1) - (1 - theta)*(1 - beta * theta) * x / theta ;

%%%%%%%%%% BANK PROBLEM %%%%%%%%%%%%%%%%%%%%%%%%%%%

//10. resource equation

y = (ch_ss/y_ss) * ch + (ce_ss/y_ss) * ce + (i_ss/y_ss) * i ;

//11. Taylor Rule

r = kappa_r * r(-1) + (1 - kappa_r) * (kappa_y * y + kappa_pi * pi) ;

//shocks

a = rho_a * a(-1) + eps_a;

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;

end;

resid(1);

steady;

check;

model_diagnostics;

shocks;

var eps_a =0.01^2;

end;

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