Page 1 of 1

shocks_file option

PostPosted: Thu Aug 09, 2007 9:40 pm
by dami
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):
shocks(shocks_file=shocks1);
end;

and I have created in the same directory the shocks1.m file which includes the line:
g01v=[0.01]

where g01v is my only exogenous shock. However I get the error message:
??? Error using ==> dynare
syntax error at line 112

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

Please note that if I instead write
shocks;
var g01v; periods 1; values 0.01;
end;

the code does work.

Thank you very much!

PostPosted: Mon Aug 27, 2007 2:10 am
by dami
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;