dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2019-06-19T15:37:42Zhttps://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 Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1502Add a dynare option for specifying if we consider a stochastic or determinist...2019-06-19T15:37:42ZStéphane Adjemianstepan@adjemian.euAdd a dynare option for specifying if we consider a stochastic or deterministic modelSee discussion in #1501.See discussion in #1501.4.6Stéphane Adjemianstepan@adjemian.euStéphane Adjemianstepan@adjemian.euhttps://git.dynare.org/Dynare/dynare/-/issues/1500Remove `tests/practicing` from repository2019-06-19T15:37:42ZHoutan BastaniRemove `tests/practicing` from repositoryFollowing https://github.com/DynareTeam/dynare/issues/637#issuecomment-234199900, we should remove `tests/practicing` from the repository.
We can:
1) simply delete it
1) compress the files and serve them on www.dynare.org somewhere
...Following https://github.com/DynareTeam/dynare/issues/637#issuecomment-234199900, we should remove `tests/practicing` from the repository.
We can:
1) simply delete it
1) compress the files and serve them on www.dynare.org somewhere
What do people prefer?4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1496Allow writing steady_state_model-block into LaTeX-document2019-06-19T15:37:42ZJohannes PfeiferAllow writing steady_state_model-block into LaTeX-documentThis would make debugging a lot easierThis would make debugging a lot easier4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1495Problem with JSON output for model local variables2019-06-19T15:37:42ZHoutan BastaniProblem with JSON output for model local variablesThe lists created by `ModelTree::writeJsonModelLocalVariables` should be combined into the same listThe lists created by `ModelTree::writeJsonModelLocalVariables` should be combined into the same list4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1494Investigate crash in newrat.m2019-06-19T15:37:42ZJohannes PfeiferInvestigate crash in newrat.mSee https://forum.dynare.org/t/mode-compute-5-in-dsge-var/10642
@rattoma Could you please have a look. The problem is that in the `else`-clause of
```
if length(find(ig))<nx
ggx=ggx*0;
ggx(find(ig))=gg(find(ig));...See https://forum.dynare.org/t/mode-compute-5-in-dsge-var/10642
@rattoma Could you please have a look. The problem is that in the `else`-clause of
```
if length(find(ig))<nx
ggx=ggx*0;
ggx(find(ig))=gg(find(ig));
if analytic_derivation
hhx=hh;
else
hhx = reshape(dum,nx,nx);
end
```
the `dum` variable has not been set.4.6Marco RattoMarco Rattohttps://git.dynare.org/Dynare/dynare/-/issues/1490Again investigate memory problems with k_order_perturbation on Windows2018-11-14T11:34:59ZJohannes PfeiferAgain investigate memory problems with k_order_perturbation on WindowsTwo users at https://forum.dynare.org/t/cant-work-with-third-order/10523/12 report problems with Dynare 4.5.1. I cannot replicate the issue on my machine.
The stack trace on both affected machines is
```
Register State (from fault...Two users at https://forum.dynare.org/t/cant-work-with-third-order/10523/12 report problems with Dynare 4.5.1. I cannot replicate the issue on my machine.
The stack trace on both affected machines is
```
Register State (from fault):
RAX = 0000000000000000 RBX = 0000000000000000
RCX = 00000000000000c4 RDX = 0000000000000000
RSP = 000000012c03fe20 RBP = 000000012c03fed8
RSI = 0000000000000000 RDI = 0000000006032530
R8 = 000000012c03fdf8 R9 = 000000012c03fed8
R10 = 0000000000000000 R11 = 0000000000000206
R12 = 0000000000000000 R13 = 0000000000000000
R14 = 0000000000000000 R15 = 0000000000000000
RIP = 000000002911f5c7 EFL = 00010202
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x000000002911f5c7 C:\dynare\4.5.1\mex\matlab\win64-7.8-9.2\k_order_perturbation.mexw64+00390599 mexFunction+00384471
[ 1] 0x00000000290eca69 C:\dynare\4.5.1\mex\matlab\win64-7.8-9.2\k_order_perturbation.mexw64+00182889 mexFunction+00176761
[ 2] 0x0000000029120cc4 C:\dynare\4.5.1\mex\matlab\win64-7.8-9.2\k_order_perturbation.mexw64+00396484 mexFunction+00390356
[ 3] 0x000007feff08415f C:\Windows\system32\msvcrt.dll+00016735 srand+00000147
[ 4] 0x000007feff086ebd C:\Windows\system32\msvcrt.dll+00028349 ftime64_s+00000477
[ 5] 0x0000000076a659cd C:\Windows\system32\kernel32.dll+00088525 BaseThreadInitThunk+00000013
[ 6] 0x000000007717a561 C:\Windows\SYSTEM32\ntdll.dll+00173409 RtlUserThreadStart+00000033
```
So it might have to do with Visual Studies's `msvcrt.dll` and the random number generator's call to the system time.4.6Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1486Make variance decomposition of observables account for measurement error2019-06-19T15:37:42ZJohannes PfeiferMake variance decomposition of observables account for measurement errorCurrently, we only decompose the variable after the measurement error has been taken out.Currently, we only decompose the variable after the measurement error has been taken out.4.6Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1483if Dynare++ will not be built, do not build mex files that depend on it2019-08-14T12:33:08ZHoutan Bastaniif Dynare++ will not be built, do not build mex files that depend on it`mex/build/matlab/configure.ac` does not account for the case when makefiles are not created for dynare++ by the main configure script. Hence, `libdynare++` and `gensylv` will still be built, causing an error. See #1482.
Easy solution...`mex/build/matlab/configure.ac` does not account for the case when makefiles are not created for dynare++ by the main configure script. Hence, `libdynare++` and `gensylv` will still be built, causing an error. See #1482.
Easy solution: test for BLAS, LAPACK, and MatIO. don't build `libdynare++`, `gensylv`, `k_order_perturbation`, or `dynare_simul_` if one of these libraries is not found (same test that we implement for building Dynare++ in the main config file.
Another solution would be to pass the value of `BUILD_DYNAREPLUSPLUS` to `AC_CONFIG_SUBDIRS([mex/build/matlab])` in `configure.ac`4.6Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1477Allow calling calib_smoother with parameter_set option2019-06-19T15:37:43ZJohannes PfeiferAllow calling calib_smoother with parameter_set optionCurrently, the `calib_smoother` calls `evaluate_smoother` with the first input argument being `calibration`. We should allow for a `parameter_set`-like option to select the parameter set at which to compute the smoother. Default should b...Currently, the `calib_smoother` calls `evaluate_smoother` with the first input argument being `calibration`. We should allow for a `parameter_set`-like option to select the parameter set at which to compute the smoother. Default should be `calibration`.
Related to http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=24518 4.6Houtan BastaniHoutan Bastanihttps://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/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/1404Fix bug in sim1_linear2019-09-10T09:41:11ZJohannes PfeiferFix bug in sim1_linear`sim1_linear.m` seems to return wrong results. The following mod-file calls different solvers in sequence, using the previous result as the respective starting value.
```
//Endogenous variables
var piV rV yV rrstarV zV Rshock;
//Ex...`sim1_linear.m` seems to return wrong results. The following mod-file calls different solvers in sequence, using the previous result as the respective starting value.
```
//Endogenous variables
var piV rV yV rrstarV zV Rshock;
//Exogenous variables
varexo epsFG shock epsR;
//Parameters
parameters alpha beta eta phipi phiy rho sig lambda; //
//Initialization of parameter values
beta =0.99; //Discount factor (=inverse nominal interest rate)
alpha =0.033; //sensivity of inflation to output gap, parameter determining marginal cost,
eta =1; //sensivity of inflation to output gap, parameter determining price rigidity
phipi =1.5; //parameter determining monetary reaction to inflation
phiy =0.125; //parameter determining monetary reaction to output
rho =0.9; //AR(1) natural rate
sig =1; //intertemporal rate of substitution
lambda=0.25; // prob. of new info arrival
//model equations
model;
// z Variable
zV = alpha*(yV-yV(-1))+piV;//(pV-pV(-1));
piV= (lambda*alpha/ (1-lambda)) *yV
+lambda*EXPECTATION(-1)(zV)
+lambda*(1-lambda)*EXPECTATION(-2)(zV)
+lambda*(1-lambda)^2*EXPECTATION(-3)(zV)
+lambda*(1-lambda)^3*EXPECTATION(-4)(zV)
+lambda*(1-lambda)^4*EXPECTATION(-5)(zV)
+lambda*(1-lambda)^5*EXPECTATION(-6)(zV)
+lambda*(1-lambda)^6*EXPECTATION(-7)(zV)
+lambda*(1-lambda)^7*EXPECTATION(-8)(zV)
+lambda*(1-lambda)^8*EXPECTATION(-9)(zV)
; //marginal cost is proportional to gap, gap is driver of inflation
//piV=0.99*piV(+1)+0.033*yV;
//IS curve (Output Euler) from Kiley code
yV = yV(+1)-sig*(rV-piV(+1) - rrstarV);
//monetary policy' reaction function
rV = min((1-shock), phipi*(piV(+1) + phiy*yV + epsFG));
//rV = phipi*piV + phiy*yV+Rshock;
Rshock=0.5*Rshock(-1)+epsR;
//Natural real interest rate
rrstarV = rho*rrstarV(-1);
end;
initval;
rV=0;
yV=0;
rrstarV=0;
piV=0;
zV=0;
end;
steady;
check;
shocks;
var shock;
periods 1:15;
values 1;
var epsFG;
periods 16 ;
values -0.0117;
end;
perfect_foresight_setup(periods=30);
perfect_foresight_solver(solve_algo=0);
nonlinear=oo_.endo_simul;
options_.linear=1;
perfect_foresight_solver(solve_algo=0);
linear=oo_.endo_simul;
perfect_foresight_solver(solve_algo=0);
options_.linear=0;
perfect_foresight_solver(solve_algo=0);
perfect_foresight_solver(solve_algo=4);
```
But the result of the nonlinear solvers has non-zero residuals in the linear solver and vice versa, while the nonlinear solvers seem to have consistent results.
4.6https://git.dynare.org/Dynare/dynare/-/issues/1392fix ramsey_model syntax2019-06-19T15:37:44ZHoutan Bastanifix ramsey_model syntax@MichelJuillard Currently `ramsey_model` accepts a list of symbols in the syntax and the `RamseyModelStatement` accepts a `symbol_list` but nothing is done with it. Furthermore, there's no reference to the `symbol_list` form in the manua...@MichelJuillard Currently `ramsey_model` accepts a list of symbols in the syntax and the `RamseyModelStatement` accepts a `symbol_list` but nothing is done with it. Furthermore, there's no reference to the `symbol_list` form in the manual. Is there a reason you added support for `symbol_list` to `ramsey_model` in d945395a15, e90859ba524abfcb570d6cf09394ce86b4405090, and 17477ab095bb4f9b24d0da5ec5cf747f41988bb44.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1390create option to suppress preprocessor output to stdout2019-06-19T15:37:44ZHoutan Bastanicreate option to suppress preprocessor output to stdoutSuppress this:
```
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evalua...Suppress this:
```
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.
Using 64-bit preprocessor
Starting Dynare (version 4.5-unstable).
Starting preprocessing of the model file ...
```
and stuff like this....
```
Found 6 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...
done
Preprocessing completed.
```
This would make it easier to read json output when the `jsonstdout` option is passed.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1389Check detrending engine2019-11-14T17:38:13ZJohannes PfeiferCheck detrending engineThe mod-file
```
//-----------------------------------------------------------------------//
//---------------------- Declaring parameters ---------------------------//
//-----------------------------------------------------------...The mod-file
```
//-----------------------------------------------------------------------//
//---------------------- Declaring parameters ---------------------------//
//-----------------------------------------------------------------------//
parameters delta //depreciation
sigma //intertemporal elasticity
beta //discount factor
alpha //production function parameter
mu //utility parameter
theta //Calvo parameter
epsilon //elasticity
chi //indexation parameter (unused for now)
;
alpha = 0.667;
delta = 0.1;
sigma = 0.25;
beta = 0.96;
mu = 0.2;
theta = 0.5;
epsilon = 15;
chi = 0;
//-----------------------------------------------------------------------//
//----------------------- Declaring variables ---------------------------//
//-----------------------------------------------------------------------//
varexo omega //probability of remaining a worker in the next period
gamma //probability of dieing (once retired)
n //populational growth
x //rate of technological change
M_d //exogenous money supply
;
var lambda //asset distribution in the economy
pi //}these define the marginal propensity of consumption
eps //}by both retirees and workers (I'm using Gertler's notation)
OMEGA //higher case omega
R //gross interest rate
PSI //auxiliar variable
mc //marginal cost
Pi //inflation
Df //nominal dividends
Pf //nominal firm share price
price_disp //price dispersion index
;
//declaring nonstationary variables
trend_var(growth_factor= (1+x)*(1+n)/(1+n)) X; //technological progress
trend_var(growth_factor= (1+x)*(1+n)/(1+x)) N; //population
var(deflator = X*N)
Y //product
C //consumption
K //financial capital
H //non-financial capital
A //assets
;
var(deflator = X) W; //real wage
var(deflator = 1/(X*N)) P PStar; //price level and optimal price set
var(deflator = (X*N)^(1-epsilon)) g1; //auxiliary Calvo variable
var(deflator = (X*N)^(2-epsilon)) g2; //auxiliary Calvo variable
predetermined_variables K; //timing convention
//-----------------------------------------------------------------------//
//------------------------------- Model ---------------------------------//
//-----------------------------------------------------------------------//
model;
// Consumer side
//1
K(+1) = Y - C + (1 - delta)* K;
//2
(lambda - (1 - omega(+1)))*A = omega(+1)*(1-eps*pi)*lambda(-1)*R*A(-1);
//3
pi = 1 - PSI(+1) * (R(+1) * OMEGA(+1))^(sigma - 1) * beta^sigma * pi/pi(+1);
//4
eps * pi = 1 - PSI(+1) * ((R(+1))^(sigma-1)*beta^sigma*gamma(+1))*(eps*pi)/(eps(+1)*pi(+1));
//5
OMEGA = omega + (1-omega)*eps^(1/(1-sigma));
//6
H = N * W + H(+1)/((1+n(+1))*(1+x(+1))*R(+1)*OMEGA(+1)/omega(+1));
//7
C * (1 + mu^sigma * (R(+1)*Pi(+1)/(R(+1)*Pi(+1)-1))^(sigma-1)) = pi * ((1 + (eps/gamma-1) * lambda(-1)) * R * A(-1) + H(-1));
//8
A = K + 1/R * M_d(+1)/P + Pf/P;
//9
PSI = (1 + ((R*Pi-1)/(R*Pi))^(sigma-1) * mu^sigma)^(-1) / (1 + (((R(+1)*Pi(+1))-1)/(R(+1)*Pi(+1)))^(sigma-1) * mu^sigma)^(-1);
// Firm side
//10
Y = (X * N)^alpha * (K)^(1-alpha)/price_disp;
//11
W = alpha * Y / N * mc;
//12
R = (1 - alpha) * Y / K * mc + 1 - delta;
//13
mc = (1/(1-alpha))^(1-alpha)*(1/alpha)^alpha*(W/X)^(1-alpha)*(R-(1-delta))^alpha;
// Calvo pricing
//14
PStar = epsilon/(epsilon-1) * g1/g2;
//15
g1 = P^epsilon * Y * mc + theta*beta * g1(+1);
//16
g2 = P^(epsilon-1) * Y + theta*beta * g2(+1);
//17
P = (theta * P(-1)^(1-epsilon) + (1-theta) * PStar^(1-epsilon))^(1/(1-epsilon));
//18
price_disp = theta*(PStar/P)^(-epsilon)*(P/P(-1))^(epsilon) + (1-theta)*(P/P(-1))^(epsilon)*price_disp(-1);
//19
Pi = P/P(-1);
// Dividends and share prices
Df = P * Y *(1-mc);
Pf(+1) + Df(+1) = R(+1) * Pf;
end;
//-----------------------------------------------------------------------//
//--------------------------- Initial Values ----------------------------//
//-----------------------------------------------------------------------//
initval;
M_d = 1; P =1;
x = 0.01;
n = 0.01;
omega = 0.97;
gamma = 0.9;
lambda =0.3878;
pi =0.2394;
eps =1.2832;
OMEGA =1.0124;
R =1.3968;
PSI =0.9988;
mc =0.9064;
Y =0.7407;
C =0.6857;
K =0.459;
H =1.4279;
A =1.365;
P =0.972;
PStar =0.9364;
W =0.448;
Pi =0.98;
Df =0.0681;
Pf =0.1732;
price_disp=1.0336;
g1 =0.601;
g2 =0.6877;
end;
model_diagnostics;
steady;
endval;
gamma = 0.94;
end;
steady;
simul(periods=300);
```
from http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=14206 does not run with
```
ERROR: the second-order cross partial of equation 14 w.r.t. trend variable X and endogenous variable PStar is not null.
```
but the relevant equation
```
PStar = epsilon/(epsilon-1) * g1/g2;
```
should have the trends specified (as far as I can see). `g1/g2=((X*N)^(1-epsilon))/((X*N)^(2-epsilon)=(XN)^(-1)`, which is the trend for `PStar`.4.6Sébastien VillemotSébastien Villemothttps://git.dynare.org/Dynare/dynare/-/issues/1387create JSON output after every step of the preprocessor2019-06-19T15:37:44ZHoutan Bastanicreate JSON output after every step of the preprocessor4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1386implement syntax to declare model variables on the fly2019-06-19T15:37:45ZHoutan Bastaniimplement syntax to declare model variables on the fly4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1384do not automatically create *_set_auxiliary_variables.m on preprocessor run2019-06-19T15:37:45ZHoutan Bastanido not automatically create *_set_auxiliary_variables.m on preprocessor runAs `*_set_auxiliary_variables.m` is sometimes empty, it does not make sense to create it on every run. Only create it if something will be written to it.
This change requires either a flag in `M_` to be tested every time the function ...As `*_set_auxiliary_variables.m` is sometimes empty, it does not make sense to create it on every run. Only create it if something will be written to it.
This change requires either a flag in `M_` to be tested every time the function is called in the code or to test `exist('./*set_auxiliary_variables.m') == 2` and take the appropriate action in the code.4.6Houtan BastaniHoutan Bastanihttps://git.dynare.org/Dynare/dynare/-/issues/1380stop storing index for symbols in SymbolTable2019-06-19T15:37:45ZHoutan Bastanistop storing index for symbols in SymbolTableWe store the variable `size` in `SymbolTable` when we can have access to this info by changing `symbol_table` into a vector and use the size method when we need to know how many symbols are presentWe store the variable `size` in `SymbolTable` when we can have access to this info by changing `symbol_table` into a vector and use the size method when we need to know how many symbols are present4.6Houtan BastaniHoutan Bastani