Commit Graph

603 Commits (440a0e460bd26a1b773ed3876d430dffb60fe620)

Author SHA1 Message Date
Johannes Pfeifer 440a0e460b
Storage of results: use subfolder
Ref. #1758
2021-07-23 14:12:17 +02:00
Marco Ratto 02072dde39
Add Occbin routines
Syntax is not yet finalized (see preprocessor#68).
Documentation still to be done.

Ref. #569
2021-07-16 17:20:11 +02:00
Stéphane Adjemian (Ryûk) 54f80e88d2
Add structural VAR as an auxiliary model for VAR based expectations and PAC expectations.
Ref. #1785

Just add option `structural` to the `var_model` command.
2021-07-16 10:25:18 +02:00
Stéphane Adjemian (Ryûk) 547b7aef45
Activate integration test for NLS estimation. 2021-07-15 17:39:41 +02:00
Sébastien Villemot abd64c256e
New perfect_foresight_with_expectation_errors_{setup,solver} commands
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)
2021-07-09 18:16:46 +02:00
Stéphane Adjemian (Ryûk) fe63082c42
Add lagged information set in VAR based expectations. 2021-07-06 23:06:46 +02:00
Sébastien Villemot 18a172bd45
Merge branch 'mcp_ramsey' of git.dynare.org:JohannesPfeifer/dynare
See merge request !1874
2021-06-16 17:41:40 +02:00
Johannes Pfeifer 1d10659b59 get_complementarity_conditions.m: fix equation numbering with ramsey_model
M_.equation_tags already contains the correct equation number
2021-06-16 13:21:49 +02:00
Normann Rion 3d27672c58
kth-order approximation of conditional welfare
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
2021-06-15 15:04:31 +02:00
Sébastien Villemot 2952d18343
Testsuite: improve and integrate unit test for A·(B⊗C) MEX files
In particular, add a test for the sparse A·(B⊗C) where B≠C.
2021-06-14 15:28:34 +02:00
Johannes Pfeifer 0116870399 pruned_state_space: handle shocks with 0 variances 2021-06-11 14:15:31 +02:00
Stéphane Adjemian (Charybdis) 27ee801a67
Add specialized version of sim1 for static models.
Also add an integration test and fix homotopy error message.
2021-05-28 14:11:34 +02:00
Johannes Pfeifer f78ac9f5ac
EP with MCP: add test case 2021-05-28 13:49:58 +02:00
Marco Ratto 5fa6265944 Implement new option smoother_redux, to allow fast smoother for very large models. It runs smoother only for state variables and computes the remaining ones ex-post
Contains improvements, in order to recover as much as possible static unobserved (filtered, smoothed, updated, k-step ahead), Variance, State_uncertainty, k-step ahead variances trying to map lagged states onto current ones using pinv(T). This has exceptions (namely lagged shocks which are ONLY used to recover static NON observed variables). this exception is also trapped.
For such extensions we can only recover smoothed variables starting from d+1. Variances CANNOT be recovered for such variables (the smoother gives ZERO.)
2021-05-27 16:59:15 +02:00
Marcoo Ratto 1645f38269
Implement heteroskedastic filter and smoother 2021-05-26 18:45:16 +02:00
Sébastien Villemot cf37b5151a
Testsuite: indicate that glibc bug has been fixed in version 2.34
[skip ci]
2021-05-11 18:54:07 +02:00
Sébastien Villemot 0d6bc47158
Merge branch 'rattoma/dynare-mh_initialize_from_previous_mcmc'
Ref. !1841
2021-05-11 18:51:57 +02:00
Marco Ratto a0f2b2399b
New option mh_initialize_from_previous_mcmc that allows to pick initial values for a new MCMC from a previous one
If an additional parameter is estimated, it is initialized using prior_draw.
2021-05-11 18:48:43 +02:00
Sébastien Villemot 3c7865a950
Merge branch 'rattoma/dynare-initial_estimation_checks_errors'
Ref. !1839
2021-05-07 17:52:45 +02:00
Marco Ratto 74121c2aee
New no_init_estimation_check_first_obs option that allows to skip check of singularity in first observation
(like deficient # of shocks in the presence of stockflow observed)
2021-05-07 17:51:03 +02:00
Sébastien Villemot 58b2bc78c3
Testsuite: check that stochastic solution in block decomposition mode is correct
Only test with mfs=0, since the result is wrong for other mfs values.

Ref. #1726
2021-05-04 16:31:44 +02:00
Sébastien Villemot ef58f1329a
Testsuite: factorize code between block decomposition tests based on LOLA model
By the way, move tests files under tests/block_bytecode/, which is a more
natural place.

Ref. #1726
2021-05-04 16:17:37 +02:00
Sébastien Villemot d68fc14fed
Build system: remove trailing whitespace in Makefile 2021-03-29 15:27:47 +02:00
Sébastien Villemot 559b0b5679
Source package: fix name of ms-sbvar datafile
Bug introduced in 11f8f9c7f4
2021-03-17 18:11:40 +01:00
Sébastien Villemot c9eb6920c9
local_state_space_iteration_k MEX: fix bug in output
In its output, the MEX was returning values for all endogenous variables, but
it was used in a context where only the variables from oo_.dr.restrict_var_list
were expected (as is done with local_state_space_iteration_2 MEX).

This commit fixes this discrepancy, and also fixes the test that was checking
that both MEX are returning the same output.

Closes: #1768
2021-03-10 13:45:29 +01:00
Normann Rion 9db1265892 Asssesing welfare in perfect-foresight frameworks
Ref. #1680
2021-02-25 15:12:28 +01:00
Sébastien Villemot 9066d31dd7 Merge branch 'ramsey_problem' into 'master'
Ref. #1680 : 2nd-order welfare

See merge request Dynare/dynare!1828
2021-02-23 16:08:53 +00:00
Normann Rion e880d1bcc3 Ref. #1680: 2nd-order welfare 2021-02-17 13:53:55 +01:00
Sébastien Villemot a51bdf8948
Merge branch 'smoother2histval' of git.dynare.org:JohannesPfeifer/dynare
Ref. !1831
2021-02-16 16:58:59 +01:00
Johannes Pfeifer 788e05b2fd smoother2histval: add test case for correctness 2021-02-16 11:25:46 +01:00
Sébastien Villemot 7cbb86bb64
Testsuite: rename estimation/univariate/ols/ols.mod
Under Octave, the +ols folder conflicts with the builtin ols() function.
2021-02-09 16:58:07 +01:00
Sébastien Villemot 1cd3bfbfa8
Merge branch 'kalman_initial_state' of git.dynare.org:JohannesPfeifer/dynare 2021-01-29 15:34:11 +01:00
Johannes Pfeifer 7c8f486727 Allow setting initial state for Kalman filter
Supersedes https://git.dynare.org/Dynare/dynare/-/merge_requests/1522
2021-01-28 17:24:27 +01:00
Sébastien Villemot 6e6bc3f6c9
Testsuite: rename test files for Octave compatibility
Rename histval_initval_file/ramst_data.mod to ramst_data_generate.mod.
Otherwise, there is a conflict between the +ramst_data folder and the generated
ramst_data.m.

Similarily, rename shock_decomposition/shock_decomposition_backward.mod to
shock_decomposition/shock_decomp_backward.mod (otherwise it conflicts with
matlab/shock_decomposition_backward.m).
2021-01-27 18:24:22 +01:00
Johannes Pfeifer ec69174173
Improvements to particle tests 2021-01-22 21:19:07 +01:00
Stéphane Adjemian (Charybdis) 0f3dd003b7
Run mod files in tests/particle. 2021-01-16 17:42:17 +01:00
Johannes Pfeifer ad17b8ec33
Particle filtering: provide more informative error messages in typical problematic cases
Also adds test cases
2021-01-15 22:11:20 +01:00
Sébastien Villemot 91b0ba64c6
Testsuite: rename all test files that have the name “example.mod”
That filename conflicts with Octave’s builtin example() function.
2021-01-15 17:19:41 +01:00
Sébastien Villemot 23cb1879e9
Testsuite: fix PAC test filename 2021-01-15 17:19:41 +01:00
Willi Mutschler a697002a4e
MoM: Gradient-based optimizers can use analytical Jacobian for GMM
New option analytic_jacobian for mode_compute 1, 3, and 13
2021-01-14 10:03:39 +01:00
Stéphane Adjemian (Odysseus) b87690a9f1 Revert "Add tests for matrix notation"
This reverts commit 8d4a80956c.
2021-01-12 16:47:56 +01:00
Stéphane Adjemian (Odysseus) 0e1c9312e2
Merge remote-tracking branch 'Dynare/master' into enterprise 2021-01-11 11:06:55 +01:00
Willi Mutschler dabe0ada33
MoM: Add test for optimizers
Note that mode_compute=11 and 12 need some fixing
2021-01-07 14:14:13 +01:00
Willi Mutschler 562a9c737f
MoM: Improve testsuite
- add Andreasen, Fernandez-Villaverde, Rubio-Ramirez (2017) test models
- move models to dedicated folders
- add `make m/method_of_moments` and `make o/method_of_moments` commands to run testsuite only for method of moments
2021-01-06 14:19:17 +01:00
Sébastien Villemot 5deaca993b
Merge branch 'discretion' of git.dynare.org:JohannesPfeifer/dynare 2020-12-22 12:29:38 +01:00
Johannes Pfeifer 4b793da2c3 discretionary_policy: allow for non-linear model to be used 2020-12-18 18:22:39 +01:00
Johannes Pfeifer 4cf9f7d1a7 stoch_simul.m: reports second moments based on pruned state space at order=2 when pruning is specified
Related to https://git.dynare.org/Dynare/dynare/-/merge_requests/1744
2020-12-17 09:45:28 +01:00
Stéphane Adjemian (Charybdis) e066556d7a
Added integration test for d8ddd9ef6. 2020-12-07 22:25:54 +01:00
Sébastien Villemot 1c0d1409ea
Fix the use of [static]/[dynamic] equations with the “block” option 2020-12-07 16:24:13 +01:00
Sébastien Villemot f27852d1ec
Add test for mshocks block 2020-11-26 15:48:57 +01:00