Need Help with 'Blanchard Kahn Conditions Not Satisfied: Indeterminacy' Error

Hello Dynare Forum Community,

I hope this message finds you well. I’m currently working on a modeling project and have encountered an issue that I’m seeking assistance with. I’m receiving the following error message when running my Dynare code:

Blanchard Kahn conditions are not satisfied: indeterminacy

I have attached the relevant portions of my code for your reference. What’s a bit troublesome is that mod format files cannot be uploaded properly, so I can only use txt format files for uploading.

My understanding is that this error typically indicates that the model is not uniquely solvable, which could be due to a variety of reasons. However, I’m having trouble pinpointing the specific cause in my code. I’ve reviewed the equations, parameters, and initial values, but I’m still unable to resolve the issue.

Could you please help me identify potential reasons for this error? Any insights, suggestions, or debugging tips you can provide would be greatly appreciated.

Thank you in advance for your time and assistance. I’m looking forward to learning from your insights and suggestions.

Best regards
Yuxuan Qu
qumodelN.txt (3.0 KB)
qumodelN_steadystate.m (3.1 KB)
qumodelNfunction.m (1.5 KB)

var C_l C_h lambda_l lambda_h Y_l Y_h Y L_l L_h  K_l K_h r_l r_h W_l W_h P_h P_l A_l A_h H ;

varexo epsilon_l epsilon_h epsilon_He;

parameters
beta yita xi_l xi_h alpha_l alpha_h sigma_l sigma_h gamma_l gamma_h delta_l delta_h rho_l rho_h chi rho_He w1 w2 epsilon;

beta=0.99;	
yita=1/0.1526;
xi_l=0.05;
xi_h=0.05;
sigma_l =0.75;
sigma_h =0.5;
alpha_l=0.549;
alpha_h =0.535;
gamma_l =0.1;
gamma_h =0.2;
rho_l =0.95;
rho_h =0.95;
chi=4.4;
delta_l= -0.01;
delta_h= 0.01;
rho_He =0.95;
sigma_epsilon_l=0.01;
sigma_epsilon_h=0.01;
sigma_epsilon_He=0.01;
//epsilon = 0.284  ;
epsilon = 0.5; 
w1   = 0.329;
w2   = 0.671;

model;
(C_h^(-yita)-lambda_h) = 0;   // (1)
(C_l^(-yita)-lambda_l) = 0;   // (2)

// (3-4)
lambda_h(+1)* beta *(r_h(+1)-xi_h+1)-lambda_h = 0;
lambda_l(+1)* beta *(r_l(+1)-xi_l+1)-lambda_l = 0;

// (5-6)
-chi + lambda_h*W_h = 0;
-chi + lambda_l*W_l = 0;

// (7-8)
C_h + K_h - (1-xi_h) * K_h(-1) -r_h*K_h(-1)-W_h*L_h=0;
C_l + K_l - (1-xi_l) * K_l(-1) -r_l*K_l(-1)-W_l*L_l=0;

//(9-10)
Y_h = A_h * ( alpha_h * (H^gamma_h * K_h(-1))^((sigma_h - 1)/sigma_h) + (1-alpha_h)*(H^delta_h * L_h)^((sigma_h-1)/sigma_h) )^(sigma_h/ (sigma_h - 1));
Y_l = A_l * ( alpha_l * (H^gamma_l * K_l(-1))^((sigma_l - 1)/sigma_l) + (1-alpha_l)*(H^delta_l * L_l)^((sigma_l-1)/sigma_l) )^(sigma_l / (sigma_l - 1));

//(11-13)
w1*(Y/Y_h)^(1/epsilon)-P_h=0;
w2*(Y/Y_l)^(1/epsilon)-P_l=0;
Y - (w1*Y_h^((epsilon-1)/epsilon)+w2*Y_l^((epsilon-1)/epsilon))^(epsilon/(epsilon-1))=0;

//(14-15)
P_h * alpha_h*(Y_h/K_h(-1))^(1/sigma_h)*(A_h *H^gamma_h)^((sigma_h-1)/sigma_h)=r_h;
P_l * alpha_l*(Y_l/K_l(-1))^(1/sigma_l)*(A_l *H^gamma_l)^((sigma_l-1)/sigma_l)=r_l;

//(16-17)
P_h * (1-alpha_h)*(Y_h/L_h)^(1/sigma_h)*(A_h *H^delta_h)^((sigma_h-1)/sigma_h)=W_h;
P_l * (1-alpha_l)*(Y_l/L_l)^(1/sigma_l)*(A_l *H^delta_l)^((sigma_l-1)/sigma_l)=W_l;


//(18-19)
//K = K_h(-1) + K_l(-1);
//L= L_h + L_l;




//(20-21)
ln(A_l) = rho_l *ln(A_l(-1))+ epsilon_l;
ln(A_h) = rho_h *ln(A_h(-1)) + epsilon_h;
//(22)
ln(H) = rho_He*ln(H(-1))+epsilon_He;

//(14-16)
// CC_lh = ln(C_l)-ln(C_h);
// YY_lh = ln(Y_l)-ln(Y_h);
// LL_lh = ln(L_l)-ln(L_h);
// KK_lh = ln(K_l)-ln(K_h);
end;

resid;
steady;
resid;

//==========BLOCK 6======================================
// Defining the shocks and their variability:

shocks;
var epsilon_l =sigma_epsilon_l^2;
var epsilon_h =sigma_epsilon_h^2;
var epsilon_He =sigma_epsilon_He^2;
            
end;


//==========BLOCK 7======================================
// Impulse response functions

stoch_simul (irf = 50) C_h  C_l Y_h Y_l L_h L_l ;
//dyn2vec;

%qumodel_plot;

It seems you have two sectors. Is the split between sectors uniquely determined?