dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2022-12-15T10:32:34Zhttps://git.dynare.org/Dynare/dynare/-/issues/1648Store info on deflator growth factor in M_ for each endo variables2022-12-15T10:32:34ZMarco RattoStore info on deflator growth factor in M_ for each endo variablesAssume we define a model with trend variables:
```
trend_var(growth_factor = exp(GYTREND0)) YTREND0;
trend_var(growth_factor = exp(GP0)) PY0;
// real variable
var (deflator=YTREND0) Y;
// price index
var (deflator=PY0) PY;
// nominal v...Assume we define a model with trend variables:
```
trend_var(growth_factor = exp(GYTREND0)) YTREND0;
trend_var(growth_factor = exp(GP0)) PY0;
// real variable
var (deflator=YTREND0) Y;
// price index
var (deflator=PY0) PY;
// nominal variable
var (deflator=YTREND0*PY0) YN;
```
It would be extremely useful if we had trace in `M_` of the preprocessed trends, e.g. similarly to name/long_name, there could be a cell list M_.endo_growth_factor, which would contain for the above example:
```
M_.endo_growth_factor(1) = {'exp(GYTREND0)'};
M_.endo_growth_factor(2) = {'exp(GP0)'}
M_.endo_growth_factor(3) = {'exp(GYTREND0)*exp(GP0)'};
```
for variables not trending it would be:
```
M_.endo_growth_factor(4) = {'1'};
```4.6https://git.dynare.org/Dynare/dynare/-/issues/1696fix parsing of user-provided command line arguments2022-12-06T17:47:52ZHoutan Bastanifix parsing of user-provided command line argumentsMatlab is actually quite good about keeping user-provided arguments together. See:
```
>> dynare example1 '-DA="nthn thnth"' -DB=[1,2, .3] -DB=( oe )
-DA="nthn thnth"
-DB=[1,2, .3]
-DB=( oe )
```
The output above comes from sim...Matlab is actually quite good about keeping user-provided arguments together. See:
```
>> dynare example1 '-DA="nthn thnth"' -DB=[1,2, .3] -DB=( oe )
-DA="nthn thnth"
-DB=[1,2, .3]
-DB=( oe )
```
The output above comes from simply printing the arguments of `varargin`.
We should be able to thus simply add single quotes around every user-provided argument in `dynare.m` and pass these directly to the preprocessor for processing. We'd then require that all strings be double-quoted and could potentially even handle macro expressions (not just base values) in `-D` arguments.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1355Allow adding auxiliary variables like Ramsey multipliers to var_list_2022-12-05T19:48:51ZJohannes PfeiferAllow adding auxiliary variables like Ramsey multipliers to var_list_The auxiliary variables are endogenous variables like every other variable. A call like
`ramsey_policy(instruments=(i),irf=13,planner_discount=betta,periods=200) x pi MULT_1;`
would be suficient to display IRFs for the multiplier 1. H...The auxiliary variables are endogenous variables like every other variable. A call like
`ramsey_policy(instruments=(i),irf=13,planner_discount=betta,periods=200) x pi MULT_1;`
would be suficient to display IRFs for the multiplier 1. However, the preprocessor does not allow adding `MULT_1` to the variable list, because:
`Unknown symbol: MULT_1`
We should allow adding any variable present in `M_.endo_names` to the `var_list_`. @houtanb Could you do this, please?
Related to http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=121174.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1531Add interface for flexible IRF-generation2022-04-21T19:45:03ZJohannes PfeiferAdd interface for flexible IRF-generationCreate block
```
generate_irfs(options_list);
(groupname1), exo_name1=1, exo_name 2=-0.5;
(groupname2), exo_name1=2, exo_name 3=-0.5;
end;
```
or alternatively (as suggested in #115 )
```
generate_irfs(options_list);
[ name='gr...Create block
```
generate_irfs(options_list);
(groupname1), exo_name1=1, exo_name 2=-0.5;
(groupname2), exo_name1=2, exo_name 3=-0.5;
end;
```
or alternatively (as suggested in #115 )
```
generate_irfs(options_list);
[ name='groupname1' ] exo_name1=1, exo_name 2=-0.5;
[ name='groupname1' ] exo_name1=2, exo_name 3=-0.5;
end;
```
where `options_list` can be (for now)
- `stderr_multiples` translating to `options_.irf_opt.stderr_multiples`
- `diagonal_only` translating to `options_.irf_opt.diagonal_only`
and where each line translates into
1. a cell array `options_.irf_opt.irf_shock_graphtitles` storing the group_name along the rows
2. a column of a matrix `options_.irf_opt.irf_shocks` of size M_.exo_nbr*n_lines where non-specified `var_exo` get a 0 entry.
If no line is provided, leave those fields empty.
The block translates into
1. setting of options_
2. a call to `oo_.irfs=generate_irfs(M_,options_,oo_)`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/1409Add an interface for setting initial condition of the Kalman filter2021-01-27T16:46:38ZStéphane Adjemianstepan@adjemian.euAdd an interface for setting initial condition of the Kalman filterSee discussion in #1395.See discussion in #1395.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1697Regression in LMMCP perfect foresight solver2020-12-02T21:55:49ZSébastien VillemotRegression in LMMCP perfect foresight solverThe simulation in `tests/lmmcp/rbcii.mod` fails to converge. The same file works with 4.5.
Once this is fixed, a check that convergence has indeed been obtained should be added, so that regressions may be detected earlier in the future.The simulation in `tests/lmmcp/rbcii.mod` fails to converge. The same file works with 4.5.
Once this is fixed, a check that convergence has indeed been obtained should be added, so that regressions may be detected earlier in the future.4.6Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/915Integrate convert_dyn_45_to_44 into convert_oo_.m2020-09-03T16:10:28ZJohannes PfeiferIntegrate convert_dyn_45_to_44 into convert_oo_.mSee the discussion in https://github.com/DynareTeam/dynare/commit/a93e0157e4ea0d3a2ee4d5b10842066a0a39c2e9#commitcomment-10984144
See the discussion in https://github.com/DynareTeam/dynare/commit/a93e0157e4ea0d3a2ee4d5b10842066a0a39c2e9#commitcomment-10984144
4.6Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1708Preprocessor fails to parse dates with negative date2020-06-30T12:10:36ZMichelJuillardPreprocessor fails to parse dates with negative date```
dates('-4Y');
```
translates in
```
dates('-dates('4Y')');
```
and
```
'-4Y'
```
translates in
```
'-dates('4Y')';
```
See attached *.mod file[test_negative_date.mod](/uploads/bd77dc2c55701ffd505b432a2071f86d/test_negative_date.mod...```
dates('-4Y');
```
translates in
```
dates('-dates('4Y')');
```
and
```
'-4Y'
```
translates in
```
'-dates('4Y')';
```
See attached *.mod file[test_negative_date.mod](/uploads/bd77dc2c55701ffd505b432a2071f86d/test_negative_date.mod)
The problem didn't appear in 4.5.74.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1706Fix wrong computation in third-order approximation in pruned_state_space.m2020-04-06T08:19:17ZJohannes PfeiferFix wrong computation in third-order approximation in pruned_state_space.mMattermost discussion 06/02/20Mattermost discussion 06/02/204.6Willi Mutschlerwilli@mutschler.euWilli Mutschlerwilli@mutschler.euhttps://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/1705Fix, clean and speed up discretionary_policy routines2020-02-12T16:18:04ZJohannes PfeiferFix, clean and speed up discretionary_policy routinesAs is `discretionary_policy_1.m` has various issues
1. At its end, we have
```
function ys=NondistortionarySteadyState(M_)
if exist([M_.fname,'_steadystate.m'],'file')
eval(['ys=',M_.fname,'_steadystate.m;'])
else
ys=zeros(M_.en...As is `discretionary_policy_1.m` has various issues
1. At its end, we have
```
function ys=NondistortionarySteadyState(M_)
if exist([M_.fname,'_steadystate.m'],'file')
eval(['ys=',M_.fname,'_steadystate.m;'])
else
ys=zeros(M_.endo_nbr,1);
end
```
which seems to miss the case of a `steady_state_model`-block. It's also not clear why we have this in any case. At the end of the function, we write `ys` based on this input. But throughout the function, like in
```
[U,Uy,W] = feval([M_.fname,'.objective.static'],zeros(endo_nbr,1),[], M_.params);
```
we assume the steady state to be 0.
2. The handling of error codes should be nested into the `print_info`-framework as opposed to always issuing errors.
3. The function is very verbatim in terms of providing diagnostics. That is useful in standalone code, but a bottleneck when run in a loop like `estimation` where we only want to discard infeasible draws without providing diagnostics.
4. The order of some checks is strange. We do computations on the model before checking e.g. whether the number of instruments is valid. We should be able to do this without computing the Jacobian. Also a check like this should only be done once in the context of estimation and does not belong into the core engine. This suggests a different factorization.
Related to https://git.dynare.org/Dynare/dynare/issues/11734.6Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/637M_.state_var2020-02-11T10:08:30ZMichelJuillardM_.state_varCurrently, the vector M_.state_var is created by the preprocessor only when estimation is taking place. Because, this vector contains information useful in any context involving linear representation, I suggest to create it in all cases....Currently, the vector M_.state_var is created by the preprocessor only when estimation is taking place. Because, this vector contains information useful in any context involving linear representation, I suggest to create it in all cases.
M_.state_var points to variables in declaration order, but is not sorted. This is confusing
In addition, dr_block copies it to oo_.dr. This is confusing.
4.6Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1431Port write_equation_tags to write_latex_static_model and write_latex_original...2020-02-04T14:35:04ZJohannes PfeiferPort write_equation_tags to write_latex_static_model and write_latex_original_modelSee https://github.com/DynareTeam/dynare/commit/14f4544a29eac182ff1f5840e5f9cc78b9efa7e0#commitcomment-21632978See https://github.com/DynareTeam/dynare/commit/14f4544a29eac182ff1f5840e5f9cc78b9efa7e0#commitcomment-216329784.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1701det_conditional_forecast doesn't set set options_.qz_criterium2020-02-03T17:37:21ZMichelJuillarddet_conditional_forecast doesn't set set options_.qz_criteriumWhen ``det_conditional_forecast`` is used by itself in a *.mod file as in the example of the manual options_.qz_criterium isn't set.
We should have
```
options_.qz_criterium = 1+1e-6;
```
at the beginning of the functionWhen ``det_conditional_forecast`` is used by itself in a *.mod file as in the example of the manual options_.qz_criterium isn't set.
We should have
```
options_.qz_criterium = 1+1e-6;
```
at the beginning of the function4.6https://git.dynare.org/Dynare/dynare/-/issues/1699Welfare under optimal discretionary policy not computed2020-01-30T14:50:04ZSébastien VillemotWelfare under optimal discretionary policy not computedAt least with `dennis_1.mod` and `Gali_discretion.mod` from `tests/discretionary_policy/`, the welfare (as stored in `oo_.planner_objective_value`) is a `NaN`. This is a regression from 4.5.
Unfortunately, the test at the end of `Gali_d...At least with `dennis_1.mod` and `Gali_discretion.mod` from `tests/discretionary_policy/`, the welfare (as stored in `oo_.planner_objective_value`) is a `NaN`. This is a regression from 4.5.
Unfortunately, the test at the end of `Gali_discretion.mod` did not catch the problem, because of the specific evaluation rules for `NaN`. This should also be fixed with some call to `isnan()`.4.6Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1694Identification tests fail for old matlab2020-01-24T17:25:41ZWilli Mutschlerwilli@mutschler.euIdentification tests fail for old matlabSome identification tests fail under MATLAB R2009b, see https://git.dynare.org/Dynare/dynare/-/jobs/12770. Some functions need to be replaced.Some identification tests fail under MATLAB R2009b, see https://git.dynare.org/Dynare/dynare/-/jobs/12770. Some functions need to be replaced.4.6Willi Mutschlerwilli@mutschler.euWilli Mutschlerwilli@mutschler.euhttps://git.dynare.org/Dynare/dynare/-/issues/1689Clarify licensing information for identification stuff2020-01-24T14:41:20ZSébastien VillemotClarify licensing information for identification stuffSee !1689
The information should be added in the corresponding headers, and in `license.txt`See !1689
The information should be added in the corresponding headers, and in `license.txt`4.6Willi Mutschlerwilli@mutschler.euWilli Mutschlerwilli@mutschler.euhttps://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/1687Interface and documentation for new shock decomposition functionalities2020-01-22T17:18:39ZSébastien VillemotInterface and documentation for new shock decomposition functionalitiesImplement the preprocessor changes needed for !1655.
The test `tests/shock_decomposition/ls2003_plot.mod` will need to be adapted for the new `squeeze_shock_decomposition` command.
Also add the related documentation.Implement the preprocessor changes needed for !1655.
The test `tests/shock_decomposition/ls2003_plot.mod` will need to be adapted for the new `squeeze_shock_decomposition` command.
Also add the related documentation.4.6Sébastien VillemotSébastien Villemot