Commit Graph

1842 Commits (f2abdb6ec86b7c5fcc861cb5f5d91339c921bc71)

Author SHA1 Message Date
Sébastien Villemot 32cf926ef8
Macro-variables defined without a value are now set to “true”
They were previously set to 1.

Ref. preprocessor#43
2022-06-16 16:52:50 +02:00
Sébastien Villemot 06f665e231
Perfect foresight: LBJ now available under stack_solve_algo=1 (with/without block/bytecode)
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).
2022-06-15 15:06:33 +02:00
Stéphane Adjemian (Ryûk) ac2b3f2bdc
Add integration tests for model inversion. 2022-05-20 08:31:03 +02:00
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 63a116fb28
New += and *= syntaxes in “endval(learnt_in=…)” blocks 2022-05-03 17:46:59 +02:00
Sébastien Villemot 252a592f1a
Allow “learnt_in=1” for “shocks” and “endval” 2022-04-29 15:55:57 +02:00
Stéphane Adjemian (Charybdis) 8b197bf71c
Remove duplicate assignments for parameters. 2022-04-28 12:58:22 +02:00
Stéphane Adjemian (Charybdis) 4386116c91
Fixed unit tests. 2022-04-28 12:58:22 +02:00
Sébastien Villemot a600336c92
New “add” and “multiply” keywords in “shocks(learnt_in=…)” block 2022-04-26 15:22:15 +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 418c290ead
Octave 7 compatibility fix: rmdir() now errors out if the directory is nonexistent 2022-04-15 14:33:02 +02:00
Sébastien Villemot 5d3b4801a3
Octave 7 compatibility fix: increase test tolerance 2022-04-15 14:33:02 +02:00
Sébastien Villemot 19246d68da
Octave 7 now has rng 2022-04-15 14:33:02 +02:00
Sébastien Villemot 10af04c6d8
Use Unicode copyright symbol (in UTF-8 encoding) in all source files
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]
2022-04-13 14:54:25 +02:00
Sébastien Villemot 9c8033d99e
Merge branch 'obs_test' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2019
2022-04-12 15:54:10 +02:00
Sébastien Villemot b70b864829
perfect_foresight_with_expectation_errors_setup: move terminal condition to last line of CSV file 2022-04-12 15:51:04 +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
Johannes Pfeifer e6944521dd testsuite: use file-specific names to prevent overwriting while reading 2022-04-11 18:47:04 +02:00
Stéphane Adjemian (Charybdis) f1aff2b370
Remove calls to dbstack in dynare_solve.
Adding three input parameters for maxit, tolf and tolx.

Closes #1841.
2022-04-10 20:29:57 +02:00
Johannes Pfeifer b103cc9259 fs2000_uncorr_ME_missing.mod: use calibration instead of estimation
mode on some machines triggered numerical instabilities in the initialization of Pstar due to near singularity
2022-04-02 19:41:00 +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 d7b5973cce
Testsuite: increase tolerance in block_bytecode/lola_stochastic_block.mod
Apparently needed with MATLAB R2022a on AVX-512 processors.
2022-03-29 14:10:41 +02:00
Stéphane Adjemian (Ryûk) cdd85f32a7
Update unit tests for trust region routines. 2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk) f2bf98ee76
Return the value of info as a third argument (block_trust_region). 2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk) 24d5ba0290
Change nonlinear solvers in some integration tests.
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).
2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk) aa8439d4cc
New implementation of the trust region algorithm.
Main difference is the presence of traps for NaN/Inf/Complex numbers in
residuals or the Jacobian matrix. Also added new unit tests.
2022-03-25 19:42:40 +01:00
Stéphane Adjemian (Ryûk) 1b2b3db380
Fix definition of the Rosenbrock function. 2022-03-25 19:42:40 +01:00
Sébastien Villemot 7f58ec5963
Testsuite: increase tolerance in block_bytecode/lola_solve_one_boundary_mfs2.mod
This is made necessary by commit dd1ec10ec8.
2022-03-24 14:18:18 +01:00
Sébastien Villemot 35bdac6be6
Testsuite: in block_bytecode/ireland.mod, remove unneeded option setting
The default of options_.slowc is already 1.
2022-03-22 12:53:04 +01:00
Sébastien Villemot d8c3467a08
Testsuite: improve tests for block/bytecode options
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”
2022-03-16 15:00:09 +01:00
Sébastien Villemot 3d7299c1e4
New option “non_zero” to the “resid” command
When this option is given, the “resid” command only displays non-zero residuals
2022-03-01 14:26:16 +01:00
Sébastien Villemot e49cada341
Testsuite: run_block_byte_tests_{matlab,octave}.m were not actually checking the results 2022-03-01 11:29:52 +01: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 a376d8c9fe
Fix steady state computation with bytecode+block and solve_algo ⩽ 4 or ⩾ 9
– Temporary terms were not correctly passed between blocks
– solve_algo ⩾ 9 was incorrectly passed through bytecode own’s solver instead
  of through dynare_solve
2022-02-17 17:28:37 +01:00
Sébastien Villemot fa7b331cf4
Fix crash in simulation of “Solve forward/backward complete” blocks with stack_solve_algo=4 (without bytecode) 2022-02-11 18:11:42 +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
Sébastien Villemot 4fdb15b437
Testsuite: fix test under Octave
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.
2022-01-21 14:50:44 +01:00
Stéphane Adjemian (Ryûk) a08de9e661
Partial fix for #1837. 2022-01-19 09:20:22 +01:00
Sébastien Villemot 18060ffe4a
Testsuite: disable an estimation with mode_compute=5 that randomly fails under Octave
Similar to 3af51e3153.
2022-01-18 16:18:12 +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) 7f075ca109
Remove files that should not have been committed in e1d0ce2.
[skip ci]
2022-01-16 16:12:37 +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
Sébastien Villemot 84862b8a39
Merge branch 'borrcon' of git.dynare.org:JohannesPfeifer/dynare
Ref. !1983
2021-12-20 12:08:57 +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
Johannes Pfeifer 67cab849af borrcon.mod: fix LaTeX symbol and header 2021-12-19 11:37:13 +01:00
Stéphane Adjemian (Ryûk) c43777f610
Show how to hide simulated annealing algorithm iterations. 2021-12-17 20:55:46 +01:00
Stéphane Adjemian (Ryûk) 4512000f0f
Display estimation results PAC/NLS. 2021-12-17 20:53:39 +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 4db2899868
estimated_params: fixes for new semantics
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.
2021-12-16 15:38:09 +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 1638374b46
Merge branch 'evaluate_planner' of git.dynare.org:JohannesPfeifer/dynare
Ref. !1970
2021-12-07 18:06:13 +01:00
Sébastien Villemot 8eeb92e56b
Add hyberbolic primitives (sinh, cosh, tanh, asinh, acosh, atanh) 2021-12-07 18:04:56 +01:00
Sébastien Villemot 5f675eee18
Add erfc() primitive 2021-12-07 17:00:59 +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 d039bcbfec evaluate_planner_objective.m: initialize newly introduced options and fix naming 2021-12-07 13:56:01 +01:00
Johannes Pfeifer c07508a917
occbin_write_regimes: distinguish between smoother and simulations
Closes: #1828
2021-12-07 12:41:34 +01:00
Normann Rion cf829fb28e
A few fixes for k-order welfare assesment in `evaluate_planner_objective`
As suggested in !1962
2021-12-07 12:19:30 +01:00
Sébastien Villemot 06fd42c19b
Drop the dynare_simul_ MEX in favour of the new Fortran k_order_simul MEX 2021-11-26 17:37:53 +01:00
Sébastien Villemot a3956996f7
Merge branch 'local_state_space_it' of git.dynare.org:normann/dynare
Ref. !1962
2021-11-26 17:35:30 +01:00
NormannR 6b566d37c7 Add k-order conditional and unconditional welfare evaluation in evaluate_planner_objective 2021-11-24 17:30:02 +01:00
NormannR f889a25e86 Amend the k_order_welfare routine for it to return the adequate output variables 2021-11-24 17:16:03 +01:00
Stéphane Adjemian (Ryûk) f4a7a5430c
Re-implement PAC equations.
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.
2021-11-24 16:40:35 +01:00
Johannes Pfeifer 485c815f50 burnside_k_order.mod: fix timing logic
Did not correctly deal with loading of mex-file
2021-10-22 17:59:07 +02:00
Sébastien Villemot 2ab919ebf1
Testsuite: use default number of particles when comparing performance of the various state space iteration MEX 2021-10-21 16:34:22 +02:00
Stéphane Adjemian (Ryûk) f778e3c1ce
Fix growth neutrality correction in PAC equations.
- 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)
2021-10-21 10:19:23 +02:00
Sébastien Villemot e66a1a63f8
local_state_space_iteration_2 MEX: enable parallelization by default 2021-10-20 15:33:04 +02:00
Sébastien Villemot fbba0bf2fc
Testsuite: fix display of relative timings of local_state_space_iteration_{k,fortran} 2021-10-20 15:32:26 +02:00
Johannes Pfeifer 45772571c3 testsuite: expand Ramsey tests to check for consistency of utility and welfare
Also increase variance to make tests more challenging
2021-10-15 12:46:26 +02:00
Sébastien Villemot 3af51e3153
Testsuite: disable an estimation with mode_compute=5 that randomly fails under Octave 2021-10-13 17:01:02 +02:00
Sébastien Villemot f9a550651d Merge branch 'k_order_fix' into 'master'
k_order_simulation bug: fixes simulations and adds/corrects integration test

Closes #1819

See merge request Dynare/dynare!1940
2021-10-12 15:34:29 +00:00
Johannes Pfeifer d5141ced42 simult_.m: remove redundant first simulation period for k_order_simulations
Closes https://git.dynare.org/Dynare/dynare/-/issues/1819
2021-10-12 15:20:26 +02:00
Johannes Pfeifer cd43c8669b burnside_k_order.mod: fix logic of test and compare Fortran and C++ routines
Also decreases approximation order for speedup
2021-10-12 15:20:26 +02:00
Johannes Pfeifer 733ffdf3ab Add unit test for k-order simulations 2021-10-12 15:20:11 +02:00
Johannes Pfeifer fa04600264 Testsuite: add calls to resid for optimal policy 2021-10-11 18:06:37 +02:00
Sébastien Villemot 4a041b3b2c
tests/measurement_errors/fs2000_corr_me_ml_mcmc/fs2000_corr_ME.mod: set mh_blocks=1
This fixes the test under Octave on haumea.
2021-09-29 15:02:13 +02:00
Sébastien Villemot 191cb05f87
tests/block_bytecode/lola_stochastic_block.mod: increase test tolerance on ghx
Needed for Octave on haumea.
2021-09-28 12:45:52 +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
Normann Rion 6475c52b3d Implements k-order simulation routine in Fortran (Ref: #1802)
`k_order_simul` may replace `dynare_simul_` in the long run
2021-09-24 09:11:15 +02:00
Sébastien Villemot 7083f1d692 Merge branch 'local_state_space_it' into 'master'
Implements the Fortran replacement of local_state_space_iteration_k (Ref #1802)

See merge request Dynare/dynare!1918
2021-09-22 15:54:17 +00:00
NormannR cab65dabb5 Implements `local_state_space_iteration_fortran`, the Fortran replacement of `local_state_space_iteration_k` (Ref #1802)
- 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
2021-09-22 16:28:46 +02:00
Sébastien Villemot 014e18df69
Preprocessor: remove unused steady_state_growth option to pac_model 2021-09-22 16:27:48 +02:00
Johannes Pfeifer 76b3f53d0b ramst_initval_file.mod: move to non-deprecated syntax 2021-09-22 09:56:33 +02:00
Sébastien Villemot fa3ed38735
Source package: fix bug introduced in d62a09cdef 2021-09-21 17:45:30 +02:00
Sébastien Villemot 872c0424a8
tests/block_bytecode/lola_stochastic_block.mod: increase test tolerance on ghu
Needed for Octave on lupi.
2021-09-21 17:00:39 +02:00
Sébastien Villemot d62a09cdef
tests/ep/rbcii.mod: use supported mechanism for user-provided steady state file
Incidentally, this should fix random crashes under Octave (where the manually
copied steady state file was not correctly detected by the interpreter).
2021-09-21 16:26:58 +02:00
Johannes Pfeifer 2dd6510051 smoother2histval.m: undo logging
Closes https://git.dynare.org/Dynare/dynare/-/issues/1407
2021-09-17 14:43:50 +02:00
Sébastien Villemot 49a396030b
Yet another batch of Octave compatibility fixes 2021-09-16 18:25:00 +02:00
Sébastien Villemot 37467a9b9d
Merge branch 'octave_fixes' of git.dynare.org:wmutschl/dynare
Ref. !1926
2021-09-16 15:16:14 +02:00
Willi Mutschler 5199ea414b
Fix for testsuite on Octave AnScho_matched_moments.mod 2021-09-16 12:45:38 +02:00
Johannes Pfeifer 38a2dcaa8f dynrbc_common.inc: increase maxit and check_ahead_periods
Required for Octave
2021-09-16 10:40:44 +02:00
Johannes Pfeifer 001971bda6 dynrbc_common.inc: provide file ending required in Octave 2021-09-16 08:56:44 +02:00
Sébastien Villemot ff06b9ad10
More Octave compatibility fixes 2021-09-15 18:35:30 +02:00
Sébastien Villemot 4346903c65
Various Octave compatibility issues
Also improve on e42cf2e5b4 for the compatbilitity
with MATLAB < R2016a in occbin.write_regimes_to_xls.m.
2021-09-14 17:55:55 +02:00
Johannes Pfeifer e7b1d4aca5 testsuite: Fix missing dependence 2021-09-11 11:29:18 +02:00
Johannes Pfeifer 334020fc46 evaluate_planner_objective.m: fix wrong timing in setting of shocks 2021-09-11 09:44:36 +02:00
Johannes Pfeifer 0d483ff85f evaluate_planner_objective.m: Factorize setting of initial condition
also takes care of initially set shocks
2021-09-11 09:44:35 +02:00
NormannR acdad93822 Fixing the regression in behavior in evaluate_planner_objective (Ref: #1680)
- 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
2021-09-11 09:44:35 +02:00
Sébastien Villemot e42cf2e5b4
Various MATLAB R2014a compatibility fixes 2021-09-08 14:15:49 +02:00
Sébastien Villemot 8d4f5fbd9b
Fix tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag.mod
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.
2021-09-08 14:15:49 +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
Johannes Pfeifer bfd92e79a7
Occbin: udpate options 2021-08-16 11:37:53 +02:00
Stéphane Adjemian (Charybdis) c00307c8cc
Fix encoding. 2021-08-16 11:23:13 +02:00
Stéphane Adjemian (Charybdis) 1c54eb21d2
Cosmetic change (remove trailing spaces). 2021-08-16 11:19:28 +02:00
Willi Mutschler 0d200f3b39
MoM: Fix AFVRR test cases due to 3c67ad 2021-08-16 10:58:35 +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) e8cc23d3af
Bug fixes (typos). 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
Sébastien Villemot b34be496c5 Merge branch 'evaluate_planner' into 'master'
evaluate_planner_objective.m: correctly rely on lag/lead structure for perfect foresight

See merge request Dynare/dynare!1890
2021-07-23 14:01:22 +00:00
Johannes Pfeifer 440a0e460b
Storage of results: use subfolder
Ref. #1758
2021-07-23 14:12:17 +02:00
Johannes Pfeifer e09d215964 evaluate_planner_objective.m: correctly rely on lag/lead structure for perfect foresight
Also cosmetic changes to indentation
2021-07-23 13:27:30 +02:00
Sébastien Villemot 3206ea9684 Merge branch 'evaluate_planner_objective' into 'master'
Streamline evaluate planner objective

See merge request Dynare/dynare!1887
2021-07-22 14:42:22 +00:00
Johannes Pfeifer a517c1f1de neo_growth_ramsey_k_order.mod: call evaluate_planner_objective 2021-07-22 15:20:30 +02:00
Sébastien Villemot 8b8f919a0f Merge branch 'smoother2histval' into 'master'
Improvements for smoother2histval

See merge request Dynare/dynare!1886
2021-07-22 12:03:59 +00:00
Johannes Pfeifer 3fb41e075f Matlab implementation of the consider_all_endogenous_and_auxiliary option 2021-07-22 13:12:27 +02:00
Sébastien Villemot 0e793faeb2 Merge branch 'pf_options' into 'master'
Particle filter: enable passing of option values and prepare for other samplers

Closes preprocessor#59

See merge request Dynare/dynare!1884
2021-07-22 09:50:10 +00:00
Johannes Pfeifer 80cad32068 Particle filter: enable passing of option values and prepare for other samplers 2021-07-21 23:00:32 +02:00
Stéphane Adjemian (Ryûk) cd2ed823b6
Fix constant in VAR and PAC expectations...
When the VAR auxiliary model has a constant.
2021-07-21 18:02:11 +02:00
Stéphane Adjemian (Ryûk) a69f68bb7c
Modify companion matrix if VAR model has a constant. 2021-07-21 18:02:04 +02:00
Sébastien Villemot 1045c442a9
Merge branch 'occbin_mean' of git.dynare.org:JohannesPfeifer/dynare
Ref. !1882
2021-07-21 16:42:00 +02:00
Johannes Pfeifer 944bf2b68e occbin: work with non-demeaned data and in constraints 2021-07-21 13:42:38 +02:00
Johannes Pfeifer ac3f04c2ff borrcon*.mod: nostrict option is not needed anymore 2021-07-20 22:38:21 +02:00
Sébastien Villemot c4e1d1e802
Occbin: new syntax for constructing multi-regime equations
Ref. #569
2021-07-20 18:19:19 +02:00
Sébastien Villemot 229282a1c4
Occbin: the +<basename>/occbin_difference.m file is now generated by the preprocessor
Some fields have also changed under M_.occbin.

Ref. #569
2021-07-20 12:35:15 +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
Stéphane Adjemian (Ryûk) 14bc82b287
Add single equation estimation by NLS.
Ref. #1798.

See example in tests/estimation/example_nls.mod.
2021-07-15 16:55:49 +02:00
Stéphane Adjemian (Ryûk) 2b4572affd
Allow arbitrary nonzero mean exogenous variables in PAC equations.
Previously any nonzero mean exogenous variable had to be centered on
the growth rate (first difference) of the (PAC's LHS) endogenous
variable.
2021-07-11 17:06:53 +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
Johannes Pfeifer f7a232061a
Remove unused options_-output
Prevents accidentally changing something
2021-06-22 18:17:11 +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
Sébastien Villemot 88b427f7bc
Compatibility fix for MATLAB R2014a
MATLAB R2014a does not like the syntax “abs(x).data” where “x” is a dseries.
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
Stéphane Adjemian (Ryuk) 2a5ed79be5
Do not run MCMC after online filter (integration test) 2021-06-15 22:09:35 +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