Page 1 of 1

shocks_file not working

PostPosted: Fri Dec 28, 2012 4:57 pm
by endi75
Dear developers,
I'd like to run a deterministic simulation of a neoclassical growth model with TFP shocks saved in an auxiliary file.
The reason is that the shocks depend on the calibration (the capital share and the depreciation parameters) and I'd like to automatize the process.
When I run the code with shocks manually included in the .mod file, the program works fine.
However, when I use "shocks(shocks_file=filename)" I get the error message: syntax error, unexpected '(', expecting ';'
I found another post with a similar problem but no solution.
I attach the three relevant files to run the code.
I'm using Dynare 4.2.0 on a Mac OS X.
Thanks,
AF

Re: shocks_file not working

PostPosted: Tue Jan 15, 2013 10:12 am
by SébastienVillemot
There is no "shocks_file" option. So it is no surprise that Dynare crashes. Where did you get the information about such an option?

Also, you should upgrade to the latest Dynare (4.3.1 as of the time of this writing).

Regards,

Re: shocks_file not working

PostPosted: Tue Jan 15, 2013 2:28 pm
by endi75
Sebastien,
See section 4.1.4 of the User Manual by Tommaso Mancini Griffoli (page 42).
As I mentioned in my original posts, I found other entries in the forum in which the problem was discussed (but not solved).
Perhaps it's an old command that has been discontinued in recent versions?
Is there an alternative in the current version?
Again, my problem is that I'd like to automatize the process that calculates TFP shocks as a function of the calibration.
Having an external file for the shocks is, in my view, the best solution but other suggestions are welcome.
Thanks,
A.

Re: shocks_file not working

PostPosted: Tue Jan 15, 2013 3:37 pm
by SébastienVillemot
Indeed the shocks_file option has been deprecated, and replaced by the initval_file command. Please see the corresponding entry in the reference manual.

I am going to fix the user guide so that it mentions initval_file instead of shocks_file.

Re: shocks_file not working

PostPosted: Tue Jan 15, 2013 3:54 pm
by endi75
Thanks.
Can I use the initval_file command to specify a sequence of exogenous shocks in a deterministic simulation?
Could you pls give an example, perhaps using the file I attached in my initial message?
Thanks,
A.