Commit Graph

635 Commits (cd76bdff9e1092b2d551e1742519279aeae656ec)

Author SHA1 Message Date
Stéphane Adjemian (Ryûk) cd76bdff9e
Fix and update unit tests for local_state_space_iteration_2.
Add mat file with git lfs.
2022-05-13 12:13:46 +02:00
Sébastien Villemot 8488674ce4
New shocks(learnt_in=…) and endval(learnt_in=…) blocks
For use with perfect_foresight_with_expectation_errors_setup.
2022-04-21 17:10:52 +02:00
Sébastien Villemot 96346b77e5
Octave 7 compatibility fix: in testsuite, replace --no-window-system option by xvfb-run
This is a workaround for Octave bug 62101, which affects
tests/shock_decomposition/ls2003_plot.mod, but is unlikely to be fixed.
2022-04-15 14:33:02 +02:00
Sébastien Villemot a8a9051b31
New option “constant_simulation_length” to “perfect_foresight_with_simulation_errors_solver” command 2022-04-12 15:45:50 +02:00
Sébastien Villemot 3b4ef0df49
Add new “log” option to “var” statement
Ref. #349
2022-03-30 18:01:22 +02:00
Sébastien Villemot 63bcd2558e
Testsuite: when running Octave, use --no-window-system option rather than forcing gnuplot toolkit
In practice --no-window-system currently implies the gnuplot toolkit with dumb
terminal, but it is cleaner this way.
2022-02-23 12:13:27 +01:00
Stéphane Adjemian (Charybdis) e7d11dd7b1
Remove aux variables from target definition (PAC). 2022-02-18 09:13:17 +01:00
Sébastien Villemot 39f47dc957
local_state_space_iteration_k MEX now uses the Fortran code (instead of the C++ code)
Closes: #1802
2022-02-04 11:49:46 +01:00
NormannR 5f828e241f Parallelizes local_state_space_iteration_fortran 2022-01-31 18:44:48 +01:00
Stéphane Adjemian (Ryûk) f5f47cd834
Add new option last_simulation_period to initval_file command.
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)
2022-01-21 17:39:47 +01:00
Stéphane Adjemian (Ryûk) a08de9e661
Partial fix for #1837. 2022-01-19 09:20:22 +01:00
Stéphane Adjemian (Charybdis) 1fd4904ccc
Fix evaluate routine if PAC's growth option is constant. 2022-01-17 16:56:58 +01:00
Stéphane Adjemian (Charybdis) e1d0ce28d2
Remove aux variables from evaluate routine.
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
2022-01-14 20:45:46 +01:00
Stéphane Adjemian (Ryûk) d841fc7cc2
Do not run integration tests for NLS with Octave.
Also moved some integration tests.
2021-12-19 17:20:15 +01:00
Stéphane Adjemian (Ryûk) 24c817afa7
Add integration tests for NLS estimation. 2021-12-17 18:02:24 +01:00
Stéphane Adjemian (Ryûk) b297353b06
PAC decomposition between stationary and non-stationary components.
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.
2021-12-17 12:17:13 +01:00
Sébastien Villemot 21a8a5794a
Various new model editing features
– 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
2021-12-15 17:33:01 +01:00
Sébastien Villemot f8fc786459
Merge branch 'het_shocks' of git.dynare.org:JohannesPfeifer/dynare
Ref. !1980
2021-12-15 10:27:06 +01:00
Willi Mutschler 488ab7a979
Update testsuite Kalman Smoother name of data file
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.
2021-12-15 10:26:38 +01:00
Johannes Pfeifer 1bfb9ffbb9 heteroskedastic shocks: take into account first_obs 2021-12-14 11:21:16 +01:00
Sébastien Villemot d69c14398d
Factorize test for normpdf(), normcdf(), erf() and trigonometric functions
Incidentally:
- add trigonometric tests for bytecode
- add back a test for pure M-files
2021-12-07 17:00:57 +01:00
Johannes Pfeifer 733ffdf3ab Add unit test for k-order simulations 2021-10-12 15:20:11 +02:00
Sébastien Villemot 9fd0806643
Testsuite: do not distribute optimal_policy/Ramsey/oo_ramsey_policy_initval.mat
It is a generated file.

By the way, ensure that the generated file has the .mat extension under Octave.
2021-09-27 16:43:50 +02:00
Sébastien Villemot fa3ed38735
Source package: fix bug introduced in d62a09cdef 2021-09-21 17:45:30 +02:00
Johannes Pfeifer e7b1d4aca5 testsuite: Fix missing dependence 2021-09-11 11:29:18 +02:00
Sébastien Villemot badb36d6d2
Fix typos introduced in c68e4801bd 2021-09-02 20:43:21 +02:00
Sébastien Villemot c68e4801bd
Build system: add several test files to the source package 2021-09-02 17:14:07 +02:00
Johannes Pfeifer cf6621187e
Add example for system prior
(@stepan removed trailing spaces)
2021-08-17 19:39:02 +02:00
Johannes Pfeifer b8c76a96e3 block_kalman_filter: add integration tests 2021-08-17 14:26:58 +02:00
Willi Mutschler f5ec70a06d
MoM: Refactor AnScho test case
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
2021-08-16 10:58:35 +02:00
Stéphane Adjemian (Ryûk) bdc95dd1d0
Add unit tests (trust_region algorithm).
Using mex implementation (block_trust_region).
2021-07-23 19:44:16 +02:00
Stéphane Adjemian (Ryûk) a905539f60
Add test functions for nonlinear solvers. 2021-07-23 19:44:16 +02:00
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