Commit Graph

54 Commits (5145bd0708697230c7adeb23c8a0dabf37f4cb3f)

Author SHA1 Message Date
Sébastien Villemot 5145bd0708
New option “relative_to_initval” to “mshocks” block 2023-10-18 16:45:06 -04:00
Johannes Pfeifer b5c741998c evaluate_planner_objective.m: fix output for linear-quadratic problems solved at second order
Welfare does not correspond to the steady state in this case
2022-07-26 13:35:55 +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
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
Johannes Pfeifer b5d129de1f evaluate_planner_objective.m: fix check for NaN moments 2022-01-18 16:12:20 +01:00
Johannes Pfeifer d039bcbfec evaluate_planner_objective.m: initialize newly introduced options and fix naming 2021-12-07 13:56:01 +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
NormannR 6b566d37c7 Add k-order conditional and unconditional welfare evaluation in evaluate_planner_objective 2021-11-24 17:30:02 +01:00
Johannes Pfeifer e173ad938b evaluate_planner_objective.m: gracefully exit if decision rules are missing 2021-11-02 18:19:43 +01:00
Johannes Pfeifer 048e059b68 evaluate_planner_objective.m: add warning if NaN are encountered 2021-10-21 11:42:43 +02:00
Johannes Pfeifer e8fd1f53db evaluate_planner_objective.m: suppress output
[skip CI]
2021-10-21 09:44:49 +02:00
NormannR 1ad2680682 Fixes the evaluate_planner_objective routine Deals properly with the output provided by disp_th_moments 2021-10-18 17:08:28 +02:00
Johannes Pfeifer 85a5a5633c evaluate_planner_objective.m: compatibility fix for older Matlab versions
Use single quotes
2021-09-14 19:35:42 +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
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
Johannes Pfeifer 11c75592fb evaluate_planner_objective.m: compute required moments directly 2021-07-22 15:01:15 +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 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Johannes Pfeifer fad86785da evaluate_planner_objective.m: do not evaluate non-existing terms for linear models
Closes https://git.dynare.org/Dynare/dynare/-/issues/1781
2021-05-28 17:00:44 +02:00
Normann Rion 9db1265892 Asssesing welfare in perfect-foresight frameworks
Ref. #1680
2021-02-25 15:12:28 +01:00
Normann Rion f532de0f29 Adds the discretionary case to the evaluate_planner_objective function 2021-02-18 12:00:44 +01:00
Normann Rion e880d1bcc3 Ref. #1680: 2nd-order welfare 2021-02-17 13:53:55 +01:00
Johannes Pfeifer 9728a52889 evaluate_planner_objective.m: lift size restriction by solving Lyapunov equation instead of using Kronecker 2020-12-19 14:12:12 +01:00
Sébastien Villemot 7e770f69e7
Remove workaround for errors in MEX files
Because at some point throwing exceptions from MEX files (with mexErrMsgTxt())
was not working under Windows 64-bit, we had designed a workaround to avoid
using exceptions.

Most MEX files were returning an error code as their first (or sometimes last)
argument, and that code would have to be checked from the MATLAB code.

Since this workaround is no longer needed, this commit removes it. As a
consequence, the interface of many MEX files is modified.

For some background, see https://www.dynare.org/pipermail/dev/2010-September/000895.html
2020-01-10 18:33:11 +01:00
Sébastien Villemot 49dc997073
Global reindentation of MATLAB code (excluding submodules)
Also convert to Unix end-of-lines, and remove trailing whitespaces.
2019-12-20 16:30:27 +01:00
Johannes Pfeifer c0c3a4c05c evaluate_planner_objective.m: add warning if order>1 is used
Also modernizes output format
2019-12-13 14:37:00 +01:00
Sébastien Villemot 82cef48eb4
A_times_B_kronecker_C MEX: remove the OpenMP codepath
Testing shows that it is slower than the BLAS path.
2019-06-25 17:26:14 +02:00
Sébastien Villemot a1b8bd39b2 Move the location of various generated files on the filesystem
- M and MEX files are now under +${MODELNAME}/
- bytecode, C source and JSON now under ${MODELNAME}/model/
2018-06-27 17:03:39 +02:00
Stéphane Adjemian (Scylla) 7be8f10e0e Use cells of strings instead of char arrays. 2018-01-09 22:30:01 +01:00
Stéphane Adjemian (Charybdis) 1bf81c9f5a Fixed copyright notices. 2017-05-18 18:36:38 +02:00
Stéphane Adjemian (Charybdis) 5417b27ac7 Fixed indentation of matlab files. 2017-05-16 15:10:20 +02:00
Michel Juillard f3ee32690e fixed bug introduced in commit 660fc6 2015-11-10 09:27:36 +01:00
Michel Juillard 53e9307fe2 modified too big message in evaluate_planner_objective
Mention the issue in the doc
2015-11-09 09:15:44 +01:00
Michel Juillard 660fc64471 adding check for model size before computing value of planner objective. 2015-11-09 09:03:55 +01:00
Johannes Pfeifer 9d90a204f7 Clean up evaluate_planner_objective.m 2015-08-30 11:16:26 +02:00
Johannes Pfeifer cc3aeafd00 Save planner objective function with discretionary_policy 2015-08-26 10:00:35 +02:00
Michel Juillard 58c40fdca9 ramsey_policy: correcting the computation of the value of the
objective function; adding details about the period objective function
in the manual.
2013-12-13 10:44:29 +01:00
Stéphane Adjemian (Charybdis) 4052d4ccaf Cosmetic changes. Use skipline() instead of disp(' '). 2013-07-10 17:12:34 +02:00
Sébastien Villemot c121aa14b1 Remove oo_.dr.{nstatic,npred,nboth,nfwrd,nspred,nsfwrd}
Replace them by equivalents in M_ (and an extra one: M_.dynamic).

IMPORTANT POINT: oo_.dr.npred used to count both purely backward and mixed/both
variables. This was the cause of lots of confusion. The new M_.npred only
counts purely backward variables.

We now have the following indentities:

M_.npred + M_.nboth + M_.nfwrd + M_.nstatic = M_.endo_nbr
M_.nspred = M_.npred + M_.nboth
M_.nsfwrd = M_.nfwrd + M_.nboth
M_.ndynamic = M_.npred + M_.nboth + M_.nfwrd
2012-11-16 20:05:13 +01:00
Michel Juillard 1eef328de0 correcting bug in welfare computation when using ramsey_policy and
histval
2012-06-18 20:29:35 +02:00
Michel Juillard 8f4fb2f16f fixed welfare evaluation for arbirtrary value of the state
variables. The preprocessor still needs to be modified to allow
arbitrary initial value of the Lagrange multipliers
2012-06-13 21:00:38 +02:00
Sébastien Villemot 1f9cea669a Update copyright notices 2012-06-08 18:22:34 +02:00
Michel Juillard 8fa6a9883a replacing call to dr1() by call to stochastic_solvers() 2012-03-15 16:45:25 +01:00
Stéphane Adjemian (Charybdis) 560800bcc5 Changed the order of the output arguments in kronecker product related mex routines. 2011-09-05 18:57:42 +02:00
Michel Juillard 1617b6a410 improving Ramsey policy 2011-06-22 11:31:35 +02:00
Michel Juillard 6f1c02769e fixing evaluation of objective function under optimal policy 2011-05-24 16:02:42 +02:00
Sébastien Villemot 02652f6eb8 Updated copyright notices 2011-02-04 17:27:33 +01:00
Sébastien Villemot 757a9067c0 Global reindentation of MATLAB files 2011-02-04 17:17:48 +01:00