dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2019-11-27T13:11:54Zhttps://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/674Improve error message in Dynare++ for BK-Violation2019-11-27T13:11:54ZJohannes PfeiferImprove error message in Dynare++ for BK-ViolationSee http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=5790
See http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=5790
Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/825Fix using steady state operator on exogenous variables2019-11-27T16:33:42ZJohannes PfeiferFix using steady state operator on exogenous variablesThe mod-file
```
var c, h, pi, w, R, r_e, y, gdp, gdp_hat, k, g, w_tilde, w_eq, w_min;
varexo d, z, eta;
parameters beta, sigma, gamma, theta, ni, tau_w, phi_p, phi_y, rho, alpha;
beta = 0.997;
sigma = 1;
gamma = 458.4;
theta = 6.1...The mod-file
```
var c, h, pi, w, R, r_e, y, gdp, gdp_hat, k, g, w_tilde, w_eq, w_min;
varexo d, z, eta;
parameters beta, sigma, gamma, theta, ni, tau_w, phi_p, phi_y, rho, alpha;
beta = 0.997;
sigma = 1;
gamma = 458.4;
theta = 6.1;
tau_w = 0.2;
ni = 0.28;
phi_p = 1.5;
phi_y = 0.125;
rho = 0.3;
alpha = 0.064;
model;
w_tilde=rho/(1+pi)*w(-1)+(1-rho)*w_eq;
w_eq =(1-alpha)*steady_state(z)*steady_state(h)^(-alpha);
w_min =w(-1)/(1+pi);
//mrs=c^sigma*h^ni/(1-tau_w);
gdp_hat =log(gdp)-log(steady_state(gdp));
r_e=1/(beta*d(+1))-1;
//FOC labor
c^sigma*h^ni=max(w_tilde,w_min)*(1-tau_w);
//Euler equation 1
1=beta*d(+1)*(1+R)/(1+pi(+1))*(c/c(+1))^sigma;
//Euler equation 2
0=(1/(1-alpha))*max(w_tilde,w_min)/z*h^alpha-1-gamma/theta*pi*(1+pi)+beta*d(+1)*(c/c(+1))^sigma * y(+1)/y*gamma/theta*pi(+1)*(1+pi(+1));
// Taylor rule with ZLB
R=max(0,r_e+phi_p*pi+phi_y*gdp_hat);
//output
y=z*h^(1-alpha);
//aggregate resource constraint
c=(1-k-eta)*y;
// resource cost of price adjustment
k=(gamma/2)*(pi^2);
//government purchases
g=eta*y;
// GDP
gdp=(1-k)*y;
//utility
//u=(c^(1-sigma))/(1-sigma)-(h^(1+ni))/(1+ni);
end;
initval;
z=1;
d=1;
pi=0;
k=(gamma/2)*(pi^2);
r_e=1/(beta*d)-1;
h=1;
y=z*h^(1-alpha);
g=eta*y;
c=(1-k-eta)*y;
//w=z;
//w=(1-alpha)/(h^alpha);
gdp=(1-k)*y;
R=r_e;
eta=0.2;
end;
steady;
check;
```
uses `steady_state(z)` where `z` is an exogenous variable. In the `_dynamic` file, the preprocessor translates this to `oo_.exo_steady_state(2)` which does not exist in the `_dynamic` file, leading to a crash. We should either disallow using the steady state operator on exogenous variables or simply enforce that the steady state of exogenous variables is 0. I would prefer the first one as the second would only be viable for stochastic simulations.
4.6MichelJuillardMichelJuillardhttps://git.dynare.org/Dynare/dynare/-/issues/1565initial condition decomposition2019-11-29T16:06:44ZMarco Rattoinitial condition decompositionit would be useful to add interface for the following options:
```
nodisplay
graph_format
fig_name
```
Moreover, the preprocessor should give a lhs arg oo_ when translating the command, i.e.:
`oo_ = initial_condition_decomp...it would be useful to add interface for the following options:
```
nodisplay
graph_format
fig_name
```
Moreover, the preprocessor should give a lhs arg oo_ when translating the command, i.e.:
`oo_ = initial_condition_decomposition(M_,oo_,options_,var_list_,bayestopt_,estim_params_);`
so not really new options, but just allow those in the pre-processor. many thanks!4.6https://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/1579Make fast realtime decomposition use the proper nobs2019-12-03T13:56:27ZJohannes PfeiferMake fast realtime decomposition use the proper nobsSee https://github.com/DynareTeam/dynare/pull/1563#issuecomment-357180435
See https://github.com/DynareTeam/dynare/pull/1563#issuecomment-357180435
4.6https://git.dynare.org/Dynare/dynare/-/issues/1625Discuss implementing a steady_state_relation-block2019-12-03T14:19:24ZJohannes PfeiferDiscuss implementing a steady_state_relation-blockSteady state finding in large economic models is hard. Currently, the user needs to manually implement a full steady state or reduce the problem and then call a solver. See e.g. https://forum.dynare.org/t/how-to-solve-steady-state-in-lar...Steady state finding in large economic models is hard. Currently, the user needs to manually implement a full steady state or reduce the problem and then call a solver. See e.g. https://forum.dynare.org/t/how-to-solve-steady-state-in-large-scale-dsge-models/12185/2
I wonder if it would be useful and feasible to introduce something like a `steady_state_relation`-block that allows specifying analytical steady state relations that Dynare could use in the `_static`-file to substitute out some variable and thus reduce the size of the problem (essentially introducing a model-local variable for the static model). An example would be
```
steady_state_relation;
u=1;
R=1/beta;
Pi=1;
i_nom=R*Pi;
I=delta*K;
end;
```
Combined with `initval` this would make finding a steady state much easier.https://git.dynare.org/Dynare/dynare/-/issues/1652Crash in bytecode2019-12-03T14:45:18ZSébastien VillemotCrash in bytecodeI attach an example ([surprise_solution.zip](/uploads/17158ceefc6fbf59f6810d17cbcdc084/surprise_solution.zip)) that crashes bytecode (just by running `surprise_solution_2019_05_20.mod`).
The problem can be reproduced both with unstable ...I attach an example ([surprise_solution.zip](/uploads/17158ceefc6fbf59f6810d17cbcdc084/surprise_solution.zip)) that crashes bytecode (just by running `surprise_solution_2019_05_20.mod`).
The problem can be reproduced both with unstable and 4.5.
*Note:* comes from https://forum.dynare.org/t/matlab-shutdown-deterministic-solution-stack-solve-algo-1/138824.6Sébastien VillemotSébastien Villemothttps://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/1359Add interface to load datafile in Matlab's table-format2019-12-03T14:45:18ZJohannes PfeiferAdd interface to load datafile in Matlab's table-formatIn `R2013b`. Matlab introduced a datatype `table` (https://de.mathworks.com/help/matlab/ref/table.html). We should support reading datasets saved in this format. In `R2013b`. Matlab introduced a datatype `table` (https://de.mathworks.com/help/matlab/ref/table.html). We should support reading datasets saved in this format. 4.6Stéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dynare/-/issues/1245Make sure _dynamic-file from block returns with proper arguments2019-12-04T14:52:11ZJohannes PfeiferMake sure _dynamic-file from block returns with proper argumentsCurrently, there are a few `return` statements where `varargout` has not been set, leading to crashes instead of proper switching to homotopy.
Currently, there are a few `return` statements where `varargout` has not been set, leading to crashes instead of proper switching to homotopy.
4.6Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/37Automatic generation of _steadystate.m file2019-12-05T15:58:38ZSébastien VillemotAutomatic generation of _steadystate.m fileThe idea is that the preprocessor would create a _steadystate.m file, using the (symbolic) initializations given in the initval block.
This would be particularly useful for estimating models for which the analytical form of the steady s...The idea is that the preprocessor would create a _steadystate.m file, using the (symbolic) initializations given in the initval block.
This would be particularly useful for estimating models for which the analytical form of the steady state is known.
4.2https://git.dynare.org/Dynare/dynare/-/issues/1649new plot_shock_decomposition options2019-12-06T15:30:45ZMarco Rattonew plot_shock_decomposition optionsIt would be useful to allow the preprocessor to take the following new options, both for `plot_shock_decomposition` and `initial_condition_decomposition`:
* `diff`: plots the first difference of the requested variable
* `flip`: flip the ...It would be useful to allow the preprocessor to take the following new options, both for `plot_shock_decomposition` and `initial_condition_decomposition`:
* `diff`: plots the first difference of the requested variable
* `flip`: flip the requested variables with sign change (e.g. useful to flip the concept of an exchange rate or trade balance or deficit/surplus variable without having to define it in model definition)
I have already provisions ready to push.4.6Marco RattoMarco Rattohttps://git.dynare.org/Dynare/dynare/-/issues/1586Document initial_condition_decomposition and make it an official feature2019-12-09T14:54:10ZJohannes PfeiferDocument initial_condition_decomposition and make it an official featureStill missing from https://github.com/DynareTeam/dynare/pull/1421Still missing from https://github.com/DynareTeam/dynare/pull/14214.6https://git.dynare.org/Dynare/dynare/-/issues/1308Factorize print_info and interpret_resol_info2019-12-09T17:11:26ZStéphane Adjemianstepan@adjemian.euFactorize print_info and interpret_resol_infoSee discussion [here](https://github.com/DynareTeam/dynare/commit/83bc67f0c03bcd79cbbe4c903d7e5f5d4bc11e88#commitcomment-19332156).
See discussion [here](https://github.com/DynareTeam/dynare/commit/83bc67f0c03bcd79cbbe4c903d7e5f5d4bc11e88#commitcomment-19332156).
4.6https://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/564ramsey policy at order 22019-12-12T10:30:42ZMichelJuillardramsey policy at order 2The code for computing a 2nd order approximation of Ramsey policy is already in place. I just need to complete the evaluation of objective function (at 3rd order).
The code for computing a 2nd order approximation of Ramsey policy is already in place. I just need to complete the evaluation of objective function (at 3rd order).
MichelJuillardMichelJuillardhttps://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/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/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.