ERROR: Illegal use of reserved keyword "end"

Hi all,
Thanks for considering this post.
As mentionned in the title, I keep getting the error:

"Error: File: VCbaxcru.m Line: 303 Column:
1
Illegal use of reserved keyword “end”.

Error in dynare (line 180)
evalin(‘base’,fname) ;"

Can someone help me out? Thanks a lot!
VCbaxcru.mod (2.78 KB)

Running the .m file yields the message that the steady state has no solution.
That may explain my issue.

If anyone has a better solution…

For your first problem, I think you placed a

“;”

in between the end of your parameter block and the beginning of your model block.

Once this was removed, the file initially ran, but as you mentioned, there is a problem with the model isolating a steady-state.

[quote=“VChamouleau”]Running the .m file yields the message that the steady state has no solution.
That may explain my issue.

If anyone has a better solution…[/quote]

You may also want to double-check your model equations…for example, for your first equation for each of the home and foreign the equation, which represents an Euler, I think (I am not familiar with the model you are working with) seems awkward as the consumption variables are contemporaneous rather than dynamic, which strikes me as odd.

Specifically, you have

p =((c^(theta))((1-n)^(1-theta))^(-sigma))theta(c^(1-theta))((1-n)^(1-theta));

which strikes me as odd because this can simply be written

p =((c^(theta))*((1-n)^(1-theta))^(1-sigma))*theta;

but I could be wrong here. In any case, your equation here struck me as slightly odd…hope this helps.

The first message comes from the

at the end of the parameter definitions. Parameter definitions do not go into a block that needs to be ended.
Also, as ACL suggested, check all your equations. The Euler equation looks strange. There are hardly any variables dated (+1). The FOC for capital also looks strange:

z =alpha*y/k(-1);
Shouldn’t the derivative with respect to capital have a

and not an alpha as in the wage equation?