Is there a way to suppress *all* Dynare output in Matlab?

I am using Dynare for an impulse response matching exercise. This requires running Dynare many times over for different parameter configurations in quick succession.

I know how to suppress all Dynare output related to the solution of the model, but is there a way to suppress the several lines of text it produces when you first call Dynare? You know, this part:

Starting Dynare (version 4.2.1).
Starting preprocessing of the model file …
Found 13 equation(s).
Evaluating expressions…done
Computing static model derivatives:

  • order 1
    Computing dynamic model derivatives:
  • order 1
    Processing outputs …done
    Preprocessing completed.
    Starting MATLAB/Octave computing.

I think eliminating this would speed up the exercise.

Thanks.

Hi, suppressing the output is not really what you want (and it is not possible by the way). In the end, you want to avoid preprocessing the model file in each run, because this is what takes the time and needs to be done only once. What you could do is either

  1. Integrate the IRF matching into the Dynare mod-file by looping over a stoch_simul command that generates the IRFs.

  2. Run Dynare with the preprocessor once. Then directly modify the m-file generated by this run. This has essentially the same effect as 1.

The trick is to use

set_param('parameter_name',parametervalue) before running stoch_simul again. If you use approach 2, you can replace the single stoch_simul command in the m-file by your code looping over the parameter-value setting and the stoch_simul IRF generation to minimize the distance.
IMPORTANT: If you use approach 2, you should add the folder with the Dynare mex-file to your path as this is usually done by the Dynare preprocessor and will be missing if you directly run the m-file.

Hi there,

I am trying to code impulse response matching but the parameter that I want to loop over affect the steady state of the model? Do I have run dynare every time I loop over a set of parameters? I am not sure looping over stoch_simul is what I should be doing?

Help is much appreciated. Many thanks.

Fede

Yes, you should be looping over stoch_simul using the construction outlined in
[Loop over parameters)
Whenever resol (or stoch_simul) is called, the steady state is recomputed.
You can also work from the replication codes to Born/Pfeifer (2014): “Risk Matters: A comment” at aeaweb.org/articles.php?doi=10.1257/aer.104.12.4231. Essentially, instead of solving the model and simulating it within the objective function to compute the distance between simulated and empirical moments, you retrieve the model IRFs and then compute the distance.

I plan on providing an example of this soon.