Initial paths in deterministic simulation

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Initial paths in deterministic simulation

Postby pkaradi » Mon Nov 02, 2009 2:48 pm

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
pkaradi
 
Posts: 6
Joined: Mon Oct 06, 2008 7:42 pm

Re: Initial paths in deterministic simulation

Postby SébastienVillemot » Tue Nov 03, 2009 9:49 am

Hi,

Use the "initval_file" command.

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

Synopsis

Code: Select all
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:
  • 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)

The command accepts three file formats:
  • 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

Warning

The extension must be omitted in the command argument. Dynare will automatically figure out the extension and select the appropriate file type.
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: Initial paths in deterministic simulation

Postby pkaradi » Tue Nov 03, 2009 11:12 am

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
pkaradi
 
Posts: 6
Joined: Mon Oct 06, 2008 7:42 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 15 guests