Sébastien Villemot
88ce107466
Rename ys0_ into oo_.initial_steady_state and ex0_ into oo_.initial_exo_steady_state
...
Also document these variables.
2023-10-24 09:38:51 +02:00
Sébastien Villemot
ff5ca80bbc
Merge branch 'preprocessor_output' into 'master'
...
By default display preprocessor output line by line instead of only at the end
See merge request Dynare/dynare!2200
2023-10-23 12:05:53 +00:00
Stéphane Adjemian (Argos)
d95154ffa9
Do not automagically cherrypick vars from pac_target_nonstationary.
2023-10-21 10:20:28 +02:00
Sébastien Villemot
8c3429bb0f
Perfect foresight with expectation errors: change the semantics of endval(learnt_in=…)
...
Similarly to the regular “endval” block, any variable mentioned in this
block will jump to its new value in the period where the information is learnt.
In particular, this means that any temporary shock that may have been
anticipated on that variable (as specified through a “shocks(learnt_in=...)”
block for a previous informational period) will be overwritten.
2023-10-20 16:05:56 -04:00
Sébastien Villemot
df9c7d85b8
Error out if perfect_foresight_solver is called with shocks(learnt_in=…) or endval(learnt_in=…) blocks
...
This is to prevent the accidental use of the regular perfect foresight solver
when one actually wants the one with expectation errors.
2023-10-20 16:05:53 -04:00
Sébastien Villemot
7449d26e51
Perfect foresight with homotopy + marginal linearization: improve info messages
2023-10-20 14:57:22 -04:00
Johannes Pfeifer
643face6ed
bug: do not remove +subfolder with fast option
...
Otherwise, expected files are not present
2023-10-20 15:42:44 +02:00
Johannes Pfeifer
fb8ff758f9
By default display preprocessor output line by line instead of only at the end
...
Allows judging how long individual steps take for big models
2023-10-20 15:42:05 +02:00
Sébastien Villemot
a9c581e2bc
No longer forbid bytecode with order=2 or k_order_solver
...
The two are now compatible, even though the bytecode representation will not be
used. Print a warning to make this explicit.
2023-10-19 14:10:43 -04: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
Sébastien Villemot
5145bd0708
New option “relative_to_initval” to “mshocks” block
2023-10-18 16:45:06 -04:00
Sébastien Villemot
daa6b5569d
mshocks: better match to the semantics given in the manual
...
Ensure that the block is always interpreted multiplicatively relative to the
steady state, and not relative to the pre-existing shock value (if there was
already a shock declared for the same exogenous and period(s)).
2023-10-18 14:28:54 -04:00
Sébastien Villemot
39f9d4352a
The “mshocks” block now accepts the “learnt_in” option
2023-10-17 17:24:15 -04:00
Sébastien Villemot
4875554a39
Perfect foresight homotopy: make marginal linearization more robust
...
For marginal linearization, an extra simulation is needed. This extra
simulation is first computed using the first simulation as guess value. If that
does not work, the present commits adds an additional attempt for computing
that extra simulation, using a full homotopy loop from the beginning.
As a consequence, the present commits puts the homotopy loop in a dedicated
function.
2023-10-13 15:31:44 -04:00
Sébastien Villemot
2ae485705e
Perfect foresight homotopy: turn a nested function into a local one
...
The behaviour of local functions is easier to understand, since they do not
have access to the workspace of the caller.
2023-10-13 14:40:45 -04:00
Sébastien Villemot
cc7c024389
Perfect foresight homotopy: display the full output of every iteration
...
As a consequence, print the full iterations summary table after each iteration.
2023-10-13 09:19:10 -04:00
Sébastien Villemot
9ebd8a8372
Make perfect foresight hotomopy loop more readable
...
Only modify oo_ when the homotopy procedure is finished, now that oo_ is no
longer an input to perfect_foresight_solver_core.
By the way, fix the treatment of the exogenous steady state (it is now set
in a consistent way with the endogenous steady state, if the shock is not
simulated up to 100%).
Also fix the initial guess when doing a second attempt at recomputing the
terminal steady state and failing (in the absence of a permanent shock). It was
supposed to use the initial steady state as an initial guess for that second
attempt (through oo_.steady_state), but since that latter variable was modified
in the loop, it would actually correspond to the same initial guess as in the
first attempt.
2023-10-13 09:16:37 -04:00
Sébastien Villemot
a6eb943aae
Remove oo_ as an input argument to perfect_foresight_solver_core
2023-10-12 15:44:53 -04:00
Sébastien Villemot
e4a4d2d8e6
Bytecode MEX: get M_ and options_ through input arguments rather than as global variables
2023-10-11 18:50:32 -04:00
Sébastien Villemot
b59dc2cf1a
det_cond_forecast: fix bug with bytecode+block
...
The plan must immediately follow the “extended_path” string in the input
arguments of bytecode. Bug introduced in f84753025d
.
2023-10-11 18:50:32 -04:00
Sébastien Villemot
88146bcc6f
solve_block_decomposed_problem: drop oo_ as an input argument
2023-10-11 18:50:32 -04:00
Sébastien Villemot
a241aa2bd7
Drop (almost empty) initvalf.m wrapper
2023-10-11 18:50:32 -04:00
Sébastien Villemot
f94e7ae9a6
Perfect foresight homotopy: display duration of every iteration
2023-10-11 18:50:32 -04:00
Stéphane Adjemian (Ryûk)
2c923c613b
Closes #1835 .
2023-10-11 21:40:59 +02:00
Stéphane Adjemian (Argos)
06926e0153
Bug fix (missing semicolon).
2023-10-11 15:47:57 +02:00
Johannes Pfeifer
a00eb5e1de
stoch_simul.m: add nomodelsummary option
2023-10-11 09:31:40 -04:00
Johannes Pfeifer
cbf57b1af6
set_state_space.m: remove unused options_ input argument
2023-10-11 09:30:45 -04:00
Johannes Pfeifer
328f6f3229
check.m and model_diagnostics.m: use consistent global naming
2023-10-11 09:26:05 -04:00
Johannes Pfeifer
36a2a41e35
Add function signatures for command line functions
2023-10-11 09:26:05 -04:00
Johannes Pfeifer
6f8fc22d57
bug: internals.m: account for new location of results files in 5.x
2023-10-11 09:26:05 -04:00
Johannes Pfeifer
7f5d8b81c2
bug: minus_logged_prior_density.m: fix expected dimension of unused output arguments
...
Hessian needs to be empty for newrat
2023-10-11 09:26:04 -04:00
Johannes Pfeifer
f0b10ca9df
Octave: workaround for intersect with stable flag providing wrong third output (Octave bug #60347 )
...
Uses function removed in 47477e152a
2023-10-11 09:26:04 -04:00
Johannes Pfeifer
d5f8d3fffe
check_model.m: add check for negative variances to prevent cryptic message about correlations
2023-10-11 09:26:04 -04:00
Johannes Pfeifer
94207ab851
🐛 check_for_calibrated_covariances.m: correct logic of check
...
Did not properly distinguish between unset correlation and starting value of 0
2023-10-11 09:26:04 -04:00
Johannes Pfeifer
5a3ae27b13
set_all_parameters.m: only operate on covariance matrices if necessary
2023-10-11 09:26:04 -04:00
Johannes Pfeifer
2eb9475e0e
🐛 make sure output arguments are set before return
2023-10-11 09:26:03 -04:00
Sébastien Villemot
8cc646fbf6
Bytecode MEX: remove syntax where no MATLAB array is passed
...
Those arrays were then read via oo_ and options_.
As a consequence, this commit drops the dependency of bytecode MEX upon the oo_
global variable.
2023-10-10 17:44:14 -04:00
Sébastien Villemot
2e3fbfc040
New option “from_initval_to_endval” to “homotopy_setup” block
2023-10-10 13:19:12 -04:00
Sébastien Villemot
6b44e08daa
steady: add check over the value of homotopy_mode option
2023-10-06 16:41:54 -04:00
Sébastien Villemot
7f6f66c1c9
steady: add a warning if homotopy_setup block is present but homotopy_mode=0
2023-10-06 16:17:09 -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
Sébastien Villemot
d4b6e61497
steady: check that the homotopy_setup block is present when homotopy_mode is specified
2023-10-06 16:07:41 -04:00
Sébastien Villemot
c3680b9f85
steady: fix typo in comments
2023-10-06 16:02:02 -04:00
Sébastien Villemot
4dea001d8d
steady: variable renamings in relation to homotopy
...
– use consistent naming for M_, oo_, options_
– use more explicit names for a few other variables
2023-10-06 15:42:34 -04:00
Sébastien Villemot
068070d336
steady: various refactoring related to homotopy
...
- homotopy_mode = 2: in case of failure, print last successful point as in the
other two modes
- homotopy_mode = 1: if there is a failure at the first iteration (starting
values), do not incorrectly report that there was a successful point
- homotopy_mode = 3: if there is a failure at the first iteration (starting
values), honour the option homotopy_force_continue
– homotopy2: remove globals
2023-10-06 15:42:31 -04:00
Johannes Pfeifer
32d5bc05a1
Octave: support ofig graph format
2023-10-05 10:28:28 -04:00
Sébastien Villemot
d77561e241
Update comment following the switch to Meson
...
[skip ci]
2023-10-03 15:02:07 +02:00
Sébastien Villemot
e4afa5eee0
Merge branch 'more_globals' into 'master'
...
Eliminate some more globals
See merge request Dynare/dynare!2187
2023-10-03 12:48:34 +00:00
Johannes Pfeifer
7ff7561280
Use consistent variable naming and add/fix headers
2023-10-02 11:12:31 +02:00
Johannes Pfeifer
3a115d4fcc
Remove full oo_ input from likelihood functions
2023-10-02 09:48:34 +02:00