Character unrecognized in simulation

Good evening,

I have an issue when running my code. I get that for line 2 there is an unrecognized character. This is bizarre since line 2 is a “blank” line.

Here is my code.

Hygem_noshocks.mod (12.2 KB)

I fixed various issues with the quoted strings in the long_names (single instead of double quote) and the name tags (no ' allowed for possessives). Now there is a problem in equation [name='18. Households energy price']. The first bracket never closes.
Hygem_noshocks.mod (12.2 KB)

Thank you. I’ve fixed equation 18.

I have the same issue but now with line 25 (B in var).

best regards

Hygem_noshocks.mod (12.2 KB)

You have the same bracket problem in [name='33. Firms energy price']

Oh sorry. Let me check all my brackets :sweat_smile:

I’ve checked everything. The equations should be fine now.

But still the same error “unrecognized character” at line 25.Hygem_noshocks.mod (12.3 KB)

Thanks again

In Dynare 4.6.1 I am getting

ERROR: Hygem_noshocks.mod: line 274, cols 49-54: Unknown symbol: Output

You did not define it. Note that line numbers are off by 1 due to the preprocessor command in line 1.

1 Like

Thank you. It’s working now.

I followed your Solow non stationary mod file for my demographic growth rate (L and g_n). However, when plotting I find odd results. L should start at 1 in period 0 and jump at 1.00201 in period 1. But it is not the case. It starts at 1.0368…

Hygem_noshocks.mod (11.0 KB)

Many thanks

Dynare does not succeed in solving the model:

Failed to solve perfect foresight model

So the output is meaningless.

Thank you.

I’m going to specify initval and endval with the analytical solution.
I have computed all variables at BGP in terms of the Output, that I fixed to 1. Should I, in initval and endval, write down every BGP equations (each depending on the Output and parameters), and write down that Output=(1+g)^T (meaning that output grows at g)?

I don’t know how that will affect the current problem, but generally, it is advisable to fully specify the initial and terminal conditions.

1 Like

I tried to simulate my model with the values I computed by hand for the BGP in initval, but I still get that the process failed. Is it generally a model problem? Maybe the ordering of my equations or variables …

Because I’ve carefully computed my BGP according to long-run values and parameters.

Do small perturbations around the initial steady state work?

I only tried to shock the labor growth rate. But the processor fails and gives me off results for aggregate labor. Should I try to shock another exogenous variable? (Im in a perfect foresight set up)

That’s hard to tell. You need to systematically find out what is going on. For starters, I would set growth to 0 and check whether transition to steady state works. Only then add growth without shocking something. Then take the next step.

Thank you. I’m going to do that and will get back to you if I have any issues.

Best regards

Good afternoon @jpfeifer,

The code works. However, there is something odd in the results. Why most of my variables jump a lot at period 1 (with or without the g_al shock)? (interest rate, hours worked growing a lot while it should be constant, etc). Hours worked growing is bizarre because I have a log-utility function, so they should be stationary along the BGP…

Note that my model has a BGP, and I start the simulation at 2018 values (most of variables are expressed in deviation from output). I’ve written down labor-saving growth rate such that it’s value can change through time. I’m not sure I’ve done it the right way.

HTP.mod (10.2 KB)

Thank you.

Where exactly can I see the presumed problems? From what I can see, the simulations look pretty normal. You have a growing economy and do not start on the BGP, so there will be a jump in the first period.

Oh okay. My issue was mainly with the big jump of the interest rate, and the growing hours worked. I thought hours worked would stayed stationary, while they grow too much. Any hint on how to make hours kind of stationary ? (maybe by taking these out of my utility function as they are not what I’l trying to explain in my model).

Thank you again @jpfeifer

Indeed, the movement of h is strange. Did you try what happens in your model without any shocks, i.e. along the BGP