Shocks_file not working

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.
tfp_china.m (2.04 KB)
china_TFP_calc.xls (37 KB)
china_adjc.mod (3.07 KB)

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).


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.

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.

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?