dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2020-06-30T12:10:36Zhttps://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/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/1692Update doc for dynasave and dynatype2020-01-06T10:05:46ZHoutan BastaniUpdate doc for dynasave and dynatypeSplitting up #1691, update the doc for 4.6 and leave the other changes for 4.7Splitting up #1691, update the doc for 4.6 and leave the other changes for 4.74.6Houtan BastaniHoutan Bastanihttps://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/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/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/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/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/1647Add silent mode to perfect foresight simulations2019-09-12T12:50:55ZJohannes PfeiferAdd silent mode to perfect foresight simulationsSee https://forum.dynare.org/t/supressing-output-in-steady-and-simul-commands/13916See https://forum.dynare.org/t/supressing-output-in-steady-and-simul-commands/139164.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1646Save var_list_ used in stoch_simul to oo_2019-09-12T13:07:50ZJohannes PfeiferSave var_list_ used in stoch_simul to oo_If variables are selected after `stoch_simul`, fields like `oo_.var` will be matrices of the dimension of `var_list_`. But the info on `var_list_` is not stored. So if one loads results from a `_results.mat`-file, there is no way to reco...If variables are selected after `stoch_simul`, fields like `oo_.var` will be matrices of the dimension of `var_list_`. But the info on `var_list_` is not stored. So if one loads results from a `_results.mat`-file, there is no way to recover to which variables the entries in `oo_.var` belong.
The question is how to store this info as one can have several different `stoch_simul`-commands in a mod-file.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1639Add the possibility to use Matlab's namespace in model block2019-11-27T13:11:53ZStéphane Adjemianstepan@adjemian.euAdd the possibility to use Matlab's namespace in model block... or in `steady_state_model` block, where it should be possible to write something like:
```
z = example.z_steadystate();
```
provided that the file `+example/z_steadystate` exists.... or in `steady_state_model` block, where it should be possible to write something like:
```
z = example.z_steadystate();
```
provided that the file `+example/z_steadystate` exists.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1631Fix calls to dynamic routines in identification2019-01-09T14:19:54ZJohannes PfeiferFix calls to dynamic routines in identificationThe attached file contains a moving average process. It crashes identification in calls like
```
[residual, g1 ] = feval([M_.fname,'_dynamic'],yy0, ...
repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_....The attached file contains a moving average process. It crashes identification in calls like
```
[residual, g1 ] = feval([M_.fname,'_dynamic'],yy0, ...
repmat(oo_.exo_steady_state',[M_.maximum_exo_lag+M_.maximum_exo_lead+1]), M_.params, ...
oo_.dr.ys, 1);
```
Here, the period number (last argument) is always set to 1 instead of presumably `M_.maximum_exo_lag+1 `.
[dsge_mada_debt1.mod](/uploads/cad3e4c1ca2f06c5f85913d13b27a715/dsge_mada_debt1.mod)4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1602Fix predetermined_variables command with model-local variables2018-11-12T16:16:12ZJohannes PfeiferFix predetermined_variables command with model-local variablesThe mod-file
```
@#define predet=1
var K q;
@#if predet
predetermined_variables K;
@#endif
parameters
a b delta r alpha dt
K_inf q_inf;
a=1;
b=1;
delta = 0.023;
alpha = 0.33;
r = 0.01;
dt=1;
q_inf = 1+(1+a)*b*...The mod-file
```
@#define predet=1
var K q;
@#if predet
predetermined_variables K;
@#endif
parameters
a b delta r alpha dt
K_inf q_inf;
a=1;
b=1;
delta = 0.023;
alpha = 0.33;
r = 0.01;
dt=1;
q_inf = 1+(1+a)*b*delta^a;
K_inf = (((r+delta)*q_inf-a*b*delta^(a+1))/alpha)^(1/(alpha-1));
@#if predet==0
// Model block without predetermined_variables statement
model;
# I = K(-1)*((q-1)/((1+a)*b))^(1/a);
# w = alpha*K(-1)^(alpha-1)+a*b*(I/K(-1))^(a+1);
K = K(-1) + (I-delta*K(-1))*dt;
q(+1) = q + (r+delta)*q*dt - w*dt;
end;
@#else
// Model block with predetermined_variables statement
model;
# I = K*((q-1)/((1+a)*b))^(1/a);
# w = alpha*K^(alpha-1)+a*b*(I/K)^(a+1);
K(+1) = K + (I-delta*K)*dt;
q(+1) = q + (r+delta)*q*dt - w*dt;
end;
@#endif
steady_state_model;
K = K_inf;
q = q_inf;
end;
initval;
K = 20;
q = q_inf;
end;
endval;
K = K_inf;
q = q_inf1;
end;
check;
simul(periods=100, tolx=1e-12, tolf=1e-12, no_homotopy);
# I = K*((q-1)/((1+a)*b))^(1/a);
# w = alpha*K^(alpha-1)+a*b*(I/K)^(a+1);
K(+1) = K + (I-delta*K)*dt;
rplot K;
rplot q;
```
yields wrong results. The relevant parts of the dynamic file corresponding to
```
# I = K*((q-1)/((1+a)*b))^(1/a);
K(+1) = K + (I-delta*K)*dt;
```
are
```
I__ = y(2)*((y(3)-1)/((1+params(1))*params(2)))^(1/params(1));
lhs =y(2);
rhs =y(1)+params(6)*(I__-params(3)*y(1));
```
Here, `y(1)` stores `K` and `y(2)` stores `K(+1)`. As can be seen, in the created model-local variable, the capital stock is not shifted backwards, despite the `predetermined_variables` statement.
Upon fixing this, we should turn the file into a unit test.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1564echo list of macro-variables2018-09-10T12:35:47ZMarco Rattoecho list of macro-variableswould it be possible to set a command that prints the value of all macro-variables defined at a given point in the code? I am starting to have lots of macro flags and would be good to have this to trace back which kind of options have be...would it be possible to set a command that prints the value of all macro-variables defined at a given point in the code? I am starting to have lots of macro flags and would be good to have this to trace back which kind of options have been selected for a given experiment.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1537Stop processing with error if nonlinearities exist in endog/exog for linear m...2019-09-10T13:48:13ZHoutan BastaniStop processing with error if nonlinearities exist in endog/exog for linear modelFollowing the conversation in #1404, stop preprocessing with an error if a model is marked as linear but nonlinearities exist in the endogenous or exogenous variables.Following the conversation in #1404, stop preprocessing with an error if a model is marked as linear but nonlinearities exist in the endogenous or exogenous variables.4.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/1530Add interface for SMM/GMM2019-02-08T08:30:47ZJohannes PfeiferAdd interface for SMM/GMM1. Add commands `gmm_estimation` and `smm_estimation` modelled like `prior_function/posterior_function`-commands. Syntax should be
a. Command `gmm_estimation(options_list) var_list_`
translating to
`[M_,oo_,estim_params_,bayestopt_,da...1. Add commands `gmm_estimation` and `smm_estimation` modelled like `prior_function/posterior_function`-commands. Syntax should be
a. Command `gmm_estimation(options_list) var_list_`
translating to
`[M_,oo_,estim_params_,bayestopt_,dataset_,dataset_info]=GMM_SMM_estimation_core(var_list_,M_,options_,oo_,estim_params_,bayestopt_,dataset_,dataset_info,'GMM');`
where `var_list_` is the list of variables provided.
The command `smm_estimation(options_list)` should lead to the same output, but with the last string being `'SMM' `
2. The options_list should share the following options with `estimation`
- `datafile`
- `silent_optimizer`
- `dirname`
- `xls_sheet`
- `xls_range`
- `nobs`
- `first_obs`
- `loglinear`
- `logdata`
- `nograph`
- `graph_format`
- `mode_file`
- `huge_number`
- `optim`
- `tex`
- `solve_algo`
- `aim_solver`
- `irf`
- `irf_shocks`
- `irf_plot_threshold`
- `qz_zero_threshold`
3. GMM/SMM common options written to different subfields of `options_.smm` or `options_.gmm` (depending on the respective command)
- `order` translating to `options_.gmm.order`
- `centered_moments` translating to `options_.gmm.centeredmoments`
- `verbose` translating to `options_.gmm.verbose`
- `autolag` translating to `options_.gmm.autolag`
- `recursive_order_estimation` translating to `options_.gmm.recursive_estimation`
- `mode_compute` translating to `options_.gmm.mode_compute`
- `newey_west_bandwith` translating to `options_.gmm.qLag`
- `optimal_weighting_matrix` translating to `options_.gmm.optimal_weighting`
- `use_prior` translating to `options_.gmm.use_prior`
4. Additional options for `smm_estimation` only, written to `options_.smm`:
- `simulation_multiple` translating to `options_.smm.simulation_multiple`
- `smm_drop` translating to `options_.smm.drop`
- `seed` translating to `options_.smm.seed`
- `bounded_support` translating to `options_.smm.bounded_support`
5. New options to `estimation`, `stoch_simul`, and `gmm_estimation`/`smm_estimation`
- `analytical_GIRF` translating to `options_.irf_opt.generalized_irf`
- `IRF_in_percent` translating to `options_.irf_opt.percent`
- `EMAS_GIRF` translating to `options_.irf_opt.ergodic_mean_irf`
- `EMAS_drop` translating to `options_.irf_opt.EM.drop`
- `EMAS_tolf_` translating to `options_.irf_opt.EM.tolf`
- `EMAS_max_iter` translating to `options_.irf_opt.EM.iter`4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1519check repeated variables in symbol_list for stoch_simul2019-09-10T09:13:59ZHoutan Bastanicheck repeated variables in symbol_list for stoch_simuldo this during `transformPass`, issue warning and remove second symbol when encountered.do this during `transformPass`, issue warning and remove second symbol when encountered.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1509allow preprocessor to accept text input instead of mod file2019-06-19T15:37:42ZHoutan Bastaniallow preprocessor to accept text input instead of mod filefor GUI interface, create a preprocessor argument that would be the `.mod` file in string format. This way the GUI would not have to make a `.mod` file every time the user changed somethingfor GUI interface, create a preprocessor argument that would be the `.mod` file in string format. This way the GUI would not have to make a `.mod` file every time the user changed something4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1507Make log and ln operators in LaTeX code2019-06-19T15:37:42ZJohannes PfeiferMake log and ln operators in LaTeX codeWhen requesting LaTeX output, we should output `log` and `ln` as `\log` and `\ln` to make them operators that are correctly set typographically.When requesting LaTeX output, we should output `log` and `ln` as `\log` and `\ln` to make them operators that are correctly set typographically.4.6Houtan BastaniHoutan Bastani