Commit Graph

9609 Commits (6adf1c26392d737dc31844aa3add0441e040f4a8)

Author SHA1 Message Date
Stéphane Adjemian (Ryûk) 6417520c09
Allow cherrypicking and aggregation with PAC/MCE. 2023-09-23 17:43:19 +02:00
Stéphane Adjemian (Ryûk) 8d7a5e69d7
Return Computing and preprocessing time. 2023-09-22 22:29:42 +02:00
Sébastien Villemot 9a1f150e38
Merge branch 'default_mode_compute' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2160
2023-09-22 14:35:45 +02:00
Sébastien Villemot c424366440
CI: bump to MATLAB R2023b 2023-09-22 10:52:57 +02:00
Sébastien Villemot 5ae5102f89 CI: bump to MATLAB R2023b 2023-09-22 10:52:17 +02:00
Sébastien Villemot 7eb1959f66
Provisions for MATLAB R2023b 2023-09-22 10:49:27 +02:00
Johannes Pfeifer 552e6575cc Use newrat as default mode-finder
Tends to perform better than csminwel
2023-09-20 12:55:29 +02:00
Sébastien Villemot 6f5e346bf6
Merge branch 'preparations_irf_matching' of git.dynare.org:wmutschl/dynare
Ref. !2181
2023-09-20 10:17:14 +02:00
Sébastien Villemot 14a71a6d98
Merge branch 'additional_optimizer_steps' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2178
2023-09-20 10:15:38 +02:00
Sébastien Villemot 44f307ce45
Merge branch 'dynare-complex_resid'
Ref. !2155
2023-09-20 10:09:07 +02:00
Johannes Pfeifer 87ce652088
Account for complex value during resid and steady 2023-09-20 10:08:53 +02:00
Johannes Pfeifer f6a8473144 estimation: support additional_optimizer_steps
Closes https://git.dynare.org/Dynare/dynare/-/issues/1573
2023-09-19 18:14:24 +02:00
Willi Mutschler 330b10ec85
cosmetical changes to headers and comments 2023-09-19 13:26:33 +02:00
Willi Mutschler 649f668dd1
cosmetical: don't use hh for figure/plot/table handles
We use it to denote the hessian and even store it in many mat files.
2023-09-19 13:26:33 +02:00
Willi Mutschler c8be1a3274
Refactor mode_check codes 2023-09-19 13:26:33 +02:00
Willi Mutschler a41fbdefbc
estimation: more flexible handling of displayed string in command window
Also removed estim_params_ as unused input argutment to CutSample
2023-09-19 13:26:33 +02:00
Willi Mutschler 9a4e022eb7
remove global from GetAllPosteriorDraws 2023-09-19 13:26:33 +02:00
Willi Mutschler 268d511e29
estimation: better organize files into folders (latex,graphs,output) 2023-09-19 13:26:33 +02:00
Willi Mutschler 8f650a9cca
Put raftery lewis convergence under oo_.convergence 2023-09-19 13:26:33 +02:00
Johannes Pfeifer 7df3ff5059 dynare_solve.m: fix logic of initial guess randomization which forgot case of imaginary numbers 2023-09-19 12:52:55 +02:00
Johannes Pfeifer b0358b9939 dynare_solve.m: add option to disable randomization of starting value 2023-09-19 12:52:54 +02:00
Johannes Pfeifer 62c3a14026 get_error_message.m: fix typo in error message 2023-09-19 12:52:53 +02:00
Johannes Pfeifer dafe3fbdb2 evaluate_steady_state.m: do not require second solver call if debug is requested
All output has already been computed before
2023-09-19 12:52:52 +02:00
Johannes Pfeifer 757b6e10ec display_static_residuals: make output more legible in presence of tags 2023-09-19 12:52:51 +02:00
Johannes Pfeifer 624eabe2e8 dynare_solve.m: improve warning message 2023-09-19 12:52:50 +02:00
Johannes Pfeifer 68ff5c4110 evaluate_steady_state.m: Filter out small complex residuals 2023-09-19 12:52:49 +02:00
Johannes Pfeifer ff83c4aea7 evaluate_steady_state_file.m: Octave bug 52568 was fixed in Octave 6 2023-09-14 16:55:13 +02:00
Sébastien Villemot db331c53d4
Merge branch 'display_static_residuals' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2176
2023-09-14 12:06:34 +02:00
Sébastien Villemot bea2d7905b
Merge branch 'dynare-bvar'
Ref. !2175
2023-09-14 12:05:59 +02:00
Johannes Pfeifer 14634946dc
🐛 bvar_irf: SquareRoot-option erroneously used Cholesky decomposition 2023-09-14 12:05:21 +02:00
Johannes Pfeifer 2b313b0308
BVAR: move to subfolder 2023-09-14 12:05:18 +02:00
Johannes Pfeifer 838bb2f4b5 display_static_residuals.m: fix bug introduced in 4598dba40c 2023-09-13 15:26:05 +02:00
Sébastien Villemot e86b372464
Display more explicit error message when k_order_perturbation MEX fails 2023-09-13 15:06:51 +02:00
Sébastien Villemot 43af789eda
Merge branch 'csminwel' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2172
2023-09-13 11:31:56 +02:00
Sébastien Villemot eb16bb4373
Merge branch 'dynare-osr_analytic'
Ref. !2171
2023-09-13 11:19:20 +02:00
Johannes Pfeifer 885fda0e20
OSR: allow using analytic gradient 2023-09-13 11:19:13 +02:00
Johannes Pfeifer 2473b57782 Correct Johannes's old Cologne email 2023-09-12 21:07:57 +02:00
Johannes Pfeifer ac0ecde1d9 mom: fix incorrect options-reference 2023-09-12 19:24:32 +02:00
Johannes Pfeifer b8a1b63572 newrat.m: clean up files 2023-09-12 13:32:16 +02:00
Johannes Pfeifer 3895da48a1 🐛 Enable analytic_derivation for csminwel
Requires column vector output
2023-09-12 13:26:25 +02:00
Johannes Pfeifer 497c6bd1b1 csminwel1.m and csminwel1.m: cosmetic changes 2023-09-12 12:54:36 +02:00
Sébastien Villemot 6037b9f096
Merge branch 'dynare-osr_globals'
Ref. !2166
2023-09-11 16:46:29 +02:00
Johannes Pfeifer 2b240210d0
OSR: Remove globals and wrapper layer, move to +subfolder 2023-09-11 16:46:08 +02:00
Sébastien Villemot a0ea6005e8
Merge branch 'dynare-globals'
Ref. !2167
2023-09-11 16:43:36 +02:00
Johannes Pfeifer 4598dba40c
display_static_residuals.m: remove globals 2023-09-11 16:43:26 +02:00
Sébastien Villemot f26a469208
Merge branch 'further_cosmetics' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2168
2023-09-11 16:26:44 +02:00
Sébastien Villemot 890c6b2e1d
Merge branch 'trace_plot' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2169
2023-09-11 16:25:31 +02:00
Sébastien Villemot 4a0b87fdaf
Merge branch 'cosmetics' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2165
2023-09-11 15:34:52 +02:00
Sébastien Villemot dee66e8351
Merge branch 'cleanup' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2164
2023-09-11 15:33:09 +02:00
Johannes Pfeifer 91dd4d9a83 dyn_first_order_solver.m: remove reference to kstate 2023-09-09 09:23:07 +02:00
Johannes Pfeifer 7eaa974484 Remove unused disp_model_summary.m 2023-09-09 09:22:41 +02:00
Johannes Pfeifer baf8243fac generate_trace_plots.m: allow for plotting traces of multiple chains
Closes #1904
2023-09-08 22:04:25 +02:00
Johannes Pfeifer 825763b18f Move pruned_state_space functions to subfolder 2023-09-08 15:45:41 +02:00
Sébastien Villemot d601ca4a2e Merge branch 'var_decomp' into 'master'
Add variance decomposition for pruned state space

Closes #1836

See merge request Dynare/dynare!2163
2023-09-08 12:55:19 +00:00
Johannes Pfeifer af274aec3f Remove unused dsample.m and mcompare.m 2023-09-08 14:43:02 +02:00
Johannes Pfeifer 3a851dd8f3 disp_dr.m: remove globals 2023-09-08 14:42:38 +02:00
Johannes Pfeifer c72763501e Delete unused dcompare.m 2023-09-08 14:22:09 +02:00
Johannes Pfeifer 290f19c705 resol + stoch_simul.m: header fixes
Also makes global naming consistent
2023-09-08 11:59:37 +02:00
Johannes Pfeifer 74399f0728 🐛 fix check for Metropolis folder 2023-09-08 10:31:09 +02:00
Johannes Pfeifer 5ac11449ce slice: move saved files to subfolder 2023-09-08 10:27:35 +02:00
Johannes Pfeifer bd905360e0 Slice: provide convergence diagnostics even for low number of draws 2023-09-08 10:26:21 +02:00
Johannes Pfeifer 842bf3d687 csminwel1.m: clean up file 2023-09-08 10:02:14 +02:00
Willi Mutschler 2e742462b3
Rename McMCDiagnostics and McMCDiagnostics_core 2023-09-08 09:44:43 +02:00
Johannes Pfeifer cd05bfb8a2 Remove unused ghx2transition.m 2023-09-08 08:09:20 +02:00
Johannes Pfeifer c43308a07b forcst.m: remove redundant call to make_ex_ 2023-09-08 08:08:35 +02:00
Johannes Pfeifer 2fa6c437f7 solve_model_for_online_filter.m: remove redundant call to Lyapunov solver 2023-09-08 08:05:48 +02:00
Johannes Pfeifer 420cbc8202 kalman_transition_matrix.m: remove redundant input argument 2023-09-08 08:03:18 +02:00
Johannes Pfeifer c063d53646 th_autocovariances.m: fix matrix dimension 2023-09-07 18:09:28 +02:00
Johannes Pfeifer f2f1c48baf compute_moments_varendo.m: cosmetic fixes 2023-09-07 17:52:31 +02:00
Johannes Pfeifer 3dd1ffb8fe pruned_state_space_system.m: gracefully exit in case of unit roots 2023-09-07 17:52:18 +02:00
Johannes Pfeifer 41ac891f80 Factorize variance decomposition code 2023-09-07 17:13:09 +02:00
Willi Mutschler a0b443b9f8
Cosmetical changes to headers and message strings 2023-09-07 09:36:27 +02:00
Willi Mutschler 777ec76536
method_of_moments: cosmetical changes to cleanup 2023-09-07 09:36:27 +02:00
Willi Mutschler 55dc4a00d5
method_of_moments: refactor displaying of moments 2023-09-07 09:36:27 +02:00
Willi Mutschler e025d56a59
method_of_moments: refactor J-Test 2023-09-07 09:36:27 +02:00
Willi Mutschler 07b62fe554
method_of_moments: refactor iterated GMM/SMM estimation 2023-09-07 09:36:27 +02:00
Willi Mutschler 9dc4878f9f
method_of_moments: refactor printing of info to a utility function 2023-09-07 09:36:27 +02:00
Willi Mutschler e52c007d8b
method_of_moments: cosmetical changes to checks for objective function at initial parameters 2023-09-07 09:36:27 +02:00
Willi Mutschler fb326638f9
method_of_moments: remove redundant noconstant option check 2023-09-07 09:36:27 +02:00
Willi Mutschler e170b64713
method_of_moments: refactor steady-state check utility functions
Reuse same functions from full-information estimation command
2023-09-07 09:36:27 +02:00
Willi Mutschler b737d46d61
method_of_moments: cosmetical changes to smm shock series 2023-09-07 09:36:27 +02:00
Willi Mutschler 9914d764c2
method_of_moments: refactor data moments computation
Also rename function to not confuse this with the variable stored in oo_.mom.datamoments.
2023-09-07 09:36:27 +02:00
Willi Mutschler c0cae0ebaa
method_of_moments: cosmetical changes to mom.objective function 2023-09-07 09:36:27 +02:00
Willi Mutschler 0cd65df72a
method_of_moments: add warnings for problematic prior stderr/corr and value
Also moved oo_.prior to oo_.mom.prior
2023-09-07 09:36:27 +02:00
Willi Mutschler 017b4f05f6
method_of_moments: cosmetical changes on estimated params initializations 2023-09-07 09:36:27 +02:00
Willi Mutschler 1ef026dc9d
method_of_moments: factorize correct bounds for stderr and corr 2023-09-07 09:36:27 +02:00
Willi Mutschler 180b92cb1e
method_of_moments: refactor penalized estimation with laplace prior 2023-09-07 09:36:27 +02:00
Willi Mutschler c3327e000c
method_of_moments: refactor matched moments block transformations 2023-09-07 09:36:27 +02:00
Willi Mutschler 0487dd4a77
method_of_moments: refactor and function for default options & initializations
Also changed:
- options_mom_.vector_output to options_mom_.mom.vector_output
- optimizer_vec to options_mom_.optimizer_vec
- oo_.dr.obs_var to oo_.mom.obs_var
2023-09-07 09:36:27 +02:00
Willi Mutschler f25188cf2f
method_of_moments: improved header 2023-09-07 09:36:27 +02:00
Willi Mutschler 3c0f3c1c24
Factorize estimation: check steady-state (static, changes parameters) 2023-09-07 09:36:27 +02:00
Willi Mutschler 23f6019cdf
Factorize estimation: check prior stderr and corr parameters 2023-09-07 09:36:27 +02:00
Willi Mutschler 6941bd5516
Factorize estimation: wrapper for tune_mh_jscale 2023-09-07 09:36:27 +02:00
Willi Mutschler c356db4531
Factorize estimation: set_mcmc_jumping_covariance 2023-09-07 09:36:27 +02:00
Willi Mutschler aa99eff81d
Factorize estimation: set_mcmc_prior_bounds 2023-09-07 09:36:27 +02:00
Willi Mutschler 7f22414843
Factorize estimation: checks for VAROBS 2023-09-07 09:36:27 +02:00
Willi Mutschler 688d847489
Factorize estimation: check_mode_file 2023-09-07 09:36:27 +02:00
Willi Mutschler c21f75887d
Factorize estimation: check_hessian_at_the_mode 2023-09-07 09:36:27 +02:00
Willi Mutschler dd2c816df0
compute_mh_covariance_matrix: remove globals 2023-09-07 09:36:27 +02:00
Willi Mutschler d8105a3237
Cosmetical changes 2023-09-07 09:36:27 +02:00
Willi Mutschler 960c075420
Replace "Estimation::mcmc::" by a variable
This enables re-using estimation functions for other Bayesian estimation routines such as Bayesian method_of_moments and printing it nicer to the console.
2023-09-07 09:36:27 +02:00
Sébastien Villemot 6551b88fc8
Merge branch 'truncated_normal' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2161
2023-09-07 08:56:13 +02:00
Johannes Pfeifer 8f79e848f0 Remove remnants of GPU code 2023-09-07 08:00:05 +02:00
Johannes Pfeifer 9afd75ca9b th_autocovariances.m: rework routing to clarify approach
Changes reflect model representation with 1 lag only
2023-09-06 22:14:19 +02:00
Johannes Pfeifer 7283838a0f dynare_config.m: sort added paths 2023-09-06 22:11:35 +02:00
Johannes Pfeifer 02b4242c75 Remove MATLAB:dividebyzero identifier
Was removed from Matlab
2023-09-06 15:09:39 +02:00
Johannes Pfeifer 5f68504919 prior sampling: suppress loop output 2023-09-06 14:14:31 +02:00
Johannes Pfeifer d60a19ce49 Finish implementation of truncated normal distribution
Closes https://git.dynare.org/Dynare/dynare/-/issues/1593
2023-09-06 12:46:41 +02:00
Sébastien Villemot 16f921ed62
Add Meson build system
Mostly working. The testsuite remains to be done.

In particular, windows/deps/mkoctfile64 is modified to print its version number
on stdout instead of stderr. This is what the standard mkoctfile does, and it
allows easier capture of the output from Meson.
2023-09-04 18:04:00 +02:00
Sébastien Villemot 6747f2130e
Perfect foresight: fix illegal memory read with bytecode + endval_steady
The exogenous steady state vector was passed as a row-vector to
evaluate_steady_state, thus leading to an incorrectly-sized matrix passed to
bytecode when checking the steady state on the dynamic model (when different
from the static model).
2023-09-01 14:52:57 +02:00
Johannes Pfeifer c70f2f1e4b Allow x13 to deal with missing values 2023-08-31 09:07:51 +02:00
Sébastien Villemot 0d21927381
Merge branch 'mod_comp' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2157
2023-08-30 11:47:22 +02:00
Sébastien Villemot 01011cb849
Merge branch 'shock_decomp' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2156
2023-08-30 11:46:47 +02:00
Sébastien Villemot 38f36258ed
Merge branch 'endogenous_prior' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2153
2023-08-30 11:45:54 +02:00
Johannes Pfeifer e70b2fdfcf makedataset.m: account for short filenames 2023-08-29 16:15:34 +02:00
Johannes Pfeifer 183e6fbb3b model_comparison.m: account for short filenames 2023-08-29 16:14:50 +02:00
Johannes Pfeifer 9e53bd9967 shock_decomposition.m: do not overwrite other output
Closes https://git.dynare.org/Dynare/dynare/-/issues/1897
2023-08-29 14:40:10 +02:00
Johannes Pfeifer 0729ee72af det_cond_forecast.m: cosmetic changes to error messages 2023-08-24 12:38:50 +02:00
Johannes Pfeifer a85a00bfcf endogenous prior: fix logic of missing observations check
Message should only be displayed if there are missing observations
2023-08-23 09:32:24 +02:00
Stéphane Adjemian (Argos) 91825d4b5b
Fix cherrypick routine with max and min functions in model block. 2023-07-21 15:36:52 +02:00
Normann Rion 710589eb5b Adds pruning in k_order_simul
See issue #1643 about beyond-third-order pruning
2023-07-20 06:58:35 +01:00
Stéphane Adjemian (Ryûk) c02e550582
Update dseries submodule.
Pass more than one variable name to remove and remove_ methods.
2023-07-19 18:23:08 +02:00
Johannes Pfeifer d2fecdc5d3 load_*_mh_history_file: remove assignin statements 2023-07-18 10:01:47 -04:00
Johannes Pfeifer 8532d6abd7 Cosmetic changes to various estimation routines 2023-07-13 14:40:01 -04:00
Johannes Pfeifer e6c43c2a29 load_last_mh_history_file: make sure number of blocks and parameters matches loaded files 2023-07-13 14:39:50 -04:00
Stéphane Adjemian (Ryûk) b5a74b96e5
Merge particles submodule into master. 2023-07-12 14:01:25 +02:00
Stéphane Adjemian (Ryûk) 21dcc911bc
Move files and delete unused folders and files. 2023-07-12 09:29:41 +02:00
Stéphane Adjemian (Argos) 6265a6d2b1
Update dseries submodule (add two arguments to dplot command). 2023-07-07 11:40:41 +02:00
Stéphane Adjemian (Argos) bd0493d135
Add routine for dynamic contributions in semi-structural models. 2023-07-06 22:26:09 +02:00
Stéphane Adjemian (Argos) 5e869669a0
Set verbose to false by default. 2023-07-06 22:26:07 +02:00
Sébastien Villemot ae67b4a145 Merge branch 'master' into 'master'
Variable number of parameter MCMC convergence plots

See merge request Dynare/dynare!2127
2023-07-05 10:07:39 +00:00
William Gatt eb5eefdcf0 Variable number of parameter MCMC convergence plots
This change allows the user to change the number of parameters for which the MCMC convergence diagnostics are shown. The user needs to set a value for options_.convergence.brooksgelman.plotrows for an arbitrary number of parameters to be shown, but defaulting to 3 if no input is supplied.
2023-07-05 10:07:38 +00:00
Normann Rion 23dbb2b4b9 Fixes local_state_space_iteration_3 and adds a test comparing the various pruning routines used in dynare up to order 3.
The considered pruning routines can be found in
   - `simult_.m`
   - `local_state_space_iteration_2` MEX
   - `local_state_space_iteration_3` MEX
   - `pruned_state_space_system.m`
2023-07-04 19:15:43 +02:00
Normann Rion d2c324eeee Amends the various filters to fit the fixed version of local_state_space_iteration_3
See MR !2144 for more details
2023-07-01 16:43:48 +02:00
Johannes Pfeifer d386bb9f76 Cholesky decomposition: only add to diagonal if really necessary
Closes #1891
2023-06-23 11:26:14 -04:00
Johannes Pfeifer ed7fe89bfa Remove unused exo_names_orig_ord 2023-06-23 08:41:12 -04:00
Willi Mutschler e6920a60a1
Default option: don't save files for csminwel and cmaes
Usually these files are not needed (if then user can turn this option on manually) and only clutter the folder.
Moreover, the testsuite crashes on rare occasions if several mod files are run in the same folder and the optimizers write the files simultaneously.
2023-06-23 12:11:23 +02:00
Johannes Pfeifer 050679cd56
Rename resid.m
Closes #1888
2023-06-23 12:10:18 +02:00
Johannes Pfeifer 782368eb9b dseries: document saving of atr log
Related to dseries@f2bdd617
2023-06-22 13:56:19 -04:00
Sébastien Villemot d5a3a8e16a
Various improvements to perfect foresight homotopy
– new option “endval_steady” to pf_setup command to recompute terminal
  steady state in the homotopy loop

– new options “homotopy_linearization_fallback” and
  “homotopy_marginal_linearization_fallback” to pf_solver and pfwee_solver
  commands, to get an approximate solution when homotopy fails to go to 100%

– new options “homotopy_initial_step_size”, “homotopy_min_step_size”,
  “homotopy_step_size_increase_success_count” and “homotopy_max_completion_share”
  to pf_solver and pfwee_solver commands to fine tune the homotopy behaviour

– removed option “homotopy_alt_starting_point” to pf_solver command, not really
  useful

– new options “steady_solve_algo”, “steady_tolf”, “steady_tolx”,
  “steady_maxit”, “steady_markowitz” to pf_solver and pfwee_solver commands, to
  control the computation of the terminal steady state (and remove the
  equivalent options which previously had different names in pfwee_solver command)
2023-06-21 15:58:23 +02:00
Sébastien Villemot 3a789ca780
🐛 dynare_solve would incorrectly accept some guess values leading to NaN residuals
If the guess value passed to dynare_solve was such that the residuals were all
below tolerance, except some that were NaN, then this guess value would be
incorrectly accepted as a solution.
2023-06-20 15:35:36 +02:00
Sébastien Villemot 8fa37a0439
perfect_foresight_with_expectation_errors_solver: remove obsolete code
This should have been removed in c1b78e26ac
2023-06-16 16:45:04 +02:00
Sébastien Villemot d4b5e156d1
perfect_foresight_with_expectation_errors_solver: check convergence of informational iterations
Error out if an iteration failed.

Also display an informative message about those iterations.
2023-06-16 16:45:04 +02:00
Sébastien Villemot 396267260a
Block solvers: improvement to error messages
– Do not mention internal options_ structure
– Remain agnostic about whether we are in a steady state or a deterministic simulation

[skip ci]
2023-06-15 15:49:50 +02:00
Sébastien Villemot c1b78e26ac
perfect_foresight_with_expectation_errors_{setup,solver}: streamline handling of guess values
– Remove the terminal_steady_state_as_guess_value option to pfwee_solver
– pfwee_setup now sets the same guess values as pf_setup (i.e. terminal steady
  state at all periods)
– With constant_simulation_length option, pfwee_solver uses terminal steady
  state as guess values for periods that are added to the simulation
2023-06-15 15:37:48 +02:00
Sébastien Villemot 30c17ad346
🐛 Steady state: wrong value of maxit was used for some block/bytecode cases
It was using the value of maxit for perfect foresight simulations.
2023-06-15 15:37:48 +02:00
Sébastien Villemot c7b4ea40f8
🐛 Steady state computation: fix crash if bytecode (without block) does not find a solution
ys was uninitialized and it would crash further down in the function.
2023-06-15 15:37:48 +02:00
Stéphane Adjemian (Ryûk) a541e1e6d0
Update dseries submodule. 2023-06-14 10:47:57 +02:00
Sébastien Villemot dcf56b89cd
Bytecode: rework message verbosity
Now uses options_.verbosity to decide what to print:
– if options_.verbosity == 0, prints nothing
– if options_.verbosity >= 1, prints iteration counter and duration, and fatal errors
– if options_.verbosity >= 2, additionally print floating point exceptions and
  details about algorithmic decisions
2023-06-13 16:59:07 +02:00
Sébastien Villemot d81e3992c3
perfect_foresight_solver_core: fix crash when bytecode does not converge
The bug was introduced in commit 7722e8e36b
2023-06-12 19:19:21 +02:00
Sébastien Villemot 4431a89e87
perfect_foresight_solver_core.m: when relevant, use bytecode MEX to recompute ∞-norm of residuals
Since commit 7722e8e36b it would always use the
perfect_foresight_problem MEX, but the latter is less efficient than bytecode.
2023-06-12 19:18:45 +02:00
Sébastien Villemot 73ae1ac8ce
evaluate_steady_state: minor simplification 2023-06-12 19:18:44 +02:00
Sébastien Villemot 8cf8731c65
det_cond_forecast.m: use better syntax for ignored outputs 2023-06-12 19:18:44 +02:00
Sébastien Villemot 37870e4a40
evaluate_steady_state: accept exogenous steady state as argument instead of whole oo_ structure
This is a move towards a more functional programming style.
2023-06-07 17:58:19 +02:00
Sébastien Villemot 7722e8e36b
Perfect foresight: inner functions no longer return a modified oo_
They now only return what’s really their output (simulated paths, maximum
residual error…). This is a move towards a more functional programming style.
2023-06-06 18:13:10 +02:00
Sébastien Villemot 6ed90b3dbf
🐛 Homotopy for extended path (order 0) was utterly broken
The convergence test was wrong.
2023-06-06 17:54:04 +02:00
Sébastien Villemot fe142b663e
Perfect foresight: allow homotopy for purely backward/forward/static models
This was previously disabled, but the code seems to work.
2023-06-06 17:26:07 +02:00
Sébastien Villemot 1cf83dc278
perfect_foresight_solver: always use perfect_foresight_problem MEX for computing residuals
The MEX no works on models without leads or lags.

This is essentially a revert of 74dc4f81f0.

Ref. #1850
2023-06-06 17:06:10 +02:00
Stéphane Adjemian (Argos) 8e42f6d137
Update dseries submodule (new method returning last observed period for each variable). 2023-06-05 11:21:53 +02:00
Stéphane Adjemian (Ryûk) b1933d58dd
Bug fix (undefined variable). 2023-06-04 08:07:28 +02:00
Johannes Pfeifer 37eb10971b dynare_estimation_init.m: make sure OccBin estimation can be run after previous shocks(surprise) block 2023-06-02 08:43:14 -04:00
Sébastien Villemot 37bc08eb5b Merge branch 'parallel' into 'master'
masterParallel.m: assign explicit empty window title to allow passing full path in quoted strings

Closes #1887

See merge request Dynare/dynare!2133
2023-06-01 08:26:52 +00:00
Sébastien Villemot 5a6d03a2e7
CI: adapt for new location of MATLAB binaries 2023-05-30 17:12:30 +02:00
Sébastien Villemot e14c59384d CI: adapt for new location of MATLAB binaries 2023-05-30 15:53:17 +02:00
Johannes Pfeifer ad2d986c5e masterParallel.m: assign explicit empty window title to allow passing full path in quoted strings
Closes https://git.dynare.org/Dynare/dynare/-/issues/1887
2023-05-24 06:45:24 -04:00
Stéphane Adjemian (Ryûk) 03db691ab3
Update dseries submodule (add --with-legend option to dplot command). 2023-05-19 18:48:44 +02:00
Johannes Pfeifer df018ab14d dynare_sensitivity.m: do not alter qz_criterium 2023-05-16 09:22:13 -04:00
Stéphane Adjemian (Guts) 43cb9b01c3
Update submodule dseries (fix #53). 2023-05-12 17:23:53 +02:00
Stéphane Adjemian (Ryûk) 15027db136
Add missing initialization. 2023-05-11 15:59:38 +02:00
Stéphane Adjemian (Ryûk) 1f60657d99
Update dseries submodule (add new plotting routine for dseries objects). 2023-05-11 14:51:20 +02:00
Stéphane Adjemian (Ryûk) 015513380f
Add new class for priors.
This commit only changes the routine used to draw random deviates from
the prior distribution, without relying on persistent variables (which allows
parallelisation).
2023-04-26 10:39:13 +02:00
Sébastien Villemot 8bb9a398aa
Octave compatibility: ignore new warning introduced for qz() in Octave 9
Should have been in commit 421eb1482c.
2023-04-26 10:30:04 +02:00
Willi Mutschler b8352b251d
macOS: provisions to detect Apple Silicon architecture (maca64 and mexmaca64)
Works with MATLAB R2022b beta (ARM)
2023-04-26 10:19:14 +02:00
Stéphane Adjemian (Ryûk) 084e64cdac Use new prior draw interface. 2023-04-26 10:06:30 +02:00
Sébastien Villemot 0c17d656e1
🐛 Steady state computation could fail with block+bytecode+mfs>0
The Jacobian used for solving a block was not square if there were recursive
variables.
2023-04-20 13:39:26 +02:00
Sébastien Villemot e413696277
Octave compatibility fix: the 3rd output argument to fminsearch was added in Octave 4.4 2023-04-17 18:10:35 +02:00
Sébastien Villemot 80a6967827
Remove unused options_.scalv 2023-04-14 16:38:14 +02:00
Sébastien Villemot 1faeaf892e
Remove unused options_.terminal_condition 2023-04-14 16:35:43 +02:00
Sébastien Villemot 0923187938
🐛 Perturbation solution: gracefully fail if order=2 is requested with bytecode 2023-04-13 17:35:20 +02:00
Sébastien Villemot 91fa8d079e
calibrateresiduals: use the sparse representation of the dynamic model 2023-04-13 17:24:47 +02:00
Sébastien Villemot 7e1c25d775
backward_model_inversion: use the sparse representation of the dynamic file 2023-04-13 15:51:09 +02:00
Sébastien Villemot ed75e4c176
dynamic_backward_model_for_inversion: turn into a local function of backward_model_inversion 2023-04-13 15:47:43 +02:00
Sébastien Villemot 66b648157f
Purely backward models simulation: use the sparse representation of the dynamic file 2023-04-13 15:47:43 +02:00
Sébastien Villemot 34e82f9697
sim1_purely_forward: use the sparse representation of the dynamic file 2023-04-13 15:47:43 +02:00
Sébastien Villemot 170a4dce0e
dynamic_forward_model_for_simulation: turn into a local function of sim1_purely_forward 2023-04-13 15:47:43 +02:00
Sébastien Villemot 5f42e84b0b
sim1_purely_static: use the sparse representation of the dynamic file 2023-04-13 15:47:43 +02:00
Sébastien Villemot 4a793f89ff
dynamic_static_model_for_simulation: turn into a local function of sim1_purely_static 2023-04-13 15:47:43 +02:00
Sébastien Villemot 942c6f9a20
🐛 static_model_inversion: fix handling of STEADY_STATE() operator
Of course, this operator does not make much sense in the context of a static
model, but it should still work.
2023-04-13 15:47:43 +02:00
Sébastien Villemot 9deb1e6049
static_model_inversion: use the sparse representation of the dynamic file 2023-04-13 15:47:41 +02:00
Sébastien Villemot bc68915dfa
static_model_for_inversion: turn into a local function of static_model_inversion 2023-04-13 11:55:27 +02:00
Stéphane Adjemian (Ryûk) 4f3a0df884
Do not overwrite solve_algo option. 2023-04-12 09:53:46 +02:00
Sébastien Villemot 421eb1482c
Octave compatibility: qz() will be MATLAB-compatible in version 9
[skip ci]
2023-04-07 10:26:54 +02:00
Stéphane Adjemian (Ryûk) 51ffe77fb7
Add error flag (new output) to simul_backward_model routine. 2023-04-05 11:09:59 +02:00
Sébastien Villemot c4bc6316d0
Make matlab/missing/mex/mjdgges/mjdgges.m Octave-compatible
[skip ci]
2023-04-04 18:40:37 +02:00
Sébastien Villemot cdb786017b
Preprocessor update
– ramsey_policy is now fully implemented at the preprocessor level
– 🐛 ramsey_policy: lift restriction that order must be ⩽ 2
– 🐛 Extend incompatibility with deterministic exogenous to ramsey_model command
2023-03-29 16:26:02 +02:00
Sébastien Villemot 534515dc66
dyn_ramsey_static.m: simplifications + improve comments 2023-03-29 14:33:01 +02:00
Sébastien Villemot ffe6eb4d40
Preprocessor: overhaul of M_ fields counting Ramsey/discretionary orig endos/eqs
– new fields: M_.ramsey_orig_{eq,endo}_nbr
– drop M_.ramsey_eq_nbr and M_.orig_eq_nbr
– new field: M_.discretionary_orig_eq_nbr
2023-03-29 14:33:01 +02:00
Sébastien Villemot 674ebce84b
🐛 Ramsey steady state computation could fail if expectation or diff operator is present
If auxiliary variables were created *before* the Lagrange multipliers (e.g. aux
vars related to the expectation or diff operators), then the vector of
residuals of the reduced Ramsey steady state problem (with respect to original
variables, as computed by the dyn_ramsey_static_1 subfunction) was incorrect.
2023-03-29 14:31:01 +02:00
Sébastien Villemot 4291b4f07e
The preprocessor now sets options_.{ramsey,discretionary}_policy in all cases 2023-03-28 18:30:08 +02:00
Sébastien Villemot 69d0aa670b
Preprocessor update
🐛 Incorrect stochastic transformation with endo lead ⩾ 2 or exo lead ⩾ 1 in
  external functions
– New solution for solving the Ramsey steady state with Lagrange multipliers
  with lead or lag ⩾ 2. Now generates a dedicated file for derivatives of static
  model w.r.t. multipliers using chain rule derivation (#633, #1119, #1133)
– 🐛 Incorrect cost table used when computing temporary terms in static model
  with “use_dll”
– 🐛 Crash when writing the (static) set_auxiliary_variables file in the
  presence of external functions
2023-03-28 14:49:28 +02:00