Hi,
I am running the following code. Whenever I run it on my system, it always hangs. But when one of my colleague runs it, this code runs well. System specifications are similar for both. Can I get some assistance as to how I can try running the same without hanging?
var y pi R pi_esr pi_elr y_row tfp pi_food pi_fuel;
varexo e_y e_pi e_esr e_elr e_yrow e_tfp e_food e_fuel;
parameters alph_y alph_pi alph_esr alph_elr delta_1 delta_2 delta_3 beta_11 beta_12 beta_13 beta_14 beta_2 beta_3 beta_4 beta_5 beta_6 beta_7 theta_esr theta_elr gamma_1 gamma_2 gamma_3 gamma_4 gamma_5 ar_yrow ar_tfp ar_food ar_fuel;
% Define steady-state values as parameters
parameters y_ss pi_ss R_ss pi_esr_ss pi_elr_ss y_row_ss tfp_ss pi_food_ss pi_fuel_ss;
% Steady-state values (assumed values, adjust as needed)
y_ss = 0; % Steady-state output gap
pi_ss = 0.02; % Steady-state inflation (2% annual)
R_ss = 0.03; % Steady-state nominal interest rate (3%)
pi_esr_ss = 0.02; % Steady-state short-run inflation expectations
pi_elr_ss = 0.02; % Steady-state long-run inflation expectations
y_row_ss = 0; % Steady-state foreign demand
tfp_ss = 0; % Steady-state technology
pi_food_ss = 0; % Steady-state food price inflation
pi_fuel_ss = 0; % Steady-state fuel price inflation
% Adjusted Parameter values
alph_y = -0.01;
delta_1 = 0.4; % Reduced persistence on y(-1)
delta_2 = 0.01; % Reduced sensitivity to real interest rate
delta_3 = 0.05; % Reduced impact of foreign demand
alph_pi = 0.5; % Reduced inflation persistence
beta_11 = 0.3; % Reduced lag persistence in inflation
beta_12 = 0.1; % Further reduction in inflation persistence
beta_13 = 0.05;
beta_14 = 0.01;
beta_2 = 0.1; % Reduced impact of short-run inflation expectations
beta_3 = -0.01; % Reduced impact of TFP
beta_4 = 0.05; % Balanced output-inflation trade-off
beta_5 = -0.2; % Reduced impact of external shocks
beta_6 = -0.1;
beta_7 = 0.2; % Reduced weight on expected inflation
alph_esr = 0.1;
theta_esr = 0.2; % Reduced persistence in SR inflation expectations
alph_elr = 0.2;
theta_elr = 0.4; % Reduced persistence in LR inflation expectations
gamma_1 = 0.4; % Reduced persistence in monetary policy
gamma_2 = 0.3; % Increased sensitivity to inflation
gamma_3 = 0.05; % Slightly increased sensitivity to output
gamma_4 = 0.01; % Reduced sensitivity to SR inflation expectations
gamma_5 = 0.01; % Reduced sensitivity to LR inflation expectations
ar_yrow = 0.1; % Reduced persistence in foreign demand
ar_tfp = 0.1; % Reduced persistence in TFP shocks
ar_food = 0.1; % Reduced persistence in food price shocks
ar_fuel = 0.1; % Reduced persistence in fuel price shocks
model(linear);
% 1. Aggregate Demand Equation
y = alph_y + delta_1 * y(-1) + delta_2 * (R - R_ss - (pi - pi_ss)) + delta_3 * y_row + e_y;
% 2. Aggregate Supply Equation
pi = alph_pi + beta_11 * pi(-1) + beta_12 * pi(-2) + beta_13 * pi(-3) + beta_14 * pi(-4) + beta_2 * pi_esr + beta_3 * tfp + beta_4 * y + beta_5 * (pi_esr(-4) - pi_food) + beta_6 * (pi_esr(-4) - pi_fuel) + beta_7 * (pi - pi_esr(-4)) + e_pi;
% 3. Short-Run Inflation Expectations Equation
pi_esr = alph_esr + theta_esr * pi_elr + (1 - theta_esr) * pi(-1) + e_esr;
% 4. Long-Run Inflation Expectations Equation
pi_elr = alph_elr + theta_elr * pi_elr(-1) + (1 - theta_elr) * pi(-1) + e_elr;
% 5. Monetary Policy Reaction Function (Interest Rate Rule)
R = gamma_1 * R(-1) + gamma_2 * pi + gamma_3 * y + gamma_4 * pi_esr + gamma_5 * pi_elr;
% 6. Autoregressive (AR(1)) Processes for Exogenous Variables
y_row = ar_yrow * y_row(-1) + e_yrow;
tfp = ar_tfp * tfp(-1) + e_tfp;
pi_food = ar_food * pi_food(-1) + e_food;
pi_fuel = ar_fuel * pi_fuel(-1) + e_fuel;
end; % End of model block
shocks;
var e_y; stderr 0.01;
var e_yrow; stderr 0.01;
var e_pi; stderr 0.01;
var e_esr; stderr 0.01;
var e_elr; stderr 0.01;
var e_tfp; stderr 0.01;
var e_food; stderr 0.01;
var e_fuel; stderr 0.01;
end;
initval;
y = y_ss;
pi = pi_ss;
R = R_ss;
pi_esr = pi_esr_ss;
pi_elr = pi_elr_ss;
y_row = y_row_ss;
tfp = tfp_ss;
pi_food = pi_food_ss;
pi_fuel = pi_fuel_ss;
end;
steady; % Compute steady state
check; % Check for Blanchard & Kahn conditions
stoch_simul(order = 1, irf = 20, hp_filter = 1600);