Commit Graph

48 Commits (7dd2dd5e24a343fbeaf3522ea5e535c27d8b9f95)

Author SHA1 Message Date
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 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Johannes Pfeifer f2cde3b6d9 Make schur_vec_tol settable and document it
Related to https://git.dynare.org/Dynare/preprocessor/-/merge_requests/29
Also convert it to lowercase as all other options
2020-12-17 19:59:22 +01:00
Sébastien Villemot e371b1a94b
New option “filtered_theoretical_moments_grid”, that supersedes “hp_ngrid”
The old option is left for backward-compatibility purposes, but it has the same
effect as the new one.

Closes: #1093
2020-01-20 16:23:10 +01:00
Sébastien Villemot ce4aa9a8e1
Preprocessor update
— deprecation warning for “simul” (#1683)
— Ramsey: use information from transformed model for filling
  M_.nonzero_hessian_eqs. (Closes: #1681)
  Also, M_.hessian_eq_zero is not generated if order = 1
— New field M_.endo_trends (#1648)
2019-12-13 18:22:12 +01:00
Sébastien Villemot 89a3e94cbf
Use true/false instead of 1/0 for boolean options
This is more elegant, and makes it easier to distinguish them from integer
options.

Also simplify test expressions for these boolean options.
2019-03-19 15:21:16 +01:00
Johannes Pfeifer d75e7278c2 Make sure that reverting to order=1 if Hessian is 0 does not crash other functions
Closes #1453
2017-05-27 19:26:12 +02:00
Stéphane Adjemian (Charybdis) 5417b27ac7 Fixed indentation of matlab files. 2017-05-16 15:10:20 +02:00
Stéphane Adjemian (Charybdis) a53636e24e Fixed copyright notices. 2017-05-16 14:11:15 +02:00
Stéphane Adjemian (Charybdis) 88e1701289 Removed useless commas and semicolons. 2017-05-16 13:24:46 +02:00
Johannes Pfeifer 2c5b1fed2d Use master function lyapunov_solver.m to call individual solvers 2017-01-04 11:25:44 +01:00
Johannes Pfeifer 9b8a542661 Initialize variance decomposition array to NaN instead of 0
Because only stationary variables are updated, prevents non-stationary variables from showing up with 0 instead of NaN
2016-10-18 10:52:57 +02:00
Johannes Pfeifer 25df325899 Add bandpass filter to th_autocovariances.m
Also adds documentation
2015-10-12 20:41:58 +02:00
Johannes Pfeifer 0fd76e0c6f Assigning unique function for each input argument of lyapunov_symm.m
The old way of redefining input arguments to satisfy different options was too error-prone. See 69daaa0460b0ddee97292c39d40355201e316622 of tholden
2015-07-22 15:11:39 +02:00
MichelJuillard 4b3550efbc Merge pull request #691 from JohannesPfeifer/var_decomp_unit
Fix dsge_simulated_theoretical_variance_decomposition.m for non-stationa...
2015-07-20 14:03:22 +02:00
Michel Juillard 491301c67b th_autocovariances.m creates Gamma_y{nar+2} (variance decomposition)
even if there is a single shock. In that case variance decomposition
is one. It is better if Gamma_y has always the expected
size. disp_th_moments.m only displays variance decomposition if there
is more than one shock.
2014-11-02 11:17:27 +01:00
Stéphane Adjemian (Karaba) 97b63105a0 Add a parameter to the lyapunov_symm routine (debug mode). 2014-10-13 17:42:53 +02:00
Johannes Pfeifer fbdfaf640a Document computation of theoretical mean at second order
(cherry picked from commit 7084913382dc892fa4385fb7783e5daec41449f7)
2014-07-17 22:05:08 +02:00
Johannes Pfeifer fb17e0da36 Fix dsge_simulated_theoretical_variance_decomposition.m for non-stationary variables only
If all variables contain unit roots, dsge_simulated_theoretical_variance_decomposition.m crashes because tmp is NaN. Instead, the first draw is now checked for a unit root and a warning is displayed.
2014-07-16 16:52:02 +02:00
Marco Ratto b33da9a40d Fix bug when unit root models provide NaN's or Inf's in g_omega 2014-01-30 10:38:46 +01:00
Stéphane Adjemian (Charybdis) ddd95361ba Cosmetic changes. Added isoctave function to replace exist('OCTAVE_VERSION'). 2013-11-04 10:54:45 +01:00
Johannes Pfeifer 18664da6fe Fix for theoretical autocovariances for purely forward looking models
In this case, Ex will by empty, leading to non-conformable empty matrices. Solution: compute correction term without using non-existent states.
2013-07-24 23:38:37 +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
Sébastien Villemot 7a16ab15fe No longer report momemts in stoch_simul with order>=3 if periods not specified
Previously Dynare was reporting dummy theoretical moments
2011-10-27 18:03:42 +02:00
Ferhat Mihoubi 13875c1373 The computation of autocovariances is now compatible with blocks decomposed models 2011-10-12 14:54:28 +02:00
Sébastien Villemot 555c519474 Fix typo in header 2011-09-05 15:16:05 +02:00
Ferhat Mihoubi b4b2f21695 The theoretical autocovariances can be computed with block option 2011-08-11 14:15:50 +02:00
Houtan Bastani 43479f6ef3 use short-circuit ops (|| and &&) as opposed to (| and &) to avoid warnings in Octave (and save time) 2011-02-10 15:54:23 +01:00
Sébastien Villemot 02652f6eb8 Updated copyright notices 2011-02-04 17:27:33 +01:00
Michel Juillard 22d5bd16cf removed useless auxiliary variables from call to kalman_transition_matrix() 2011-01-26 21:24:46 +01:00
Sébastien Villemot 2ebebd1d28 No longer crash when all variables selected with "stoch_simul" are
non-stationary
2010-10-11 12:58:38 +02:00
Sébastien Villemot 9d67555fc1 Fix bug in the output of stoch_simul: in the presence of non-stationary variables, and when selecting only a subset of variables for the output, the "NaN"s in the "mean" column where wrongly placed 2010-10-11 12:58:38 +02:00
Michel Juillard c2f7f0a555 computes now variance decomposition relative to the sum of the effects of individual shocks rather than aggregate variance.
When the aggregate variance differs from the shock of the sum of the effects of individual shocks by more than 0.01% a warning is displayed.

This behaviour is documented in the reference manual.
2010-04-03 11:27:49 +02:00
sebastien e6a1916577 Theoretical autocovariances:
* at order 2 with non-stationary variables, fixed 2nd order mean correction
* when HP filtering (whether at order 1 or 2), consider all variables as stationary (closes #52)


git-svn-id: https://www.dynare.org/svn/dynare/trunk@3288 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-23 11:34:44 +00:00
sebastien 502e3e1df8 Beautified MATLAB code (Unix newline convention + Emacs indentation), except: AIM, swz, particle
git-svn-id: https://www.dynare.org/svn/dynare/trunk@3250 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-12-16 17:17:34 +00:00
michel 05189497a5 changed handling of nonstationary variables:
- oo_.mean, oo_.var, oo_.gamma_y contains all selected variables
- moments of non-stationary variables are set to NaN
options_.Schur_vec_tolerance lowered to 10^-11


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2810 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-07-04 14:11:51 +00:00
stepan ba080ab910 v4.1:: Changes related to lyapunov_symm.
+ Fixed a bug introduced in the previous commit.
+ Added a threshold parameter for the complex blocks in the upper
triangular matrix T in lyapunov_symm.m (new field in options_)
+ Cosmetic changes.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2414 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-02-12 14:16:10 +00:00
stepan fe418672cd v4.1: Changes related to (posterior) 2nd order moments.
+ Efficiency changes:
++ Do not compute the variance decomposition if not needed.
++ Do not apply the Schur decomposition for each shock in case of a variance decomposition.
+ Bug corrections and cosmetic changes.
+ Corrections of some headers.


git-svn-id: https://www.dynare.org/svn/dynare/trunk@2411 ac1d8469-bf42-47a9-8791-bf33cf982152
2009-02-10 21:10:11 +00:00
sebastien 9f5beff89e v4 matlab: fixed remaining copyright headers (those files which are in the CR+LF endline convention)
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1975 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-08-01 13:08:13 +00:00
sebastien ddaaf9e1e3 v4 matlab:
* added a function matlab_ver_less_than() for testing Matlab version
* updated dynare_config.m and build_matlab.m accordingly
* removed tests to check whether we are older than Matlab 6.5 (R13), since we don't support those old versions anymore
* removed a few unnecessary uses of eval()


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1936 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-07-07 17:08:55 +00:00
sebastien e08cad8265 v4: merged Octave branch into trunk
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1899 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-06-24 18:20:48 +00:00
adjemian 341adad2e9 Added new functions for posterior distribution processing (second order moments) + Removed global variables.
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1890 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-06-21 08:33:31 +00:00
michel 7d66de73f7 v4 th_autocovariances.m: corrected bug in case of multiple unit roots
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1754 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-03-29 08:52:00 +00:00
assia 1c53328664 header updated
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1632 ac1d8469-bf42-47a9-8791-bf33cf982152
2008-01-21 16:23:00 +00:00
michel 1f56e496b1 v4: corrected osr
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@924 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-09-21 15:48:01 +00:00
michel f998aef46c v4: correction of computation of variances in models with unit roots
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@912 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-09-15 12:20:28 +00:00
michel c85730c108 v4: ported changes for computing variance in unit root models
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@720 ac1d8469-bf42-47a9-8791-bf33cf982152
2006-04-20 09:08:25 +00:00
michel 9a9872fd33 dynare_v4 from CVS
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@8 ac1d8469-bf42-47a9-8791-bf33cf982152
2005-02-18 19:54:39 +00:00