dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2019-12-13T17:22:32Zhttps://git.dynare.org/Dynare/dynare/-/issues/1683Provide preprocessor warning that `simul` is deprecated2019-12-13T17:22:32ZJohannes PfeiferProvide preprocessor warning that `simul` is deprecatedWe provide a preprocessor warning that `ramsey_policy` is deprecated. We should provide a similar warning if `simul` is called that the recommended syntax is `perfect_foresight_setup` and `perfect_foresight_solver`.We provide a preprocessor warning that `ramsey_policy` is deprecated. We should provide a similar warning if `simul` is called that the recommended syntax is `perfect_foresight_setup` and `perfect_foresight_solver`.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1682Sort out correct order of blocks in perfect foresight Ramsey and document it2020-01-10T14:48:20ZJohannes PfeiferSort out correct order of blocks in perfect foresight Ramsey and document itUsually `steady` after `initval` computes a steady state. But with `ramsey_model`, one seems to need the `ramsey_model(planner_discount=0.99);` statement before the call to steady and therefore `initval`. Also, it is not clear what `stea...Usually `steady` after `initval` computes a steady state. But with `ramsey_model`, one seems to need the `ramsey_model(planner_discount=0.99);` statement before the call to steady and therefore `initval`. Also, it is not clear what `steady` does in this case. Is it the private sector equilibrium steady state or the Ramsey steady state that is computed.
Relevant test case: `optimal_policy/nk_ramsey_det.mod`4.6https://git.dynare.org/Dynare/dynare/-/issues/1681Model incorrectly detected as linear for ramsey_model2019-12-13T19:54:26ZJohannes PfeiferModel incorrectly detected as linear for ramsey_modelI am experiencing trouble with `ramsey_model` in `Ramsey_Example.mod`. If I use `stoch_simul` via `dynare Ramsey_Example -DOptimal_policy=0`, then
```
M_.nonzero_hessian_eqs = [0 1 2 5 6 7 9 10 11];
M_.hessian_eq_zero = isempty(M_.nonze...I am experiencing trouble with `ramsey_model` in `Ramsey_Example.mod`. If I use `stoch_simul` via `dynare Ramsey_Example -DOptimal_policy=0`, then
```
M_.nonzero_hessian_eqs = [0 1 2 5 6 7 9 10 11];
M_.hessian_eq_zero = isempty(M_.nonzero_hessian_eqs);
```
but with `ramsey_model` via `dynare Ramsey_Example`
```
M_.nonzero_hessian_eqs = [];
M_.hessian_eq_zero = isempty(M_.nonzero_hessian_eqs);
```
So for some reason the model is detected as being linear, which it is not4.6Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1680Adapt evaluate_planner_objective.m to higher order and perfect foresight2022-09-07T12:30:49ZJohannes PfeiferAdapt evaluate_planner_objective.m to higher order and perfect foresightSupersedes https://git.dynare.org/Dynare/dynare/issues/564 and is related to https://git.dynare.org/Dynare/dynare/issues/1678
See also https://forum.dynare.org/t/evaluate-planner-objective-in-non-linear-model/15492
Remaining:
- [x] fixi...Supersedes https://git.dynare.org/Dynare/dynare/issues/564 and is related to https://git.dynare.org/Dynare/dynare/issues/1678
See also https://forum.dynare.org/t/evaluate-planner-objective-in-non-linear-model/15492
Remaining:
- [x] fixing or documenting the regression in behavior introduced in e880d1bc. In contrast to previous behavior `histval` will be ignored. `planner_objective_value` now returns conditional and unconditional welfare instead of welfare for different values of the Lagrange multiplier. (done in !1923)
- [x] the question of an interface for setting the initial condition (https://git.dynare.org/Dynare/preprocessor/-/issues/64)
- [x] Adding higher order results to `evaluate_planner_objective`
- [x] Compute unconditional welfare at order>2
- [x] Documenting the recent changes6.xNormann RionNormann Rionhttps://git.dynare.org/Dynare/dynare/-/issues/1679Document epilogue2020-01-22T09:33:16ZSébastien VillemotDocument epilogueIt should also be added to the new features wiki page.It should also be added to the new features wiki page.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1678Provide interface to access evaluate_planner_objective.m2021-08-19T08:37:33ZJohannes PfeiferProvide interface to access evaluate_planner_objective.mAs noted in https://git.dynare.org/Dynare/dynare/issues/564#note_9765, `ramsey_policy` only allows for `order=1`. The solution is to replace it by
```
ramsey_model;
stoch_simul(order=2)
```
But the downside of this approach is that we do...As noted in https://git.dynare.org/Dynare/dynare/issues/564#note_9765, `ramsey_policy` only allows for `order=1`. The solution is to replace it by
```
ramsey_model;
stoch_simul(order=2)
```
But the downside of this approach is that we do not compute the welfare function in this case and one cannot add it to the model-block. For that reason, we need to provide the user with an interface to call `evaluate_planner_objective`4.6Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1677Exempt Ramsey instruments from warning in steady_state_model block2019-12-12T17:22:48ZJohannes PfeiferExempt Ramsey instruments from warning in steady_state_model blockCurrently, we provide a preprocessor warning if a variable has not been set in a `steady_state_model`-block. E.g.
>WARNING: in the 'steady_state_model' block, variable 'R' is not assigned a value
But if the user provides an instrument (...Currently, we provide a preprocessor warning if a variable has not been set in a `steady_state_model`-block. E.g.
>WARNING: in the 'steady_state_model' block, variable 'R' is not assigned a value
But if the user provides an instrument (`ramsey_policy(instruments=(R))`), the steady state file needs to be conditional on this instrument. So the warning points users to a wrong "fix".4.6Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1676Investigate macro-processor behavior related to defined() statement2019-12-10T15:53:50ZJohannes PfeiferInvestigate macro-processor behavior related to defined() statementI am running
```
@#if !defined(DEFINEDvar) || DEFINEDvar==0
@#echo "Good"
@#else
@#error "ELSE ERROR"
@#endif
```
and get
```
Macro-processing error: backtrace...
- Unknown variable DEFINEDvar
- binary operation: "macro.mod" line...I am running
```
@#if !defined(DEFINEDvar) || DEFINEDvar==0
@#echo "Good"
@#else
@#error "ELSE ERROR"
@#endif
```
and get
```
Macro-processing error: backtrace...
- Unknown variable DEFINEDvar
- binary operation: "macro.mod" line 1, col 29-42
- binary operation: "macro.mod" line 1, col 5-42
- @#if: "macro.mod" line 1, col 1 to line 5, col 7
```4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1673Nonlinear filters at k-order2020-02-17T09:28:31ZSébastien VillemotNonlinear filters at k-orderA MEX file for iterating in the state space (based on Dynare++) is already present in the `local_state_space_iteration_k` branch.
It needs to be tested and integrated in the estimation routines.A MEX file for iterating in the state space (based on Dynare++) is already present in the `local_state_space_iteration_k` branch.
It needs to be tested and integrated in the estimation routines.4.6Stéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dynare/-/issues/1672conditional_forecast should save its output in oo_2019-11-29T16:11:56ZSébastien Villemotconditional_forecast should save its output in oo_Currently, `conditional_forecast` stores its output in a file. This is inconsistent with the rest of Dynare commands, and renders the post-processing of this data less robust, because we have to reload that file from the hard drive (with...Currently, `conditional_forecast` stores its output in a file. This is inconsistent with the rest of Dynare commands, and renders the post-processing of this data less robust, because we have to reload that file from the hard drive (without the guarantee that it comes from the same Dynare session).
The output should be saved in a field of `oo_` (without changing the structure).
`plot_ic_forecast` needs to be adapted. `shock_decomposition` as well, once #1657 is done.
The various fields should also be documented.4.6https://git.dynare.org/Dynare/dynare/-/issues/1671Refactoring initval_file and histval_file2021-09-22T07:54:31ZMichelJuillardRefactoring initval_file and histval_file``initval_file`` and ``histvfal_file`` should be more flexible and have functionalities similar to option ``datafile``in ``estimation``
# Usage
## initval_file
- is used only in perfect foresight
- provides a guess value for computin...``initval_file`` and ``histvfal_file`` should be more flexible and have functionalities similar to option ``datafile``in ``estimation``
# Usage
## initval_file
- is used only in perfect foresight
- provides a guess value for computing the solution
- in absence of ``histval`` or ``histval_file`` provides the initial conditions for the simulation (we don't want to require users to upload two files for initial conditions and guess values
## histval_file
- is used for stochastic and perfect foresight models
- provides initial conditions
# Current implementation
## initval_file
- accept ``.m``, ``.mat``, ``.xls(x)``, ``.csv`` files
- modifies directly ``oo_.endo_simul``, ``oo_.exo_simul``, but not ``oo_.exo_det_simul``
## histval_file
- accept only files prepared by ``smoother2histval`` that uses odd format
- modifies directly ``oo_.endo_simul``, ``oo_.exo_simul``, but not ``oo_.exo_det_simul``
- note that ``histval`` sets a ``dseries`` object
# Proposal
1. have the same interface for ``initval_file`` and ``histval_file``
2. add an option ``dseries`` to be able to pass a ``dseries`` object
3. handle references to ``varexo_det`` variables
4. use the ``dseries`` interface to read files
5. ``initval_file`` and ``histval_file```set ``dseries`` object
6. modify ``make_y_`` ``make_ex_`` accordingly
7. handle auxiliary variables in a consistent manner (see #1004)
# Breaking changes
1. Documented behavior of ``initval_file``: None
2. Documented behavior of ``histval_file``: None
3. Documented behavior of ``perfect_foresight_setup``: the format of files designated in option ``filename`` has changed
4. Function ``initvalf.m``
* ``M_`` and ``options`` are added to inputs
* the old ``filename`` input triggers an error
* function ``initvalf()`` sets a result ``dseries`` on output
5. Function ``histvalf.m``
* ``M_`` and ``options`` are added to inputs
* the old ``filename`` input triggers an error
* function ``histvalf()`` sets a result ``dseries`` on output
* ``histvalf.m``doesn't recognize the old ``smoother2histval`` file format anymore.
6. Function ``smoother2histval.m``
* when an output file is requested ``smoother2histval()`` creates a ``.mat`` file containing a single ``dseries``
* ``smoother2histval.m`` saves now M_.orig_maximum_lag`` observations instead of ``oo_.maximum_lag`` in order to be able to recompute auxiliary variables
* It will not be possible to use a file saved with an previous version of ``smoother2histval``
# Questions
1. Is it a problem to have an optional ``dseries`` input in an instruction called ``initval_file`` and no file strictly speaking of?
WORK IN PROGRESS5.xMichelJuillardMichelJuillardhttps://git.dynare.org/Dynare/dynare/-/issues/1670Mac Package: see if we can use Homebrew `binutils` package to provide `as` an...2020-10-20T13:02:00ZHoutan BastaniMac Package: see if we can use Homebrew `binutils` package to provide `as` and `ld` and thus not install CLTThe idea is that if we can use Homebrew to provide `as` and `ld` then we can avoid installing Command Line Tools. I am not hopeful because `install_name_tool`, which is used to rename library paths when installing to a non-default direct...The idea is that if we can use Homebrew to provide `as` and `ld` then we can avoid installing Command Line Tools. I am not hopeful because `install_name_tool`, which is used to rename library paths when installing to a non-default directory is installed via Command Line Tools. The thing to check is whether this is used only when installing to non-default directories or whether it is always used. If it is always used, then CLT must not be required (though, it is located in `/Library/Developer/CommandLineTools/usr/bin/install_name_tool`)5.xhttps://git.dynare.org/Dynare/dynare/-/issues/1669Restore index of functions and commands in the manual2019-12-03T14:45:18ZSébastien VillemotRestore index of functions and commands in the manualIn the texinfo manual, there used to be an index for functions and commands (see https://www.dynare.org/manual/Command-and-Function-Index.html#Command-and-Function-Index).
This has been lost in the conversion to sphinx, and should there...In the texinfo manual, there used to be an index for functions and commands (see https://www.dynare.org/manual/Command-and-Function-Index.html#Command-and-Function-Index).
This has been lost in the conversion to sphinx, and should therefore be restored.
By the way, if this is technically feasible, and index of variables (fields of `M_`, `oo_`, …) would also be useful.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1668Tighten tolerance for first iteration in solve1()2019-12-12T17:59:24ZMichelJuillardTighten tolerance for first iteration in solve1()Currently solve1() uses the same tolerance level (``tolf``) to decide to start Newton iterations or to terminate them. I suggest the the tolerance above which to start Newton iterations should be tighter.
It is mainly useful for the si...Currently solve1() uses the same tolerance level (``tolf``) to decide to start Newton iterations or to terminate them. I suggest the the tolerance above which to start Newton iterations should be tighter.
It is mainly useful for the simulation of purely backward models. When the model is stationary, we expect the trajectory to converge asymptotically towards the steady state. This occurs as long as at least one iteration Newton takes place in each period. If the tolerance criteria is too lax, the simulation remains constant from too early a point.
**I suggest to use the square of ``tolf`` at the start of the computation**
For reference, csolve() always performs one Newton iteration. Matlab's fsolve() and lmmcp use a single tolerance level.https://git.dynare.org/Dynare/dynare/-/issues/1667Problem with command line options passed on the first line of a `.mod` file w...2020-01-23T17:58:43ZHoutan BastaniProblem with command line options passed on the first line of a `.mod` file when they are used in dynare.mWhen command line options are passed on the first line of a `.mod` file within `// --+ options: +--`, they are parsed by the preprocessor and ignored by `dynare.m`.
This ignores the options `nopathchange`, `nopreprocessoroutput`, `onlym...When command line options are passed on the first line of a `.mod` file within `// --+ options: +--`, they are parsed by the preprocessor and ignored by `dynare.m`.
This ignores the options `nopathchange`, `nopreprocessoroutput`, `onlymacro`, `onlyjson`, and `nolog`. An attempt to fix this was made with a regex for `nolog` but it is buggy (e.g. a command line argument such as `savemacro=,nolog,` would result in no Dynare log being created).4.6Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1666option for tolerance value in Modified Harmonic Mean estimator2019-12-12T11:58:40ZMarco Rattooption for tolerance value in Modified Harmonic Mean estimatorcurrently there is an hard-coded threshold set to 0.01 for the relative difference between the marginal likelihood computed withing the 1st and 9th deciles.
It might be helpful to allow modifying it with an explicit option, something lik...currently there is an hard-coded threshold set to 0.01 for the relative difference between the marginal likelihood computed withing the 1st and 9th deciles.
It might be helpful to allow modifying it with an explicit option, something like:
`options_.Modified_Harmonic_Mean_Tolerance`
with default 0.014.6Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1662Add support for linear models in perfect_foresight_problem MEX2019-11-27T13:11:54ZSébastien VillemotAdd support for linear models in perfect_foresight_problem MEXIn that case, the Jacobian needs not be recomputed for each period.In that case, the Jacobian needs not be recomputed for each period.Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1661`fast` option to dynare does not recompile every time the model changes2019-10-08T07:17:30ZHoutan Bastani`fast` option to dynare does not recompile every time the model changesThe temporary terms of the equations are not printed in the buffer on which the checksum is calculated. Hence, if the model is changed in a term that then becomes a temporary term, the checksum does not change.The temporary terms of the equations are not printed in the buffer on which the checksum is calculated. Hence, if the model is changed in a term that then becomes a temporary term, the checksum does not change.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1660Update documentation of dseries2024-01-29T20:51:00ZSébastien VillemotUpdate documentation of dseriesSince dseries have been substantially rewritten since 4.5, the documentation in the reference needs to be updated.Since dseries have been substantially rewritten since 4.5, the documentation in the reference needs to be updated.6.xStéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dynare/-/issues/1659Filter out non-positive definite Hessians before Laplace approximation2019-11-21T14:06:17ZJohannes PfeiferFilter out non-positive definite Hessians before Laplace approximationWe do not check whether the normal approximation underlying the Laplace approximation to the marginal data density makes any sense given the Hessian at hand. That results in wrong output, because the log determinant will be complex and M...We do not check whether the normal approximation underlying the Laplace approximation to the marginal data density makes any sense given the Hessian at hand. That results in wrong output, because the log determinant will be complex and Matlab only prints the real-valued parts.
See https://forum.dynare.org/t/hessian-matrix-at-the-mode-is-not-positive-definite-but-the-marginal-density-is-displayed-anyway/14510/3
Proposed solution: skip the computation of the Hessian is not positive semi-definite and return NaN.4.6Johannes PfeiferJohannes Pfeifer