dynare issueshttps://git.dynare.org/Dynare/dynare/-/issues2024-03-19T13:02:54Zhttps://git.dynare.org/Dynare/dynare/-/issues/1926No dates in Matlab plot when plotting2024-03-19T13:02:54ZRaphaël MARTINNo dates in Matlab plot when plottingDear Dynare Team,
I hope this message finds you well. I am reaching out to discuss an observation regarding the plot() function as described in the Dynare documentation. It is mentioned that the function "overloads MATLAB/Octave’s `plot...Dear Dynare Team,
I hope this message finds you well. I am reaching out to discuss an observation regarding the plot() function as described in the Dynare documentation. It is mentioned that the function "overloads MATLAB/Octave’s `plot` function for `dseries` objects. Returns a MATLAB/Octave plot handle, that can be used to modify the properties of the plotted time series. If only one `dseries` object, `A`, is passed as argument, **then the plot function will put the associated dates on the x-abscissa**". However, in practice, when plotting a simple dseries, the x-axis displays the periods numerically (e.g., 1, 2, 3, etc.) rather than showing the specific dates as intended.
I've managed to devise a workaround for this issue and am sharing it here, hoping it might benefit others facing the same problem.
```
A=dseries([1;2;3],'2020Y','toto');
% This plot doesn't show dates
plot(A)
% Dates for the plot's legend
DsDates = firstobservedperiod(A):lastobservedperiod(A);
x_Labels= cell(1,length(DsDates));
% Transforms dseries dates into characters
for i = 1:length(DsDates)
x_Labels{i} = char(DsDates(i));
end
% This one does
figure()
hold on
xticks(1:length(DsDates));
xticklabels(x_Labels);
plot(A)
```https://git.dynare.org/Dynare/dynare/-/issues/1913Fix handling of squeezing in plot_shock_decomposition2023-12-21T13:18:07ZJohannes PfeiferFix handling of squeezing in plot_shock_decompositionThe original bug in https://forum.dynare.org/t/init2shocks-does-not-work/24591 was addressed via a4e6531420c7f41168eae99b6b924cfc9640e7ef
We still need to address how to deal with squeezing of results that is currently addressed in `plo...The original bug in https://forum.dynare.org/t/init2shocks-does-not-work/24591 was addressed via a4e6531420c7f41168eae99b6b924cfc9640e7ef
We still need to address how to deal with squeezing of results that is currently addressed in `plot_shock_decomposition` via
```
try
[i_var,nvar,index_uniques] = varlist_indices(varlist,M_.endo_names);
catch ME
if isfield(oo_.shock_decomposition_info,'i_var')
warning('shock decomp results for some input variable was not stored: I recompute all decompositions')
M_ = evalin('base','M_');
```
Particularly loading `M_` when it is an input if problematic.Marco RattoMarco Rattohttps://git.dynare.org/Dynare/dynare/-/issues/1903Disentangle functions of diffuse_filter2023-09-07T14:56:43ZJohannes PfeiferDisentangle functions of diffuse_filterThe `diffuse_filter`-option serves three purposes:
1. setting `qz_criterium`
2. setting `lik_init`
3. setting `kalman_algo`
This creates unintended consequences.
1. In principle, we don't need `diffuse_filter` if the observables are st...The `diffuse_filter`-option serves three purposes:
1. setting `qz_criterium`
2. setting `lik_init`
3. setting `kalman_algo`
This creates unintended consequences.
1. In principle, we don't need `diffuse_filter` if the observables are stationary (`diffuse_periods=0`). But `diffuse_filter` is still required to change the setting of `qz_criterium` and set `lik_init`. That seems problematic.
2. Specifying `diffuse_filter` is incompatible with `fast_kalman_filter`, but that will not trigger a warning and will work if `diffuse_periods=0`. But it should be slower due to solving the Lyapunov equation differently.https://git.dynare.org/Dynare/dynare/-/issues/1899Document of fix behavior of det_cond_forecast2023-08-30T18:18:30ZJohannes PfeiferDocument of fix behavior of det_cond_forecastFrom https://forum.dynare.org/t/error-messages-when-building-the-forecast/22873/4.
I think there is either a bug or the manual is wrong. `det_cond_forecast` seems to always expect three input arguments, i.e. the initial forecast date is...From https://forum.dynare.org/t/error-messages-when-building-the-forecast/22873/4.
I think there is either a bug or the manual is wrong. `det_cond_forecast` seems to always expect three input arguments, i.e. the initial forecast date is mandatory.
[IN_AUX.csv](/uploads/ed7b4b47377fb38a92a99c7b0c571549/IN_AUX.csv)
[UForecast.mod](/uploads/e9d55faa83615f4f0040c5bbb45e2d41/UForecast.mod)
Moreover, the second argument is supposed to indicate the past values of the endogenous variables. But using [UForecast_3_arguments.mod](/uploads/bf27cd7ac32670a1a9b5a09b9184e493/UForecast_3_arguments.mod) I get the error message
> the dseries smoothed finish at time 2023Q2 before the last period of forecast 2024Q3
which does not make sense if only past values are needed.https://git.dynare.org/Dynare/dynare/-/issues/1896Discuss detrending of lagged trend_var2023-07-28T08:06:08ZJohannes PfeiferDiscuss detrending of lagged trend_varConsider
```
var gd, gu;
trend_var(growth_factor=gu) Bu;
trend_var(growth_factor=gd) Bd;
varexo vd,vu;
parameters gamu,gamd,thetadu;
gamu=.01;
gamd=.003;
thetadu=0.3;
model;
log(gu)=log(1+gamu)+vu;
log(gd)=log(1+gamd)+thetadu*l...Consider
```
var gd, gu;
trend_var(growth_factor=gu) Bu;
trend_var(growth_factor=gd) Bd;
varexo vd,vu;
parameters gamu,gamd,thetadu;
gamu=.01;
gamd=.003;
thetadu=0.3;
model;
log(gu)=log(1+gamu)+vu;
log(gd)=log(1+gamd)+thetadu*log(Bu(-1)/Bd(-1))+thetadu*log((1+gamu)/(1+gamd))+vd;
end;
initval;
gu=1.01;
gd=1.003;
vd = 0; vu=0;
end;
steady;
check;
shocks;
var vd; stderr 0.02;
var vu; stderr 0.02;
end;
write_latex_dynamic_model;
collect_latex_files;
stoch_simul(irf=150,order=1) gu gd;
```
from https://forum.dynare.org/t/impulse-responses-with-cointegrated-stochastic-trends/22756
Internally, we replace the lagged `trend_var Bu`, i.e. `Bu(-1)`, by its definition `Bu/gu`. The problem is that we then use the normalization `Bu=1`, i.e. we fix today's value of the trend and have `gu` implicitly determine the predetermined value yesterday. As a consequence, the variable `gd` on the left suddenly reacts contemporaneously to `gu`, although in the original equation everything on the right was predetermined. My understanding is that for a stochastic `growth_factor` this detrending approach is problematic as we are violating predeterminedness. What is the solution to this issue? Normalizing an endogenous object at time $t$ to 1 seems to be poor practice. At a minimum, we need to document the current behavior.https://git.dynare.org/Dynare/dynare/-/issues/1880Missing input sanitization in parallel configuration file2023-09-06T10:54:55ZSébastien VillemotMissing input sanitization in parallel configuration fileInput read from the parallel configuration file, specifically from the `UserName`, `ComputerName`, and `RemoteDirectory` fields, is passed directly to a `system` call without any sanitization.
Command injection example with the `UserNam...Input read from the parallel configuration file, specifically from the `UserName`, `ComputerName`, and `RemoteDirectory` fields, is passed directly to a `system` call without any sanitization.
Command injection example with the `UserName` field:
```
[cluster]
Name = LocalProfile1
Members = n1
[node]
Name = n1
ComputerName = 192.168.1.62
CPUnbr = 8
NumberOfThreadsPerJob = 1
OperatingSystem = unix
RemoteDirectory = test
UserName = & ping 127.0.0.1 &
Password = test
```
Intigriti submission reference: `DYNARE-4CN0UV5J`https://git.dynare.org/Dynare/dynare/-/issues/1843Fix stochastic singularity check with `heteroskedastic_shocks`2022-09-21T08:29:57ZJohannes PfeiferFix stochastic singularity check with `heteroskedastic_shocks`Johannes PfeiferJohannes Pfeiferhttps://git.dynare.org/Dynare/dynare/-/issues/1716Fix bug in contemp_reduced_form of SBVAR2020-03-16T08:27:57ZJohannes PfeiferFix bug in contemp_reduced_form of SBVARAs outlined in https://forum.dynare.org/t/different-results-of-a0-using-sbvar/15359 the attached codes crashes due to non-conformable matrices.
[MacroData.mat](/uploads/e30cd873d1add8fc54a1e0e65aa0949d/MacroData.mat)
[constantRecursiveB...As outlined in https://forum.dynare.org/t/different-results-of-a0-using-sbvar/15359 the attached codes crashes due to non-conformable matrices.
[MacroData.mat](/uploads/e30cd873d1add8fc54a1e0e65aa0949d/MacroData.mat)
[constantRecursiveBVAR.mod](/uploads/f7b1c204676a2323d03a467702f6e3c5/constantRecursiveBVAR.mod)