dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2019-06-19T15:37:54Zhttps://git.dynare.org/Dynare/dynare/-/issues/1073move test suite timing to bokeh2019-06-19T15:37:54ZHoutan Bastanimove test suite timing to bokeh- store commit number + date of test run
- two y-axes : 1 for matlab test, 1 for octave
- store commit number + date of test run
- two y-axes : 1 for matlab test, 1 for octave
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1074test suite timing: when a test is run more than once on a given day, keep the...2019-06-19T15:37:54ZHoutan Bastanitest suite timing: when a test is run more than once on a given day, keep the last run4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1069prevent test suite from failing when a call to octave/matlab fails2019-06-19T15:37:54ZHoutan Bastaniprevent test suite from failing when a call to octave/matlab failsAdd a `-` in front of the calls to octave/matlab. Then add a script afterward that will test for the existence of the `.trs` file and, if it doesn't exist, create it with some information that will allow it to be separated later in the e...Add a `-` in front of the calls to octave/matlab. Then add a script afterward that will test for the existence of the `.trs` file and, if it doesn't exist, create it with some information that will allow it to be separated later in the email
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1070un-revert 48257450475c306c03fdcbea9901bb3ab9fb8293 and 62b1c85fd4638cb01435d3...2019-06-19T15:37:54ZHoutan Bastaniun-revert 48257450475c306c03fdcbea9901bb3ab9fb8293 and 62b1c85fd4638cb01435d35ed2458a538d897d2fThey were reverted to simplify the debugging of the test suite due to the upgrade to Debian Jessie
They were reverted to simplify the debugging of the test suite due to the upgrade to Debian Jessie
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1059Make names of model-local variables TeX-compatible2019-06-19T15:37:54ZJohannes PfeiferMake names of model-local variables TeX-compatibleIn particular, replace underscores. See https://github.com/DynareTeam/dynare/issues/263#issuecomment-139540237
Potentially, we might allow defining a TeX-name for them.
In particular, replace underscores. See https://github.com/DynareTeam/dynare/issues/263#issuecomment-139540237
Potentially, we might allow defining a TeX-name for them.
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1051Eliminate the global variable objective_function_penalty_base2019-06-19T15:37:54ZTom HoldenEliminate the global variable objective_function_penalty_baseThis causes problems when the estimation function is evaluated in parallel, using fmincon's 'UseParallel','always' or similar. Further problems with parallel objectives are given in this issue: https://github.com/DynareTeam/dseries/issue...This causes problems when the estimation function is evaluated in parallel, using fmincon's 'UseParallel','always' or similar. Further problems with parallel objectives are given in this issue: https://github.com/DynareTeam/dseries/issues/10
4.5Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1047Make Ramsey and discretionary_policy mutually exclusive via preprocessor2019-06-19T15:37:54ZJohannes PfeiferMake Ramsey and discretionary_policy mutually exclusive via preprocessorFollows discussion on mailing list on 31/08/2015.
Follows discussion on mailing list on 31/08/2015.
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1040check_matlab_path.m fails if there are files with single letter file names2019-02-08T08:30:47ZTom Holdencheck_matlab_path.m fails if there are files with single letter file namesLine 131 is as follows:
```
if isequal(dd(f).name(end-1:end),'.m')
```
If the file name is length 1, then end-1 evaluates to a 0, causing an error. A fix is included in this commit: https://github.com/tholden/dynare/commit/99742309d2fe...Line 131 is as follows:
```
if isequal(dd(f).name(end-1:end),'.m')
```
If the file name is length 1, then end-1 evaluates to a 0, causing an error. A fix is included in this commit: https://github.com/tholden/dynare/commit/99742309d2fe3468bcdc7074a0120be00222912b
in which that line is changed to:
```
if strcmpi(dd(f).name(max(1,end-1):end),'.m')
```
4.5Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1035Add option to save kernel density for posterior objects2019-06-19T15:37:54ZJohannes PfeiferAdd option to save kernel density for posterior objectsThis allows for example getting the posterior density of forecasts.
It simply requires adjusting `pm3.m` to save the objects that can already be computed via `posterior_moments`.
I would propose to call the option `posterior_kernel_dens...This allows for example getting the posterior density of forecasts.
It simply requires adjusting `pm3.m` to save the objects that can already be computed via `posterior_moments`.
I would propose to call the option `posterior_kernel_density` and save it to `options_.estimation.posterior_kernel_density.indicator=1`
4.5Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1034Add capacities for rolling window forecasts2019-06-19T15:37:54ZJohannes PfeiferAdd capacities for rolling window forecastsCurrently, we only support recursive forecasting where the time window, on which the model is estimated, expands.
Necessary steps:
1. Allow `estimation` option `first_obs` to take vector like `nobs` (with the same consistency checks)
2. ...Currently, we only support recursive forecasting where the time window, on which the model is estimated, expands.
Necessary steps:
1. Allow `estimation` option `first_obs` to take vector like `nobs` (with the same consistency checks)
2. Adjust `dynare_estimation` to not either set `options_.nobs = nobs(i);` or `options_.first_obs=first_obs(i)` and add check that makes them mutually exclusive.
The only problem is returning the results. Currently, `dynare_estimation` returns `oo_recursive`. We can either store the rolling window estimation in the same structure or let the preprocessor assign the results to either `oo_recursive` or `oo_rolling` depending on whether `nobs` or `first_obs` is more than a scalar. In this case, the preprocessor must also do the check that either rolling or recursive estimation can be requested, but not both.
4.5Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1028Transform M_.aux_vars.eq_nbr from char to double2019-06-19T15:37:56ZJohannes PfeiferTransform M_.aux_vars.eq_nbr from char to doubleFor some reason, the equation number is stored by the preprocessor as a character, leading to problems in `display_problematic_vars_Jacobian.m`
For some reason, the equation number is stored by the preprocessor as a character, leading to problems in `display_problematic_vars_Jacobian.m`
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1018fix test suite bugs2019-06-19T15:37:56ZHoutan Bastanifix test suite bugsIn email of 6/8/2015 on the dev list, @JohannesPfeifer reported dependencies of the test suite that don't make sense. fix these
In email of 6/8/2015 on the dev list, @JohannesPfeifer reported dependencies of the test suite that don't make sense. fix these
4.5Stéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dynare/-/issues/1013Fix saving of posterior standard deviations2019-06-19T15:37:56ZJohannes PfeiferFix saving of posterior standard deviationsSee also http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=7130
When running the MCMC, the `oo_.posterior_std` and `oo_.posterior_mode` fields are based on the posterior mode, not the MCMC. But the manual says they should only be there if...See also http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=7130
When running the MCMC, the `oo_.posterior_std` and `oo_.posterior_mode` fields are based on the posterior mode, not the MCMC. But the manual says they should only be there if `mh_replic>0` but we always write them.
In contrast, `oo_.posterior_variance` is based on the MCMC. However, this field is not documented in the manual at all.
It is also confusing that the MCMC writes only a variance and ML/mode-finder only a standard deviation.
We must decide on a consistent treatment and fix the manual accordingly.
My proposal is: We change the current `oo_.posterior_std` to `oo_.posterior_std_at_mode` to make the meaning explicit and let the MCMC now also write `oo_.posterior_std`. This would be closest to what the manual states as all fields then would have the intended meaning while only adding additional fields. If need be, this would also allow going back to the 4.4 "convention" using the `convert_dyn_45_to_44` utility.
4.5https://git.dynare.org/Dynare/dynare/-/issues/1011Add bandpass filter2019-06-19T15:37:56ZJohannes PfeiferAdd bandpass filterAdding a bandpass-filter as in Christiano/Motto/Rostagno seems straightforward.
One issue is `options_.hp_ngrid` which specifies the number of points for the Inverse Fourier Transformation. With a different filter, this option would no...Adding a bandpass-filter as in Christiano/Motto/Rostagno seems straightforward.
One issue is `options_.hp_ngrid` which specifies the number of points for the Inverse Fourier Transformation. With a different filter, this option would not be specific to the HP filter anymore. I would suggest renaming it to `ifft_points` and deleting the old option. Obviously, this would break backward compatibility.
@houtanb Could you please give me an option of `stoch_simul` named `bandpass_filter` It should be mutually exclusive with `hp_filter`. If specified as
```
stoch_simul(bandpass_filter)
```
it should map into `options_.bandpass.indicator=1`. If specified as
```
stoch_simul(bandpass_filter=[lowerbound upperbound])
```
it should map into
```
options_.bandpass.indicator=1
options_.bandpass.passband=[lowerbound upperbound]
```
Default values are
```
options_.bandpass.indicator=0;
options_.bandpass.passband=[6 32];
```
4.5Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/974Running dynare from inside of a matlab function forces "clear all" behavior.2019-06-19T15:37:56ZStéphane Adjemianstepan@adjemian.euRunning dynare from inside of a matlab function forces "clear all" behavior.*Created by: Ufos92*
Issue: if executing dynare command from inside of a function, all variables that were created inside this function are purged regardless clearall option.
I am not sure, whether this is a dynare bug or a Matlab prob...*Created by: Ufos92*
Issue: if executing dynare command from inside of a function, all variables that were created inside this function are purged regardless clearall option.
I am not sure, whether this is a dynare bug or a Matlab problem, but may be you at least would like to add this to documentation.
Here is a test-case:
(github does not support upload, so you will have to copypaste the code...)
## ------------ reproduce_bug.m ------------
clear all
% so I create a variable alpha_p for the parameter alpha and try to pass it
% to dynare. The mod file contains following line in the parameter section:
% alpha = alpha_p;
% normal call to dynare:
clear all
alpha_p = 0.33
dynare first_one %noclearall
% doesn't work.
% noclearall option
clear all
alpha_p = 0.33
dynare first_one noclearall
%works
% via function
clear all
run_dynare_param(0.33, 'first_one ', 'noclearall')
% does not work
% via function, but defining alpha_p outside
clear all
alpha_p = 0.33
run_dynare_param(0.33, 'first_one ', 'noclearall')
---
## ------------ run_dynare_param.m ------------
function [out] = run_dynare_param(param_alpha, mod_file, options)
% let's just call dynare with some options and custom parameter alpha
% defaults
if ~exist('options','var')
options = ''
end
% keep dynare output
global M_ options_ oo_
% set alpha
global alpha_p
alpha_p = 0.33
% run dynare
eval(['dynare ', mod_file, ' ', options])
% save and return
out.M = M_;
out.options = options_;
out.oo = oo_;
return
## ------------ first_one.mod ------------
// copypasted from dynare's guide
// ----- Preamble -----
var k l z y c i w r;
varexo e;
parameters beta psi delta alpha rho sigma epsilon;
alpha = alpha_p;
beta = 0.98;
delta = 0.023;
psi = 1.75;
rho = 0.95;
sigma = (0.007/(1-alpha));
epsilon = 10;
// ----- Model -----
model;
(1/c) = beta_(1/c(+1))_(1+r(+1)-delta);
psi_c/(1-l) = w;
c+i = y;
z = rho_z(-1)+e;
y = (k(-1)^alpha)_(exp(z)_l)^(1-alpha);
w = y_((epsilon-1)/epsilon)_(1-alpha)/l;
r = y_((epsilon-1)/epsilon)_alpha/k(-1);
i = k-(1-delta)*k(-1);
end;
// ----- Steady State -----
// almost the exact steady state
initval;
k = 9;
c = 0.7;
l = 0.3;
w = 2.0;
r = 0;
z = 0;
e = 0;
end;
// calculate steady state and set it as the starting point for impulse responce functions
steady;
// Blanchard-Kahn condition check
check;
// ----- Impulse-Responce -----
// shocks
shocks;
var e; stderr 1;
end;
// simulate and plot
// stoch_simul(order = 1) k l z y c i;
4.5https://git.dynare.org/Dynare/dynare/-/issues/976Block using parameters as variables in mod-files2019-06-19T15:37:57ZJohannes PfeiferBlock using parameters as variables in mod-filesThe following file defines `pip` as a parameter, but uses `pip(+1)` like a variable. We should block this and issue an error.
```
%%% PROGETTO 11 %%%
var C lambda R r K I MRS h w N mc Y T b W ;
varexo epst ;
parameters beta delta phi...The following file defines `pip` as a parameter, but uses `pip(+1)` like a variable. We should block this and issue an error.
```
%%% PROGETTO 11 %%%
var C lambda R r K I MRS h w N mc Y T b W ;
varexo epst ;
parameters beta delta phi eps alpha phir phip phiy tau rho phia phib epsp piw pit sigma pip cy iy b2;
%%% calibrazione parametri %%%
beta=0.99;
delta=0.5;
phi=2;
eps=1;
alpha=2;
phir=0.5;
phip=0.6;
phiy=0.7;
tau=0.35;
rho=0.3;
phia=1;
phib=1.1;
epsp=1.3;
piw=2;
pit=2.3;
sigma=1;
pip=2.1;
cy=1.2;
iy=1.4;
b2=0.7;
%steady state%
model(linear);
-sigma*C=lambda;
lambda=lambda(+1)+R-pip(+1);
lambda(+1)=lambda+(1-beta*(1-delta))*r(+1);
K=(1-delta)*K(-1)+delta*I;
MRS=sigma*C+phi*h;
piw=beta*piw(+1)-(((1-eps)*(1-beta*eps))/eps)*(w-MRS);
K(-1)-N=w-r;
mc=alpha*r+(1-alpha)*w;
Y=alpha*K(-1)+(1-alpha)*h;
pip=beta*pip(+1)+(((1-epsp)*(1-beta*epsp))/epsp)*mc;
(cy)*C+(iy)*I=Y;
R=phir*R(-1)+(1-phir)*(phip*pip+phiy);
T=(1/((((R*b2(-1))/pip)-b2-tau*w*h))*((R*b2(-1))/pip)*(-pip+b2(-1)+R)-(tau*w*h)*(tau+h+w)-b2(-1)*b);
tau=rho*tau(-1)+phia*b(-1)+phib*Y+epst;
piw=w-w(-1)+pip;
end;
resid(1);
steady;
check;
shocks;
var epst=2;
end;
stoch_simul(order=1, irf=20);
```
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/966split output of write_latex_dynamic_model so it can be included in a report2019-06-19T15:37:58ZHoutan Bastanisplit output of write_latex_dynamic_model so it can be included in a reportwrite_latex_dynamic_model can create two files:
1. one containing everything before `\begin{document}`, an `\input` command and an `\end{document}`
2. a second containing the equations that is included in the `\input` command
This secon...write_latex_dynamic_model can create two files:
1. one containing everything before `\begin{document}`, an `\input` command and an `\end{document}`
2. a second containing the equations that is included in the `\input` command
This second document can also be included in a report if someone wants the model equations in a report.
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/964Add cholcov function to missing/statistics2019-06-19T15:37:58ZJohannes PfeiferAdd cholcov function to missing/statisticsThe TaRB algorithm makes use of the `cholcov` function of the statistics toolbox. We might want to add the Octave version to the missing folder.
The TaRB algorithm makes use of the `cholcov` function of the statistics toolbox. We might want to add the Octave version to the missing folder.
4.5Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/953create new class VerbatimStatement2019-06-19T15:37:58ZHoutan Bastanicreate new class VerbatimStatementCurrently, lines in the `verbatim` block are stored as `NativeStatement` objects. This was ok before we decided to replace dates in the preprocessor (e.g. `9q1` with `dates('9q1)`). These dates should be replaced in native statements but...Currently, lines in the `verbatim` block are stored as `NativeStatement` objects. This was ok before we decided to replace dates in the preprocessor (e.g. `9q1` with `dates('9q1)`). These dates should be replaced in native statements but not in verbatim statements, hence the new class.
4.5Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/948Potentially add interface to set parameter bounds for osr.2019-06-19T15:37:58ZJohannes PfeiferPotentially add interface to set parameter bounds for osr.In principle, there is everything in place to use constrained optimizers with osr. An example on how to use this with a user-defined optimizer wrapper is at http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6835
However, we do not provide...In principle, there is everything in place to use constrained optimizers with osr. An example on how to use this with a user-defined optimizer wrapper is at http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=6835
However, we do not provide an interface to set such bounds. We should discuss if we should leave it at that (more work for users) or whether we provide functionality to automatically set the bounds (including their correct ordering in the parameter vector).
4.5Johannes PfeiferJohannes Pfeifer