# Initial paths in deterministic simulation

Dear All,

I am using the non-linear deterministic solver of dynare, and getting NaN-s for a particular version of the model (linear equations with non-linear policy rule and I am introducing the zero lower bound). My guess is that the problem might be related to the non-linear solver, and where it is looking for the solutions. I have a good idea how most of the values should look like (the results without the zlb are close), so they should be valid starting values for the paths of the variables (the initial and the terminal values are calculated successfully by the code.)

Is there a way I can enter these as initial paths to the deterministic simulation algorithm?

I would appreciate any help, thank you: Peter

Hi,

Use the “initval_file” command.

The documentation of the command reads as follows (not yet incorporated in the distributed reference manual):

Synopsis

``initval_file (filename = FILENAME) ;``

Description

In a deterministic setup, this command is used to specify a path for all endogenous and exogenous variables. The length of these paths must be equal to the number of simulation periods, plus the number of leads and the number of lags of the model (for example, with 50 simulation periods, in a model with 2 lags and 1 lead, the paths must have a length of 53). Note that these paths cover two different things:
[ul]
]the constraints of the problem, which are given by the path for exogenous and the initial and terminal values for endogenous/]
]the initial guess for the non-linear solver, which is given by the path for endogenous variables for the simulation periods (excluding initial and terminal conditions)/]
[/ul]

The command accepts three file formats:
[ul]
] M-file (extension .m): for each endogenous and exogenous variable, the file must contain a row vector of the same name/]
] MAT-file (extension .mat): same as for M-files/]
] Excel file (extension .xls): for each endogenous and exogenous, the file must contain a column of the same name/]
[/ul]

Warning

The extension must be omitted in the command argument. Dynare will automatically figure out the extension and select the appropriate file type.

Dear Sébastien,

Thank you very much for the quick response, I am sure I will use it in the future. Would it also accept a oo_.endo_simul matrix?

For this particular case, changing the step size of the Newton iteration (options_.slowc) from the default 1 to 0.1 and changing the maximum number of iterations (options_.maxit) have done the trick!

Thanks again: Peter