Commit Graph

87 Commits (master)

Author SHA1 Message Date
Sébastien Villemot c9db9809d0
Drop unused options_.minimal_workspace 2023-12-18 20:42:16 +01:00
Marco Ratto 3ee963c908 newrat: distinguish between TolFun (optimizer termination criterion) and TolGstep/TolGstepRel, used for tuning gradient step
Allows using e.g. TolFun=1.e-5 with coarser values for TolGstep; helpful whenmaximizing non smooth surfaces (e.g. PKF or very large models), where numerical noise may count. By default TolGstep=TolFun as in usual historical behavior.
2023-12-14 22:08:34 +01:00
Johannes Pfeifer d25d95b3b5 newrat.m: add robust option that uses quadratic approximation to better adapt line search to noisy likelihood shapes
Triggered when line search hits and error code
2023-12-14 21:57:49 +01:00
Stéphane Adjemian (Ryûk) 60c0ed0180
Add Sequential Monte Carlo sampler. 2023-12-13 15:30:38 +01:00
Johannes Pfeifer ec76bda254 Remove obsolete Sylvester options
dr_block has been removed
2023-12-11 18:04:43 +01:00
Stéphane Adjemian (Argos) 666aa46dfb
Add undocumented option for kalman_filter_mex. 2023-11-09 19:00:37 +01:00
Willi Mutschler da4bc40e66
Make undocumented zero_moments_tolerance option local to disp_moments
See discussion in https://git.dynare.org/Dynare/preprocessor/-/merge_requests/85
2023-10-18 23:27:45 +02:00
Johannes Pfeifer a00eb5e1de
stoch_simul.m: add nomodelsummary option 2023-10-11 09:31:40 -04:00
Sébastien Villemot 727f925f01
steady: set a more sensible default value for homotopy_steps (10)
Also document it.
2023-10-06 16:11:53 -04:00
Johannes Pfeifer 6d8927775b
Remove unused steadystate_partial option and related inline function restricted_steadystate.m 2023-09-25 17:17:37 +02:00
Johannes Pfeifer 71b63c6e8e
Remove unused lik_algo-option 2023-09-25 17:17:37 +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 14a71a6d98
Merge branch 'additional_optimizer_steps' of git.dynare.org:JohannesPfeifer/dynare
Ref. !2178
2023-09-20 10:15:38 +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
Johannes Pfeifer b0358b9939 dynare_solve.m: add option to disable randomization of starting value 2023-09-19 12:52:54 +02:00
Johannes Pfeifer 8f79e848f0 Remove remnants of GPU code 2023-09-07 08:00:05 +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
Johannes Pfeifer d386bb9f76 Cholesky decomposition: only add to diagonal if really necessary
Closes #1891
2023-06-23 11:26:14 -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
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 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 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 4291b4f07e
The preprocessor now sets options_.{ramsey,discretionary}_policy in all cases 2023-03-28 18:30:08 +02:00
Sébastien Villemot 65053667cf
New “homotopy_alt_starting_point” option to “perfect_foresight_solver” command 2023-02-07 14:49:00 -05:00
Stéphane Adjemian (Ryûk) b7693c3273
Add routine for conditional likelihood (first order). 2023-01-06 14:57:45 +01:00
Johannes Pfeifer 9de0688cfe Make default jscale depend on number of estimated parameters
Related to https://git.dynare.org/Dynare/dynare/-/issues/1849
2022-12-03 16:00:27 +01:00
Normann Rion 1b12d9e44b Fixes local_state_space_iteration_3_test: sets a default value for the number of threads local_state_space_iteration_3 may use 2022-09-27 11:03:36 +02:00
Frédéric Karamé 128eaa2da5
Add SMC samplers.
Ref. !2005
2022-09-19 16:32:28 +02:00
Johannes Pfeifer 253c87b894 model_diagnostics.m: allow setting tolerance for singularity checks starting with Matlab 2022a 2022-07-27 13:15:29 +02:00
Sébastien Villemot 13709f6853
Add “fsolve_options” option to “steady” command
Closes: #1856
2022-07-22 14:35:19 +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 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 b4ce69db3a
Remove options_.slowc field
There was no user interface, and the feature that it provides has lost
relevance over time.

Note that algorithms for block and/or bytecode still internally use some
equivalent of this parameter, but its initial value will no longer be
modifiable (which could lead to bugs, see commit
e49e7e906f).
2022-03-31 17:39:43 +02:00
Johannes Pfeifer 958dcf7b48 online auxiliary filter: add option to set termination condition of loop 2022-01-13 18:42:55 +01:00
Johannes Pfeifer d039bcbfec evaluate_planner_objective.m: initialize newly introduced options and fix naming 2021-12-07 13:56:01 +01:00
Sébastien Villemot e66a1a63f8
local_state_space_iteration_2 MEX: enable parallelization by default 2021-10-20 15:33:04 +02:00
Johannes Pfeifer 6abc984d5e Fix mh_posterior_mode_estimation option
Closes https://git.dynare.org/Dynare/dynare/-/issues/1044
2021-09-22 10:00:47 +02:00
Johannes Pfeifer 341aca25ad
Liu West: Remove redundant option 2021-08-16 12:34:10 +02:00
Stéphane Adjemian (Ryûk) ebfa72740f
Changed default for initial step bound factor.
Should fix simulation failure in pac/trend-component-10/example1, that
seems to be caused by a too large value of this parameter.
2021-07-24 12:20:29 +02:00
Stéphane Adjemian (Ryûk) e72dde69d3
Add option for trust region algorithm (mex).
trust_region_initial_step_bound_factor is determinining thye initial
step bound. Default value is 100 (previous hard coded value was 1).
2021-07-23 19:44:16 +02:00
Johannes Pfeifer 80cad32068 Particle filter: enable passing of option values and prepare for other samplers 2021-07-21 23:00:32 +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
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
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +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 0d6bc47158
Merge branch 'rattoma/dynare-mh_initialize_from_previous_mcmc'
Ref. !1841
2021-05-11 18:51:57 +02:00