Sébastien Villemot
5d048b998d
Merge branch 'cosmetics' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2047
2022-07-04 15:15:47 +02:00
Sébastien Villemot
deb0f8b401
Merge branch 'ramsey_discount' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2046
2022-07-04 15:15:08 +02:00
Johannes Pfeifer
0f64652a73
identification_checks.m: fix comment
2022-06-28 09:44:05 +02:00
Johannes Pfeifer
dbde8294cd
disp_identification.m: account for non-boolean indicator
...
Related https://git.dynare.org/Dynare/dynare/-/issues/1860
2022-06-28 09:43:46 +02:00
Johannes Pfeifer
5788f1bc71
dynare_solve: deal with Dulmage-Mendelsohn decomposition returns a non-square block
...
Related to https://git.dynare.org/Dynare/dynare/-/issues/1851
2022-06-27 15:30:14 +02:00
Johannes Pfeifer
74672bb294
DsgeSmoother.m: delete redundant line
2022-06-27 11:23:19 +02:00
Johannes Pfeifer
77d6782cb4
evaluate_steady_state.m: check whether planner_discount is actually set for ramsey
2022-06-27 11:17:15 +02:00
Stéphane Adjemian (Charybdis)
584e661fff
Ensure that the ordering of the exogenous variables is correct...
...
in model inversion routines.
2022-06-17 17:48:00 +02:00
Stéphane Adjemian (Charybdis)
f19ab66bab
Fix precision issue.
...
Introduced in patch 8b197bf71c
which incidentally reduced the precision to six digits.
2022-06-17 16:48:35 +02:00
Sébastien Villemot
5ccd5f2613
Revert "More explicit message when the Dulmage-Mendelsohn decomposition returns a non-square block"
...
This reverts commit fa71d4712d
.
Ref. #1851
2022-06-16 18:05:14 +02:00
Sébastien Villemot
fa71d4712d
More explicit message when the Dulmage-Mendelsohn decomposition returns a non-square block
...
Closes : #1851
2022-06-16 15:53:45 +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
Johannes Pfeifer
1b4a4c8778
shock_decomposition.m: correctly pass initial date for plotting
2022-06-08 16:03:36 +02:00
Sébastien Villemot
5423949047
Merge branch 'marco_fixes' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2042
2022-06-07 15:04:28 +02:00
Marco Ratto
3575afdf1d
save info1 file only under debugging
2022-06-02 09:52:48 +02:00
Marco Ratto
9304b535f4
port to occbin smoother the same computational improvements done for standard one under smother_redux option. This also require to provide occbin reduced state-space matrices as output argument of missing_DiffuseKalmanSmootherH3_Z.m
2022-06-02 09:52:47 +02:00
Marco Ratto
12c4e03d7b
bug fixes in retrieving the k-step ahead predictions and updated variables from occbin simulations
2022-06-02 09:52:47 +02:00
Marco Ratto
16bc2b3e5e
plot_shock_decomposition: filter out other forbidden characters (parentheses and dot) for field name
2022-06-02 09:52:21 +02:00
Marco Ratto
61632ef28f
marginal_density.m: make computation of log(det(sigma)) robust numerically
2022-06-02 09:51:12 +02:00
Marco Ratto
48ec0a60e8
Trap the case when Q is null matrix
2022-06-02 09:49:38 +02:00
Johannes Pfeifer
8ac72590da
PKF: document incompatibilities and throw proper errors if triggered
2022-05-31 17:40:03 +02:00
Sébastien Villemot
09f2541550
Merge branch 'PKF' into 'master'
...
Bug fixes for PKF
See merge request Dynare/dynare!2038
2022-05-31 08:00:22 +00:00
Sébastien Villemot
5f403e9f62
Merge branch 'solve1' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2035
2022-05-25 18:49:38 +02:00
Johannes Pfeifer
c9fd266cbb
solve1.m: trap zero Jacobian case
2022-05-25 14:31:12 +02:00
Johannes Pfeifer
c91e1f895b
trust_region.m: trap case where linear combination with weight 0 on infinite value returns NaN
2022-05-25 14:21:16 +02:00
Johannes Pfeifer
cf548b467d
dsge_likelihood.m: distinguish PKF problems with singularity in other KFs
2022-05-25 14:15:29 +02:00
Johannes Pfeifer
c623696b4b
kalman_update_algo_1.m: properly set array dimensions
2022-05-25 14:15:18 +02:00
Johannes Pfeifer
93ae4849b7
missing_observations_kalman_filter.m: remove unused output whose dimensions grow over time
2022-05-25 12:55:05 +02:00
Marco Ratto
2279529851
fixed bug in sampling in the neighborhood of a critical point
2022-05-24 15:08:50 +02:00
Stéphane Adjemian (Ryûk)
45c0e82f3b
Fix bug introduced in fdb1daad
.
2022-05-20 10:29:44 +02:00
Stéphane Adjemian (Ryûk)
fdb1daadc9
Deactivate third unit test (local_state_space_iteration_2).
2022-05-20 08:44:28 +02:00
Stéphane Adjemian (Ryûk)
0df38369a7
Fix typo.
2022-05-20 08:31:03 +02:00
Sébastien Villemot
5138d41ac6
Merge branch 'kalman_update' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2032
2022-05-19 14:55:45 +02:00
Sébastien Villemot
a83570e1f4
Merge branch 'foresight_resids' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2031
2022-05-19 14:55:08 +02:00
Sébastien Villemot
3496c26699
Merge branch 'evaluate_planner' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2030
2022-05-19 14:54:28 +02:00
Sébastien Villemot
962d66807c
Merge branch 'gsa' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2025
2022-05-19 14:53:35 +02:00
Johannes Pfeifer
0f333f29eb
kalman_update_algo_1.m: introduce error handling
...
Closes https://git.dynare.org/Dynare/dynare/-/issues/1854
2022-05-19 11:56:42 +02:00
Johannes Pfeifer
74dc4f81f0
perfect_foresight_solver.m: loop over dynamic file when mex cannot be used
...
Closes https://git.dynare.org/Dynare/dynare/-/issues/1850
2022-05-18 08:59:39 +02:00
Johannes Pfeifer
b037bc9438
GSA sampling from prior range: replace infinity by huge number to avoid NaN
2022-05-17 18:29:42 +02:00
Johannes Pfeifer
9f265c5b5b
stab_map_.m: remove redundant and commented out code to make file readable
2022-05-17 18:29:05 +02:00
Sébastien Villemot
05ab494d6c
Merge branch 'dyn_ramsey' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2029
2022-05-17 18:23:57 +02:00
Sébastien Villemot
1f2e22712f
Merge branch 'tolx' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2028
2022-05-17 18:23:37 +02:00
Johannes Pfeifer
26db005e61
evaluate_planner_objective.m: add warning if planner discount is not smaller than 1
2022-05-17 18:10:56 +02:00
Johannes Pfeifer
9b45886526
dyn_ramsey_static.m: remove unnecessary piece of code
2022-05-17 15:31:19 +02:00
Johannes Pfeifer
31ea784a5c
dynare_solve.m: honor tolx in fsolve
2022-05-17 15:27:21 +02:00
Sébastien Villemot
40871519fc
Merge branch 'mom_SE' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2024
2022-05-16 19:10:52 +02:00
Stéphane Adjemian (Ryûk)
c033a08cec
Remove third unit test in local_state_space_iteration_2.
2022-05-13 22:14:07 +02:00
Stéphane Adjemian (Ryûk)
2ff705f15c
Change second unit test for local_state_space_iteration_2...
...
To something closer to what we actually do when we estimate a model.
2022-05-13 22:12:09 +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
Stéphane Adjemian (Ryûk)
c17728da83
Make sure matlab routine is used in first unit test.
2022-05-12 13:02:41 +02:00
Stéphane Adjemian (Ryûk)
49727cf7a0
Remove %$ in unit tests.
2022-05-12 13:00:44 +02:00
Stéphane Adjemian (Ryûk)
68887b36e6
Cosmetic change.
2022-05-12 13:00:02 +02:00
Stéphane Adjemian (Ryûk)
8edc6538bf
Rewrite header doc.
2022-05-12 12:58:32 +02:00
Stéphane Adjemian (Ryûk)
c492ce7b73
Remove unused routines.
2022-05-12 10:33:48 +02:00
Stéphane Adjemian (Ryûk)
4e90a47521
Throw an error if some parameters are not initialised.
2022-05-12 10:33:48 +02:00
Johannes Pfeifer
0bc9a163b2
mom.standard_errors.m: provide more informative error message when hitting bounds during finite difference step
2022-05-12 09:51:21 +02:00
Sébastien Villemot
a2a90c7e37
Merge branch 'model_diag' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2023
2022-05-05 18:41:34 +02:00
Johannes Pfeifer
737524d182
model_diagnostics.m: add check for potential naming conflict
2022-05-04 13:05:27 +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
0b32ad5b51
Merge branch 'ramsey_steady' of git.dynare.org:JohannesPfeifer/dynare
...
Ref. !2022
2022-04-29 17:44:28 +02:00
Sébastien Villemot
b084c2e931
Perfect foresight with expectation errors: move computation of terminal steady states to the setup command
...
This is more logical, since those values are constraints from the point of view
of the solver.
Also, this allows to have maxit and tolf options for the steady state solver,
at the level of the setup command, without a clash with the same option names
for the deterministic solver at the level of the solver command.
2022-04-29 15:56:11 +02:00
Sébastien Villemot
418a8ebb5f
Drop steady_.m which is only a thin wrapper around evaluate_steady_state
...
As a consequence, move the sanity checks inside evaluate_steady_state, where
they make more sense.
2022-04-29 15:14:43 +02:00
Johannes Pfeifer
21004adf03
evaluate_steady_state.m: correctly account for presence of auxiliary variables potentially depending on Lagrange multipliers
...
Otherwise error message due to NaN may be thrown out due to them non having been set. Closes https://git.dynare.org/Dynare/preprocessor/-/issues/94
2022-04-28 21:49:05 +02:00
Sébastien Villemot
e58552d914
Merge branch 'occbin_error' into 'master'
...
Occbin: filter out problems in solving the baseline model
See merge request Dynare/dynare!2021
2022-04-28 13:04:53 +00:00
Johannes Pfeifer
6536e135cb
Occbin: filter out problems in solving the baseline model
2022-04-28 13:33:48 +02:00
Stéphane Adjemian (Charybdis)
8b197bf71c
Remove duplicate assignments for parameters.
2022-04-28 12:58:22 +02:00
Stéphane Adjemian (Charybdis)
1d22285043
Throw a warning if a parameter has no value.
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
7dda3c7985
Preprocessor update
...
— Reject exogenous deterministic variables in a few places where they were
erroneously accepted
– Use booleans for “exo_det” and “multiplicative” fields of M_.det_shocks
— Add checks on the value of the “learnt_in” option of “shocks” and “endval”
2022-04-26 14:52:31 +02:00
Sébastien Villemot
b6dc32621f
Merge branch 'simult' into 'master'
...
simult.m: fix saving of binary file
See merge request Dynare/dynare!2020
2022-04-25 12:52:22 +00:00
Johannes Pfeifer
6805cad636
simult.m: fix saving of binary file
2022-04-23 19:41:51 +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
c06be7fefd
Octave 7 fixes bug in mkdir which now creates parent directory
2022-04-20 10:36:56 +02:00
Stéphane Adjemian (Charybdis)
931a9ba336
Use residuals and jacobian matrix returned by fsolve routine.
2022-04-19 19:20:20 +02:00
Stéphane Adjemian (Charybdis)
4d646ba30b
Fix evaluation of the dynamic model.
...
Call the wrapper instead of the dynamic routine.
2022-04-19 19:15:21 +02:00
Sébastien Villemot
ce7540747b
dynare_solve: fix bug introduced in ef2bb4e669
...
The feval(f, x, args{:}) call would fail under Octave because the contents of
args{:} would be appended twice (hence too many input arguments error).
The same bug would materialize under MATLAB for errorcode>1.
2022-04-19 17:52:37 +02:00
Stéphane Adjemian (Charybdis)
63224ed45d
Bug fix (display of problematic equations).
2022-04-19 16:33:29 +02:00
Stéphane Adjemian (Charybdis)
b9f7733c6b
Fix cherrypick routine.
...
Was failing when model contain variable and parameter names ending with the name
of a built-in function.
Closes #1813
2022-04-17 10:14:15 +02:00
Sébastien Villemot
eb6a801bca
CI: bump to Octave 7.1.0
2022-04-15 14:33:02 +02:00
Sébastien Villemot
715aff891a
Octave 7 fixes bug related to generated files in +package folder
2022-04-15 14:33:02 +02:00
Sébastien Villemot
971a89fb73
Octave 7 now has ordqz (and ordeig was implemented in Octave 5)
2022-04-15 14:33:02 +02:00
Sébastien Villemot
b7c74f8e9a
Octave 7 now has jsondecode
2022-04-15 14:33:01 +02:00
Sébastien Villemot
ec5468c431
Octave 7 compatibility fix: suppress spurious warnings
...
In this version of Octave, “warning on” really enables all warnings (while this
was not the case in Octave 6, suprisingly; I think this used to be different
with even older Octave releases).
We therefore need to explicitly disable the Octave:array-as-logical warnings,
that is triggered by some internal Octave functions.
We also need to be careful to call “warning_config” instead of “warning on”
when restoring warnings to their default state.
2022-04-15 14:32:54 +02:00
Sébastien Villemot
a0e78957da
Octave 7 compatibility fix: “arguments” is a reserved keyword
...
This confuses the Octave 7 parser in the context of anonymous functions.
Simply rename the variable to “args”.
2022-04-15 14:32:54 +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
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
23c007e716
IVF_core.m: directly use solver option fields
2022-04-11 08:33:28 +02:00
Stéphane Adjemian (Ryûk)
ff9cf3814a
Remove useless copies of options_.
2022-04-10 22:17:45 +02:00
Stéphane Adjemian (Ryûk)
b09e91ff55
Add routine description in headers.
2022-04-10 21:22:51 +02:00
Stéphane Adjemian (Ryûk)
87ecfa9ed1
Allow nonlinear solver to fail when simulating a static model.
...
Print a message instead of throwing an error if the nonlinear solver fails in a
period, since we do not need previous or future values of the endogenous
variables. If the nonlinear solver fails in period t, the endogenous variables
are set to nan in period t.
2022-04-10 20:57:34 +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
Stéphane Adjemian (Ryûk)
01203f7e39
Stop deterministic simulation if nonlinear solver failure.
...
Only for purely backward/forward models. In the case of purely static models the
solution for the previous or following period is not required.
2022-04-10 10:55:40 +02:00
Stéphane Adjemian (Ryûk)
23a72d7aaa
Use dynare_solve to simulate purely forward deterministic models.
2022-04-10 09:39:28 +02:00
Stéphane Adjemian (Ryûk)
ef2bb4e669
Return and use errorcode from dynare_solve.
...
Note that the interpretation of the error code depends on the nonlinear solver.
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk)
fe7d05f46a
Remove unnecessary condition (Octave/fsolve).
...
Since we already have checked that the initial guess is not a solution.
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk)
33b1827ea5
Bug fix (mixed complementarity problems).
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk)
48c41e6b0d
Return the initial guess if nonlinear system is ill-behaved...
...
At the initial guess, and we were not able to find another guess (randomizing).
2022-04-09 16:06:24 +02:00
Stéphane Adjemian (Ryûk)
56863d6e2f
Exit if initial guess is a solution...
...
Without entering in the nonlinear solvers.
2022-04-09 16:06:24 +02:00
Sébastien Villemot
0779816457
Merge branch 'resid' into 'master'
...
resid: Fix display of name tags with Ramsey equations
See merge request Dynare/dynare!2017
2022-04-05 06:16:39 +00:00