dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2018-09-10T12:35:46Zhttps://git.dynare.org/Dynare/dynare/-/issues/1612Build failed in Arch Linux2018-09-10T12:35:46ZStéphane Adjemianstepan@adjemian.euBuild failed in Arch Linux*Created by: angelosalton*
Tried to build from 4.5.4 sources (against Octave 4.4.0), with the following error:
```
In file included from ../../../../contrib/ms-sbvar/utilities_dw/include/dw_std.h:23,
from ../../../...*Created by: angelosalton*
Tried to build from 4.5.4 sources (against Octave 4.4.0), with the following error:
```
In file included from ../../../../contrib/ms-sbvar/utilities_dw/include/dw_std.h:23,
from ../../../../contrib/ms-sbvar/switch_dw/switching/dw_switch.c:25:
../../../sources/ms-sbvar/modify_for_mex.h:39:12: fatal error: octave/config.h: File or folder not found
# include <octave/config.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
```
I'm pretty sure all necessary dependencies are met. I wonder if a header file for Octave is missing.
Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1604dynare.org down (just http and https)2018-09-10T12:35:46ZStéphane Adjemianstepan@adjemian.eudynare.org down (just http and https)*Created by: tpapp*
```sh
$ nslookup dynare.org
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: dynare.org
Address: 92.243.14.31
$ ping dynare.org
PING dynare.org (92.243.14.31) 56(...*Created by: tpapp*
```sh
$ nslookup dynare.org
Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: dynare.org
Address: 92.243.14.31
$ ping dynare.org
PING dynare.org (92.243.14.31) 56(84) bytes of data.
64 bytes from kirikou.cepremap.org (92.243.14.31): icmp_seq=1 ttl=48 time=46.9 ms
64 bytes from kirikou.cepremap.org (92.243.14.31): icmp_seq=2 ttl=48 time=46.6 ms
64 bytes from kirikou.cepremap.org (92.243.14.31): icmp_seq=3 ttl=48 time=45.5 ms
^C
--- dynare.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 45.578/46.415/46.991/0.655 ms
$ wget dynare.org
--2018-04-11 12:57:51-- http://dynare.org/
Resolving dynare.org (dynare.org)... 92.243.14.31
Connecting to dynare.org (dynare.org)|92.243.14.31|:80... failed: Connection refused.
$ wget https://dynare.org
--2018-04-11 12:58:22-- https://dynare.org/
Resolving dynare.org (dynare.org)... 92.243.14.31
Connecting to dynare.org (dynare.org)|92.243.14.31|:443... failed: Connection refused.
```https://git.dynare.org/Dynare/dynare/-/issues/1599octave option requires -std-c++142018-09-10T12:35:46ZStéphane Adjemianstepan@adjemian.euoctave option requires -std-c++14*Created by: yurivict*
dynare fails to build without -std-c++14 now after octave update.
Found in the FreeBSD port.
*Created by: yurivict*
dynare fails to build without -std-c++14 now after octave update.
Found in the FreeBSD port.
Sébastien VillemotSébastien Villemothttps://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/1622Fix posterior_sampler_initialization>set_proposal_density_to_previous_value2019-09-07T05:27:10ZJohannes PfeiferFix posterior_sampler_initialization>set_proposal_density_to_previous_valueIn case of the `record`-structure not containing the required fields, the output argument of the private function at the bottom of the file are not set, crashing Matlab.In case of the `record`-structure not containing the required fields, the output argument of the private function at the bottom of the file are not set, crashing Matlab.https://git.dynare.org/Dynare/dynare/-/issues/1621Apparent bug with empty strings in 4.6-unstable-474556e0ca6a3b24638d69c883ce2...2018-09-10T12:35:46ZTom HoldenApparent bug with empty strings in 4.6-unstable-474556e0ca6a3b24638d69c883ce255886268adfI was trying to test this build: https://dynare.adjemian.eu/dynare-4.6-unstable-474556e-win.exe
as instructed in this issue thread: https://github.com/DynareTeam/dynare/issues/1490
The example I found the aforementioned issue on prev...I was trying to test this build: https://dynare.adjemian.eu/dynare-4.6-unstable-474556e-win.exe
as instructed in this issue thread: https://github.com/DynareTeam/dynare/issues/1490
The example I found the aforementioned issue on previously included some empty strings. In this Dynare Unstable, these seem to result in an incorrect pre-processor error.
Saving the following three lines is a MOD file generates a pre-processor error in this version:
@#define StringArray = ""
parameters p;
p = 1;
However, if you put something inside the double quotes, it runs fine. It also runs fine on Dynare 4.5.5 even with the empty string.
Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1616Fix perfect_foresight_solver with lags and leads on exogenous variables2018-09-10T12:35:46ZJohannes PfeiferFix perfect_foresight_solver with lags and leads on exogenous variablesThe following modification of our test-file where the shock is now `EfficiencyInnovation(-2)` instead of contemporaneous does not work, despite us already being at the solution with `histval`:
```
var Capital, Output, Labour, Consumpti...The following modification of our test-file where the shock is now `EfficiencyInnovation(-2)` instead of contemporaneous does not work, despite us already being at the solution with `histval`:
```
var Capital, Output, Labour, Consumption, Efficiency, efficiency, ExpectedTerm;
varexo EfficiencyInnovation;
parameters beta, theta, tau, alpha, psi, delta, rho, effstar, sigma2;
beta = 0.9900;
theta = 0.3570;
tau = 2.0000;
alpha = 0.4500;
psi = -0.1000;
delta = 0.0200;
rho = 0.8000;
effstar = 1.0000;
sigma2 = 0;
model;
// Eq. n°1:
efficiency = rho*efficiency(-1) + EfficiencyInnovation(-2);
// Eq. n°2:
Efficiency = effstar*exp(efficiency);
// Eq. n°3:
Output = Efficiency*(alpha*(Capital(-1)^psi)+(1-alpha)*(Labour^psi))^(1/psi);
// Eq. n°4:
Capital = Output-Consumption + (1-delta)*Capital(-1);
// Eq. n°5:
((1-theta)/theta)*(Consumption/(1-Labour)) - (1-alpha)*(Output/Labour)^(1-psi);
// Eq. n°6:
(((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption = ExpectedTerm(1);
// Eq. n°7:
ExpectedTerm = beta*((((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption)*(alpha*((Output/Capital(-1))^(1-psi))+(1-delta));
end;
steady_state_model;
efficiency = EfficiencyInnovation/(1-rho);
Efficiency = effstar*exp(efficiency);
Output_per_unit_of_Capital=((1/beta-1+delta)/alpha)^(1/(1-psi));
Consumption_per_unit_of_Capital=Output_per_unit_of_Capital-delta;
Labour_per_unit_of_Capital=(((Output_per_unit_of_Capital/Efficiency)^psi-alpha)/(1-alpha))^(1/psi);
Output_per_unit_of_Labour=Output_per_unit_of_Capital/Labour_per_unit_of_Capital;
Consumption_per_unit_of_Labour=Consumption_per_unit_of_Capital/Labour_per_unit_of_Capital;
% Compute steady state share of capital.
ShareOfCapital=alpha/(alpha+(1-alpha)*Labour_per_unit_of_Capital^psi);
% Compute steady state of the endogenous variables.
Labour=1/(1+Consumption_per_unit_of_Labour/((1-alpha)*theta/(1-theta)*Output_per_unit_of_Labour^(1-psi)));
Consumption=Consumption_per_unit_of_Labour*Labour;
Capital=Labour/Labour_per_unit_of_Capital;
Output=Output_per_unit_of_Capital*Capital;
ExpectedTerm=beta*((((Consumption^theta)*((1-Labour)^(1-theta)))^(1-tau))/Consumption)
*(alpha*((Output/Capital)^(1-psi))+1-delta);
end;
steady;
ik = varlist_indices('Capital',M_.endo_names);
CapitalSS = oo_.steady_state(ik);
histval;
Capital(0) = CapitalSS;
end;
perfect_foresight_setup(periods=200);
perfect_foresight_solver(stack_solve_algo=7,solve_algo=1);
if ~oo_.deterministic_simulation.status
error('Perfect foresight simulation failed')
end
rplot Consumption;
rplot Capital;
D = load('rbc_det_results');
if norm(D.oo_.endo_simul - oo_.endo_simul) > 1e-30;
disp(norm(D.oo_.endo_simul - oo_.endo_simul));
error('rbc_det_stack_solve_algo_7 failed');
end;
options_.dynatol.f=1e-10;
@#define J = [0,1,2,3,4,9,10]
@#for solve_algo_iter in J
perfect_foresight_setup(periods=200);
perfect_foresight_solver(stack_solve_algo=7,solve_algo=@{solve_algo_iter});
if ~oo_.deterministic_simulation.status
error('Perfect foresight simulation failed')
end
rplot Consumption;
rplot Capital;
D = load('rbc_det_results');
if isoctave && options_.solve_algo==0
%%acount for somehow weaker convergence criterion in Octave's fsolve
tol_crit=1e-4;
else
tol_crit=1e-8;
end
if norm(D.oo_.endo_simul - oo_.endo_simul) > tol_crit;
disp(norm(D.oo_.endo_simul - oo_.endo_simul));
error(sprintf('rbc_det_stack_solve_algo_7 failed with solve_algo=%u',options_.solve_algo));
end;
@#endfor
```
This is related to https://github.com/DynareTeam/dynare/commit/8913791ff0972f8a56d6c5d0d325d1cb6fda7189#commitcomment-29281838
We should add the above file with
```
histval;
Capital(0) = CapitalSS/2;
end;
```
to the testsuite. A similar case with a leaded exogenous variable should also be added.https://git.dynare.org/Dynare/dynare/-/issues/1609Fix bug in mjdgges.mex2018-09-10T12:35:46ZJohannes PfeiferFix bug in mjdgges.mexSee email from 04/22/18.
```[err, ss, tt, w, sdim, dr.eigval, info1] = mjdgges(E, D, DynareOptions.qz_criterium, DynareOptions.qz_zero_threshold);```
returns ```sdim=6.``` However, manually computing `sdim` based on the returned `dr.ei...See email from 04/22/18.
```[err, ss, tt, w, sdim, dr.eigval, info1] = mjdgges(E, D, DynareOptions.qz_criterium, DynareOptions.qz_zero_threshold);```
returns ```sdim=6.``` However, manually computing `sdim` based on the returned `dr.eigval` via
```
sum(abs(dr.eigval) < DynareOptions.qz_criterium)
```
returns 8.
https://git.dynare.org/Dynare/dynare/-/issues/1608Fix forecast at order=2 with linear model and varexo_det2018-09-10T12:35:46ZJohannes PfeiferFix forecast at order=2 with linear model and varexo_detThe mod-file
```
var y, pi, i, g, u, k;
varexo e_g e_u e_k;
varexo_det gov;
parameters lambda, pi_target, y_target, phi_pi, phi, rho, rhoout, rhopi, rhoint, sigma1, sigma2, sigma3;
lambda = 0.3;
pi_target = 0;
y_target ...The mod-file
```
var y, pi, i, g, u, k;
varexo e_g e_u e_k;
varexo_det gov;
parameters lambda, pi_target, y_target, phi_pi, phi, rho, rhoout, rhopi, rhoint, sigma1, sigma2, sigma3;
lambda = 0.3;
pi_target = 0;
y_target = 0;
phi_pi = 1.5;
phi = 1;
rho = 0.99;
T = 50;
rhoout = 0.8;
rhopi = 0.5;
rhoint = 0;
sigma1 = 1;
sigma2 = 1;
sigma3 = 1;
model(linear);
y=y(+1)-phi*(i-pi(+1))+gov+g;
pi=lambda*y+rho*pi(+1)+u;
i=phi_pi*(pi-pi_target)+k;
g=rhoout*g(-1)+e_g;
u=rhopi*u(-1)+e_u;
k=rhoint*k(-1)+e_k;
end;
steady;
check;
shocks;
var e_g;
stderr sigma1;
var e_u;
stderr sigma2;
var e_k;
stderr sigma3;
var gov;
periods 1:9;
values 0.2;
end;
stoch_simul(irf=0);
forecast;
```
crashes, because `forecast` relies on the original `options_.order` and the precomputed decision rules. But given the linear model, `stoch_simul` used `order=1`. Thus, the default does not work anymore.Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1606Fix bug or document behavior of mcp2019-04-26T18:17:04ZJohannes PfeiferFix bug or document behavior of mcpSee https://forum.dynare.org/t/perfect-foresight-simulation-failed/11638/5See https://forum.dynare.org/t/perfect-foresight-simulation-failed/11638/5Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1607Fix prior sampler2018-09-10T12:35:46ZJohannes PfeiferFix prior sampler`prior simulate` in `cli/prior.m` calls
```
results = prior_sampler(0, Model, BayesOptions, options_, oo_, EstimatedParams);
```
where the 0 indicates that no decision rules need to be saved. The problem is that this flag `drsave` i...`prior simulate` in `cli/prior.m` calls
```
results = prior_sampler(0, Model, BayesOptions, options_, oo_, EstimatedParams);
```
where the 0 indicates that no decision rules need to be saved. The problem is that this flag `drsave` is then used to call `resol` with
```
work = ~drsave;
[dr,INFO,M_,options_,oo_] = resol(work,M_,options_,oo_);
```
so that `resol` only computes eigenvalue, but not BK conditions etc. As a result, the reported simulations will never fail the BK conditions. See https://forum.dynare.org/t/determinacy-prior-simulate-puzzle/11681
https://git.dynare.org/Dynare/dynare/-/issues/1605Better document behavior of steady_state operator2021-08-17T10:23:21ZJohannes PfeiferBetter document behavior of steady_state operatorSee https://forum.dynare.org/t/steady-state-command-in-perfect-foresight-simulations/11632/3See https://forum.dynare.org/t/steady-state-command-in-perfect-foresight-simulations/11632/3https://git.dynare.org/Dynare/dynare/-/issues/1601dates: uninformative error message2018-09-10T12:35:46ZMichelJuillarddates: uninformative error messageIn ``dates`` if the date format is not recognized the error message is "You should first read the manual". This isn't helpful. Furthermore, inside Dynare, if this problem occurs in the datafile, there is no reference to the ``dates`` mod...In ``dates`` if the date format is not recognized the error message is "You should first read the manual". This isn't helpful. Furthermore, inside Dynare, if this problem occurs in the datafile, there is no reference to the ``dates`` module. https://git.dynare.org/Dynare/dynare/-/issues/1567Silent crash when calculating steady state variables of basic economic model2018-09-10T12:35:46ZStéphane Adjemianstepan@adjemian.euSilent crash when calculating steady state variables of basic economic model*Created by: wtpfede*
Hi all,
I'm using Dynarec to reimplement a basic Ramsey model from Ohanian and Cole (1999)
The code is as follows:
```
varexo e; %e are tfp shocks
var y, c, n, k, x, z, i;
parameters theta, beta, rho, d...*Created by: wtpfede*
Hi all,
I'm using Dynarec to reimplement a basic Ramsey model from Ohanian and Cole (1999)
The code is as follows:
```
varexo e; %e are tfp shocks
var y, c, n, k, x, z, i;
parameters theta, beta, rho, delta, gamma, biga;
theta=0.33;
beta=.96;
delta = 0.10;
rho=0.9;
gamma = 0.019;
biga = 0.78;
model;
(1/c) = beta*(1/c(+1))*( 1- delta+ z(+1)*(x(+1)*n(+1))^(1-theta)* theta*(k(+1))^(theta-1)) ;
biga/(1-n)=(1/c)*((1-theta)*z*(k^theta)*(x*n)^(-theta)*x) ;
z=(1-rho)+rho*z(-1)+e ;
i=z*y-c;
k(+1)=i+(1-delta)*k ;
y=(k^theta)*(x*n)^(1-theta) ;
x=(1+gamma)*x(-1) ;
end;
initval;
y = 0.184068;
c = 0.127782;
n = 1/3;
k = 0.0562866;
x = 1;
z = 0.1;
i = 0.0562866;
end;
check;
steady;
```
Unfortunately, Dynarec crashes silently.
All of the parameters and the equations have been double checked by our team, and the numerical values come straight from the original paper.
We are on Octave 4.2.1 and Dynare 4.5.3.
If anyone has any pointers or could confirm this as a bug, this would be extremely helpful.
https://git.dynare.org/Dynare/dynare/-/issues/1597Accept UTF-8 in .mod file2021-08-17T10:56:01ZHoutan BastaniAccept UTF-8 in .mod filehttps://git.dynare.org/Dynare/dynare/-/issues/1596add maximum lag info by variable2021-08-17T10:56:46ZHoutan Bastaniadd maximum lag info by variable```
M_.maximum_endo_lag_by_var = [ ... ];
M_.maximum_exo_lag_by_var = [ ... ];
```
Where the vectors are the length of `M_.orig_endo_nbr````
M_.maximum_endo_lag_by_var = [ ... ];
M_.maximum_exo_lag_by_var = [ ... ];
```
Where the vectors are the length of `M_.orig_endo_nbr`https://git.dynare.org/Dynare/dynare/-/issues/1587nested @#ifndef and @#ifdef don't work2018-09-10T12:35:46ZHoutan Bastaninested @#ifndef and @#ifdef don't workEmail from @JohannesPfeifer:
If I use
```
@#define risk_sharing = 0
@#if risk_sharing == 0
@#ifndef endogenous_discount_factor
@#define endogenous_discount_factor = 1
@#endif
@#endif
```
In a mod-file, I get...Email from @JohannesPfeifer:
If I use
```
@#define risk_sharing = 0
@#if risk_sharing == 0
@#ifndef endogenous_discount_factor
@#define endogenous_discount_factor = 1
@#endif
@#endif
```
In a mod-file, I get an error
```
@#if/@#ifdef/@#ifndef not matched by an @#endif or file does not end with a new line (unexpected end of file)
```4.5.4Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1588Update Readme for Windows2018-09-10T12:35:46ZJohannes PfeiferUpdate Readme for WindowsThe readme has a line linking to a recommended Octave version (https://github.com/DynareTeam/dynare/blob/48b5839414b96c69c0ea0a0da4b129b0195d7dfe/windows/README.txt#L64), which should be 4.2.1, but http://www.dynare.org/download/octave/w...The readme has a line linking to a recommended Octave version (https://github.com/DynareTeam/dynare/blob/48b5839414b96c69c0ea0a0da4b129b0195d7dfe/windows/README.txt#L64), which should be 4.2.1, but http://www.dynare.org/download/octave/windows only has downloads for 3.8.1https://git.dynare.org/Dynare/dynare/-/issues/1584Update and potentially fix installation information for mac2018-11-08T11:54:18ZJohannes PfeiferUpdate and potentially fix installation information for macSee https://forum.dynare.org/t/installing-dynare-no-longer-available-on-homebrew/11259See https://forum.dynare.org/t/installing-dynare-no-longer-available-on-homebrew/11259Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1544dataset_ is a dseries and no longer a structure2018-09-10T12:35:46ZStéphane Adjemianstepan@adjemian.eudataset_ is a dseries and no longer a structure*Created by: thomasbrand*
The last commits about `dseries` (between October 10th and October 14th) modified the type of the `dataset_` output in `results.mat`. It was previously a matlab structure, and now it is a `dseries`. The consequ...*Created by: thomasbrand*
The last commits about `dseries` (between October 10th and October 14th) modified the type of the `dataset_` output in `results.mat`. It was previously a matlab structure, and now it is a `dseries`. The consequence is important (for me) because now I need Dynare to read the `dataset_` output.
Was it on purpose or do you think you will go back to a structure ?
Thank you.Stéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.eu