Shocks_file option

Hi all,

I cannot make the shocks_file option work and I was wondering if anybody can point out what I am doing wrong. I am using dyn_mat_v3_065

I write (in the .mod code):

[quote]shocks(shocks_file=shocks1);
end; [/quote]

and I have created in the same directory the shocks1.m file which includes the line:

where g01v is my only exogenous shock. However I get the error message:

[quote]??? Error using ==> dynare
syntax error at line 112
[/quote]

where line 112 is the line in the .mod file with end. What am I doing wrong?

Please note that if I instead write

[quote]shocks;
var g01v; periods 1; values 0.01;
end;[/quote]

the code does work.

Thank you very much!

This is actually my own reply to the benefit of those who may be facing the same issue…

It turns out that reading through the forum I have found Michael’s reply to Maile’s post on March 6th 2006 stating that:

“The specification of the shock in period 1 shouldn’t be necessary, but there is a bug in the parser that forces you to put it there”

In order to make my code work with the shocks_file option I thus have to write:

shocks(shocks_file=shocks1);
var eps;periods 1;value 0;
end;