Commit Graph

1242 Commits (2f13d6610d6842adc4a4b448eb45ebd4223967e6)

Author SHA1 Message Date
Willi Mutschler f4dc2ee743
🐛 Fix wrong third-order computation in pruned state space system
Related to #1706

 Add unit test for pruned state space up to order 3


//


Changed tolerance in new test
2020-02-16 22:55:16 +01:00
Houtan Bastani 71def361fb
macro processor: add test of tuple index in @#for loop
[skip ci]
2020-02-14 17:29:41 +01:00
Sébastien Villemot 633f1ad85a
Testsuite: change the seed for some Octave test
Under Octave, the default seed in fs2000ns_uncorr_ME.mod leads to a generated
dataset that makes fs2000ns_corr_ME.mod and fs2000ns_corr_ME_missing.mod
fail (due to a large difference between univariate and multivariate diffuse
filters).
2020-02-13 18:12:10 +01:00
Sébastien Villemot 3b60e26e63
Testsuite: properly clean generated datafiles under kalman/likelihood_from_dynare/ 2020-02-12 18:02:08 +01:00
Johannes Pfeifer 30bfa16211 Fixes related to estimation under discretion 2020-02-06 13:30:00 +01:00
Sébastien Villemot a8e54d791a
Testsuite: set the random seed for unitary tests, for reproducibility 2020-02-04 18:19:35 +01:00
Sébastien Villemot 177c5c359f
Implement estimation under discretionary optimal policy
Also add a test case.

For the time being, estimating parameters that appear in the discount factor is
not supported.

Ref. #1173
2020-02-03 18:29:45 +01:00
Johannes Pfeifer 6cf5e6495a fs2000_simul.mod: make sure we use the estimated parameter vector
Makes the simulation converge without turning to homotopy
2020-01-31 13:22:47 +01:00
Johannes Pfeifer 9e82432f87 Gali_discretion.mod: filter out NaN in planner_objective
Related to https://git.dynare.org/Dynare/dynare/issues/1699
2020-01-29 17:48:16 +01:00
Sébastien Villemot 7f02fe5a78
Testsuite: increase numerical tolerance for sw_minimal.mod test
Needed for some runners, e.g. lupi
2020-01-27 23:16:41 +01:00
Stéphane Adjemian (Charybdis) 82f642fbca
Added missing case in integration tests for particle filters.
There was not test for the conditional particle filter (CPF).
2020-01-27 22:57:41 +01:00
Sébastien Villemot fc27fad46d
Preprocessor: Do not simplify constant equations which have a tag attached
In particular, in the case of an 'mcp' tag, this could lead to a convergence
failure.

Also modify the lmmpc/rbcii.mod test so that it fails if convergence is not
obtained, in order to detect such regressions earlier.

Closes: #1697

This preprocessor update also includes the following changes:
— removal of license.txt, now merged in back in the main Dynare one
– various code simplifications and modernizations in the macro processor
— minor code simplification in parsing of the --+ options: … +-- line
2020-01-27 16:12:25 +01:00
Sébastien Villemot 01d5d734c6
CI: skip two further tests under MATLAB R2009b, that apparently trigger a MATLAB bug 2020-01-24 16:40:55 +01:00
Sébastien Villemot 3b9cc0e9f7
Testsuite: use whitespace-separated syntax for options in .mod file
Follows from d3e90a8dbf.
2020-01-24 16:01:17 +01:00
Willi Mutschler 3d51ee9e23
Added unit tests for minimal state space system 2020-01-24 14:20:05 +01:00
Willi Mutschler aa0f278edc
📃 Update license 2020-01-24 12:45:15 +01:00
Willi Mutschler 5525a7c515
🏇 Better minimal state space handling and unit tests 2020-01-24 12:45:08 +01:00
Willi Mutschler c4f7c416fa
🐛 Fix #1694 by robust rank tolerance and histc 2020-01-24 12:44:26 +01:00
Sébastien Villemot 66a5113500
Preprocessor: fix derivation order for “identification” without “stoch_simul”
Also add a regression test.

Closes: preprocessor#40
2020-01-20 17:28:05 +01:00
Sébastien Villemot e371b1a94b
New option “filtered_theoretical_moments_grid”, that supersedes “hp_ngrid”
The old option is left for backward-compatibility purposes, but it has the same
effect as the new one.

Closes: #1093
2020-01-20 16:23:10 +01:00
Sébastien Villemot a753c18d61
Testsuite: add various missing files to source tarball 2020-01-16 16:54:47 +01:00
Sébastien Villemot 3ee9ada8d3
Octave compatibility fix: skip unit test for load_m_file_data_legacy.m
The failure is impossible to reproduce outside the runners. Skip the test, for
lack of a better solution.
2020-01-14 14:58:38 +01:00
Sébastien Villemot 9bac6a0d32
Octave compatibility fix: skip some tests under Octave 5.1, due to a bug in ordeig 2020-01-14 11:49:41 +01:00
Sébastien Villemot c5f50a34e2
MATLAB compatibility fix: skip identification/kim/kim2.mod test under R2009b
MATLAB crashes, most likely due to an internal bug.
2020-01-14 11:45:03 +01:00
Sébastien Villemot 7c2338034f
Testsuite: drop useless version check (we require at least MATLAB R2009b/7.9) 2020-01-14 11:26:06 +01:00
Sébastien Villemot fd13063a5c
Octave compatibility fix: “fig” format is unsupported 2020-01-13 18:33:47 +01:00
Sébastien Villemot bde2f1977c
MATLAB compatibility fix: skip mode_compute=3 test under R2009b
In this version, fminunc fails due to Inf value.
2020-01-13 18:30:28 +01:00
Sébastien Villemot d9b9f78392 Merge branch 'particle_check' into 'master'
Particle filters: provide error if trends or prefiltering is used

Closes #1690

See merge request Dynare/dynare!1695
2020-01-13 11:02:29 +00:00
Johannes Pfeifer 23cac089f1 fs2000_ns_common.inc: set order of approximation explicitly to 1 2020-01-12 17:13:24 +01:00
Sébastien Villemot 7e770f69e7
Remove workaround for errors in MEX files
Because at some point throwing exceptions from MEX files (with mexErrMsgTxt())
was not working under Windows 64-bit, we had designed a workaround to avoid
using exceptions.

Most MEX files were returning an error code as their first (or sometimes last)
argument, and that code would have to be checked from the MATLAB code.

Since this workaround is no longer needed, this commit removes it. As a
consequence, the interface of many MEX files is modified.

For some background, see https://www.dynare.org/pipermail/dev/2010-September/000895.html
2020-01-10 18:33:11 +01:00
Houtan Bastani bf102030cb
support saving exogenous variables in `dynasave`, `dynasave`; fix bugs in `dynasave`; add test
- `dynasave`: if a variable being saved was named `n` or `s`, the `eval` statements would break the code
- `dynasave`: use the `-struct` option to `save` to avoid `eval` statements
- `dynasave` and `dynatype`: do everything in 1 loop instead of 2
- `dynasave` and `dynatype`: use `strcmp` instead of `strfind`

- preprocessor update contains:
  - Partial reversion of global indentation of macro processor header files introduced in e2d5a83592634f0604d8c86409748cd2ec5906d2
  - Symbol List check pass: allow caller to specify the valid types of variables in a Symbol List
  - Allow `dynasave` and `dynatype` to support exogenous variables in their var_list

issue #1691
2020-01-06 12:45:44 +01:00
Willi Mutschler 45e9771eb8
Fixed bug regarding non-stationary variables in pruned moments 2019-12-20 12:30:53 +01:00
Willi Mutschler 8b9b49f8d7
Finished identification order=1|2|3
Note that I still need to do a code clean up (provide some licenses for functions from other people) and to double check order=3. There is also much room for speed and memory improvement, but the code works fine for now. I will also provide more information to the merge request soon about the detailed changes for future reference.
2019-12-20 12:28:55 +01:00
Sébastien Villemot d40b775260
Preprocessor: new “with_epilogue” option and related fixes
Ref. !1688
2019-12-20 11:57:34 +01:00
Sébastien Villemot c04c111d97
Merge branch 'rattoma/dynare-epilogue'
Ref. !1688
2019-12-20 11:51:41 +01:00
Stéphane Adjemian (Charybdis) 78c36dd0b7 Fixed data files for nonlinear filter's integration test. 2019-12-20 11:31:56 +01:00
Stéphane Adjemian (Charybdis) 53c9d9de69 Use steady_state_model in tests/particles/dsge_base2.mod. 2019-12-20 11:31:56 +01:00
Stéphane Adjemian (Odysseus) 58da5e7120 Added timing for comparing the mex iterating on the nonlinear reduced form model.
local_state_space_iteration_k is significantly slower than old local_state_space_iteration_2...
2019-12-20 11:31:56 +01:00
Sébastien Villemot 996bdd6c64 New local_state_space_iteration_k MEX, for nonlinear filters at k-order
It applies the approximated policy function to a set of particles, using
Dynare++ routines.

There is support for parallelization, using Dynare++ multithreading
model (itself based on C++11 threads; we don’t use OpenMP because it is
incompatible with MKL). For the time being, default to a single thread. This
should be later refined through empirical testing.
2019-12-20 11:31:56 +01:00
Marco Ratto 87963acb3a adapted test function for plot shock decompositions. still needs the new option with_epilogue. 2019-12-19 22:23:28 +01:00
Sébastien Villemot 1ac7344e42
Rollback introduction of +get and +set folders
Under Octave, having namespaces called “get” and “set” overshadows the builtin
functions with the same names, which are needed for graphics manipulation.

Therefore we go back to the initial function naming scheme, but moving all
those functions under an “accessors” subdirectory.

Among other things, this is a revert of
e4134ab59b and
c5e86fcb59.

Ref. !1655, !1686
2019-12-19 17:20:38 +01:00
Sébastien Villemot efa6c6c682
“datafile” option of “perfect_foresight_setup” (and “simul”) now equivalent to “initval_file”
Ref. #1663
2019-12-19 14:58:54 +01:00
Sébastien Villemot 7e07d3e0fc
Testsuite: add further check to verify that “initval_file” works as expected
Ref. #1663
2019-12-19 14:51:59 +01:00
Sébastien Villemot e81c837c51
Testsuite: fix engine for testing M scripts
I’m not sure it has ever worked.

As a consequence, remove the workaround that had apparently been implemented in
tests/initval_file/ramst_initval_file.mod.
2019-12-19 14:51:56 +01:00
Sébastien Villemot 2c9ea629bd Merge branch 'utilsx' into 'master'
Moved get and set utilities to +get and +set

See merge request Dynare/dynare!1686
2019-12-19 09:42:19 +00:00
Sébastien Villemot f720f470bf
Preprocessor update
— “ramsey_policy”: bugfix when no option is passed
— various improvements to “epilogue” (preprocessor#36)
— compatibility with Bison 3.5
— bugfix in search for constant equations
— new “planner_discount_latex_name” option of “ramsey_policy” (Closes: #1686)
2019-12-18 17:46:38 +01:00
Sébastien Villemot cc54fff571
Testsuite: fix typo in m/optimal_policy/Ramsey rule 2019-12-18 17:29:12 +01:00
Sébastien Villemot 6ba10b88f2
Preprocessor: various provisions for improvements to shock decomposition
Accordingly update the MATLAB routines, the testsuite, and the manual.

In particular, “squeeze_shock_decomp” has been renamed to
“squeeze_shock_decomposition” for consistency with other commands.

Ref. #1687, !1655
2019-12-18 11:56:57 +01:00
Marco Ratto e4134ab59b fixed calls to moved utilities 2019-12-17 22:26:38 +01:00
Stéphane Adjemian (Odysseus) 432faa3fae Fixed trailing whitespace warning.
[skip ci]
2019-12-17 21:59:13 +01:00