Code problem

I tried to run the Dynare code on this website: sites.google.com/site/pkaradi696/research, for the paper “A Model of Unconventional Monetary Policy,” kept getting this error code…

Starting Dynare (version 4.2.0).
Starting preprocessing of the model file …
ERROR: FA_model.mod:1.1: syntax error, unexpected $end
Error using dynare (line 126)
DYNARE: preprocessing failed

Can someone help? Thanks!

can you post the exact file? I don’t know why but I cannot open it from the website. Anyhow, my guess is that the problem is related to an “end” that is given twice. You know in Dynara you close each “section” with the end command, like:

model ;



end ;

shocks;


end ;

So somewhere (I think line 126) there is an “extra” end.

Kyriacos

Thanks so much. But the codes are all in a zip file and the zip file consists of many files, so I can’t post all of them here. I can email them to you directly if that’s ok…

Here are my codes. I kept getting the following error message:
ERROR: GKRepApril27.mod:7.12-35: Symbol varphi declared twice with different types!
I ran my codes a few months and it worked. But now it’s not working. Appreciate your help! Thanks!

var C R varrho varphi Rk Pm Ym L Q U In I_ss delta_c b G_ss G D F infl X;

varexo e_a e_ksi e_g e_Ne e_i;

Parameters betta sig hh chi0 varphi zetta lamba0 omega0 theta alfa delta G_over_Y eta_i epsilon gam gam_P rho_i kappa_pi kappa_y sigma_ksi rho_ksi sigma_a rho_a sigma_g rho_g sigma_Ne sigma_i L_mom RkmR_mom phi_mom kappa tau L0 K0;

betta = 0.99; % Discount rate
sig = 1; % Intertemporal elasticity of substitution
hh = 0.815; % Habit formation parameters
chi0 = 3.4; % Starting value for the labor utility weight
varphi = 0.276; % Inverse Frisch elasticity of labor supply
zetta = 7.2; % Elasticity of marginal depreciation wrt the utilization rate

lambda0 = 0.3815; % Starting value divertable fraction
omega0 = 0.002; % Starting value of proportional starting up funds
theta = 0.97155955; % The survival probability

alfa = 0.33; % Capital share
delta = 0.025; % Depreciation rate
G_over_Y= 0.2; % Government expenditures over GDP
eta_i = 1.728; % elasticity of investment adjusment cost

% Retail firms
epsilon = 4.167; % Elasticity of substitution between goods % problem with 1: C-D
gam = 0.779; % Calvo parameter
gam_P = 0.241; % Price indexation parameter

% Monetary Policy parameters
rho_i = 0.; %0 .8 % Interest rate smoothing parameter
kappa_pi= 1.5; % Inflation coefficient
kappa_y = -0.5/4; % Output gap coefficient

% Shocks
sigma_ksi = 0.05; % size of the capital quality shock
rho_ksi = 0.66; % persistence of the capital quality shock
sigma_a = 0.01; % size of the TFP shock
rho_a = 0.95; % persistence of the TFP shock
sigma_g = 0.01; % size of the government expenditure shock
rho_g = 0.95; % persistence of the government expenditure shock
sigma_Ne = 0.01; % wealth shock
sigma_i = 0.01; % monetary policy shock

% Targeted moments
L_mom = 1/3; % Steady state labor supply
RkmR_mom = 0.01/4; % steady state premium
phi_mom = 4; % steady state leverage

% Credit policy parameters
kappa = 10; % Credit policy coefficient for home local banks
tau = 0.001; % Costs of credit policy involving local banks

% Starting values for some steady state values
L0 = L_mom;
K0 = 9.5;

Never mind, problem solve! Thanks!

Hi,
I also tried to run this model in dynare. I am a completely greenhorn with dynare and for me it is really a mess with all these .m files.
I had a slightly different error message (maybe it depends on the different version):

*Starting Dynare (version 4.3.0).
Starting preprocessing of the model file …
ERROR: FA_model.mod:1.1: syntax error, unexpected $end

Error using dynare (line 114)
DYNARE: preprocessing failed *

Which “end” did you have to kick out in order to run the model properly or did you take another solution? I already searched the “useless” end but I did not find it…