Previously, LBJ was available:
– under stack_solve_algo=6 when neither block nor bytecode were present
– under stack_solve_algo=1 with either block or bytecode (but the documentation
was not making it clear that it was LBJ)
This commit merges the two values for the option, and makes them
interchangeable. LBJ should now be invoked with stack_solve_algo=1 (but
stack_solve_algo=6 is kept for compatibility, and is a synonymous).
It is now supported by the MATLAB editor (as of R2022a).
The old ASCII notation is left in some files that we copy as-is from other
sources (e.g. in the contrib/ and m4/ subdirectories).
The particles submodule is not updated at this point, because it is in an
inconsistent state.
[skip ci]
Trust region with block decomposition (as provided by dmperm) fails to provide
correct simulations (most likely due to the interpretation of tolf which
depends on the number and size of blocks).
Improve the model that is used to test all combinations of algorithms with
block and bytecode options, by ensuring that it includes the 8 possible types of blocks:
– Solve {forward, backward, two boundaries} {simple, complete}
– Evaluate {forward, backward}
All the “Solve” blocks are also included in both linear and nonlinear forms
(since the codepaths are typically different depending on the linearity of
the block).
Note that there is no such thing as a nonlinear “Evaluate” block, since the
endogenous variables of the block always enter linearly (on the LHS).
Also:
- use perfect_foresight_{setup,solver} instead of simul (and disable automatic homotopy)
- add a shock on e_R (though this is not strictly needed since the
corresponding block already inherits the shock from another ancestor block)
- remove the block for observables, there is already another block of type
“Evaluate forward”
– Temporary terms were not correctly passed between blocks
– solve_algo ⩾ 9 was incorrectly passed through bytecode own’s solver instead
of through dynare_solve
Also adjust the periods in Simulated_time_series (output of the perfect
foresight solver in the workspace). Note that this dseries object contains the
observations for the initial condition (M_.orig_maximum_lag observations) and
for the terminal condition (M_.orig_maximum_lead observations).
See #1838.
Fix testsuite (wrong file name)
Enforce the positivity of standard errors in the maximum likelihood
estimations. Otherwise some stderr are estimated negative, and the Bayesian
estimation fail because the initial value is out of the bounds of the prior
shape.
Auxiliary variables were still present in the growth neutrality correction. This
commit remove the auxiliaries, so that the user doesn't need to update the
database with the auxiliary variable definitions.
Also adds integration test.
TODO Check that it works with log unary op
TODO Complete tests by checking that the written evaluate routine works
The taget in PAC equation can be decomposed into an arbitrary number of components (variables
in the VAR auxiliary model).
TODO Iterative OLS estimation (which is not the preferred estimation routine).
TODO Decomposition in the routine evaluating the forecasts for each component.
The change implemented in 21a8a5794a broke the
testsuite and was incomplete.
– new option “overwrite” to provide the old behaviour (used to fix the testsuite);
– when concatenating several “estimated_params” block, the preprocessor now
checks that paramateres are not declared twice across blocks.
– multiple “model” and “estimated_params” block are supported
– new “model_options” statement to set model options in a global fashion
– new “model_remove” command to remove equations
– new “model_replace” block to replace equations
– new “var_remove” command to remove variables (or parameters)
– new “estimated_params_remove” block to remove estimated parameters
gen_data.mod creates a datafile called "data.mat"
test_compute_Pinf_Pstar_data.mod creates a datafile called "Data.mat"
There could be a race condition on systems that don't distinguish between upper and lower cases.
This commit only introduce new elements in the Dynare language (adding the
possibility to decompose the target into stationary and non stationary
components) and insure that all the former codes (ie without decomposition of
the target) are still working as expected.
- Force long run levels of the exogenous variables to be zero or g (the BGP growth rate of the LHS endogenous variable).
- Fix the correction of the correction for the share λ (aak γ).
- Provisions for the case where the long run level of the exogenous variable is
different from 0 or g (see tmp1 and ll which should be added to the growth
neutrality correction as a constant).
(cherry picked from commit a4423d734e1df1d4ee09c7225d7fd610e0d94cd1)
- Creates the library `libkordersim` with all the relevant Fortran routines to `folded_to_unfolded_dr` and `local_state_space_iteration_fortran`
- Implements `folded_to_unfolded_dr`, which converts folded decision rule matrices to their unfolded counterparts
- evaluate_planner_objective now returns conditional welfare depending on the initial value of the Lagrange multipliers when it is suitable to do so
- histval blocks are no longer ignored
A bug was introduced in 440a0e460b, erroneously
changing the name of the baseline for a comparison.
The bug was left unnoticed with recent versions of MATLAB and on Octave,
because the first array in the ensuing comparison had zero line, and because of
automatic broadcasting, the error message was not triggered.
However, the bug was exposed on MATLAB < R2016b.
Instead of checking everything in one mod file, this commit separates the checks into individual mod files that test:
- whether the translation from matched_moments works
- whether the duplicate moments are found
- whether GMM and SMM both work with different estimated_params blocks.
wip
These command solve the problem where agents think they know perfectly the
future (they behave as in perfect foresight), but make expectation errors.
Hence they can potentially be surprised in every period, and their expectations
about the future (incl. the final steady state) may change.
Currently the sequence of information sets needs to be passed through a CSV
file. Another interface may be added in the future.
The algorithm uses a sequence of (true) perfect foresight simulations (not
necessarily as many as there are periods, because if the information set does
not change between two periods, there is no need to do a new computation).
There are two possibilities for guess values:
— the default is to use the initial steady state for the simulation using the
first-period information set; then use previously simulated values as guess
values
— alternatively, with the terminal_steady_state_as_guess_value option, use the
terminal steady state as guess value for all future periods (this is actually
what the “true” perfect foresight solver does by default)
Partially addresses issue #1680:
- unconditional welfare resorts to dynare++ simulation tools, which shall be updated very soon
TO DO:
- implement a function computing kth-order approximation of simulated moments of y