Commit Graph

37 Commits (master)

Author SHA1 Message Date
Stéphane Adjemian (Argos) 368a7e2478
Fix bug introduced in d95154f. 2023-11-07 13:06:58 +01:00
Stéphane Adjemian (Argos) d95154ffa9
Do not automagically cherrypick vars from pac_target_nonstationary. 2023-10-21 10:20:28 +02:00
Stéphane Adjemian (Charybdis) 1d22285043
Throw a warning if a parameter has no value. 2022-04-28 12:58:22 +02:00
Stéphane Adjemian (Charybdis) e7d11dd7b1
Remove aux variables from target definition (PAC). 2022-02-18 09:13:17 +01:00
Stéphane Adjemian (Ryûk) fca5b99a03
Fix bug (missing condition).
The cherrypick was failing if the selected equations were not about a PAC equation (e.g. a VAR expectation
model), because the code was assuming the existence of the pac field in M_.
2022-01-27 10:49:19 +01:00
Stéphane Adjemian (Ryûk) b297353b06
PAC decomposition between stationary and non-stationary components.
The taget in PAC equation can be decomposed into an arbitrary number of components (variables
in the VAR auxiliary model).

TODO Iterative OLS estimation (which is not the preferred estimation routine).
TODO Decomposition in the routine evaluating the forecasts for each component.
2021-12-17 12:17:13 +01:00
Stéphane Adjemian (Ryûk) f4a7a5430c
Re-implement PAC equations.
This commit only introduce new elements in the Dynare language (adding the
 possibility to decompose the target into stationary and non stationary
 components) and insure that all the former codes (ie without decomposition of
 the target) are still working as expected.
2021-11-24 16:40:35 +01:00
Stéphane Adjemian (Ryûk) 9acac86bd8
Fix cherrypick for PAC equations in case of rule of thumb agents.
The correction for growth neutrality should be substituted in the optimal part
of the PAC equations.

(cherry picked from commit 12694ff9347b2191b4e0f6a32cb038956cb38f53)
2021-10-21 10:22:33 +02:00
Stéphane Adjemian (Charybdis) d3678edbbe
Add try/catch block (cherry-picking failures).
Close and delete generated file if cherry picking fails for any reason.
2021-08-19 13:03:44 +02:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Sébastien Villemot 78fdd50894
cherrypick.m: Octave compatibility fix
The plus sign (+) was unescaped in the regular expression, which was confusing
Octave.

By the way, also remove unneeded parenthesis groupings.
2021-02-04 16:01:54 +01:00
Stéphane Adjemian (Charybdis) 3521e83b26
Factorize calls to loadjson_ routine. 2020-02-02 21:52:44 +01:00
Stéphane Adjemian (Charybdis) 1e0da3a6a7
Removed global. 2020-02-02 21:14:23 +01:00
Stéphane Adjemian (Charybdis) 0aa78c6914
Added the possibility to change more than one variable name in an equation. 2020-01-31 18:57:22 +01:00
Stéphane Adjemian (Odysseus) 5289636f69 Do not include the original names of the transformed endogenous variables. 2020-01-30 20:31:21 +01:00
Stéphane Adjemian (Odysseus) 3dbc7640d9 Fixed list of exogenous variables in cherry-picking. 2020-01-30 19:21:50 +01:00
Stéphane Adjemian (Odysseus) 95acf31a69 Fixed optional renaming of the variables. 2020-01-30 11:46:17 +01:00
Stéphane Adjemian (Odysseus) 1c5f6a97c0 Fixed bug in cherry-picking (LHS expressions were wrong).
For instance LHS expression as `diff(log(X))` was replaced by `X` in
the generated model.inc file.
2020-01-29 18:34:26 +01:00
Stéphane Adjemian (Charybdis) 6924e07b20
Use jsondecode to read JSON files if available. 2020-01-28 16:36:40 +01:00
Stéphane Adjemian (Charybdis) 3fcca321a2
Bug fixes.
- cherrypick routine was not returning the correct lists of endogenous
   and exogenous variables. The number of endogenous variables was even
   not matching the number of equations.
 - In some cases LHS expressions were not preprocessed to extract the
   name of an endogenous variable.
 - Return a non cryptic error message if more than one endogenous
   variable appears in the LHS.
2020-01-27 14:02:03 +01:00
Stéphane Adjemian (Charybdis) d11815cba0 Cosmetic change. 2019-07-19 21:33:13 +02:00
Stéphane Adjemian (Charybdis) d4ca60ad28 Renames PAC/VAR expectation aux. variable.
Use _PE or _VE postfix instead of PE_ or VE_ prefix.
2019-05-20 14:44:28 +02:00
Stéphane Adjemian (Charybdis) 6ac751bf26 Updated preprocessor submodule. 2019-05-04 08:51:34 +02:00
Stéphane Adjemian (Charybdis) 1a55cd7945 Write files only if necessary.
DO not print files for parameters declaration, exogenous variables declarations
or parameter values if the selected equations do not have parameters and/or
exogenous variables (typically accounting identities).
2019-04-26 18:46:34 +02:00
Stéphane Adjemia (Scylla) 2d9e7a704b
Always write list of variables on more than one line.
(one line per variable)
2019-04-11 10:42:50 +02:00
Stéphane Adjemia (Scylla) 33c9b5f435
Cosmetic change.
Renamed the auxiliary variables for PAC/VAR expectations unrolled
expressions. Using shorter prefixes, PE_ and VE_ instead of pac_expectation and
var_expectations.
2019-04-02 22:57:45 +02:00
Stéphane Adjemia (Scylla) 8415ac48a0
Fixed bug (missing initialisation). 2019-04-02 21:31:45 +02:00
Stéphane Adjemia (Scylla) aa499671ce
Added the possibility to rename an endogenous variable in equation. 2019-04-02 18:06:47 +02:00
Stéphane Adjemia (Scylla) 599ebc2614
Ensure that residuals are removed even if the variable is not preceeded by a + symbol. 2019-04-02 15:40:43 +02:00
Stéphane Adjemia (Scylla) f39f57b9b5
Added parameter values in cherrypick/agregate routines. 2019-04-02 07:11:32 +02:00
Stéphane Adjemian (Charybdis) 39041009ef
Added tag on auxiliary variable for PAC/VAR expectations. 2019-03-28 11:19:38 +01:00
Stéphane Adjemian (Charybdis) cb97ed8081
Added tag on equation defining PAC/VAR expectation unrolled expression. 2019-03-28 11:18:42 +01:00
Stéphane Adjemian (Charybdis) d4a1d4b46a
Added missing aux. variable (PAC/VAR expectation). 2019-03-25 17:42:01 +01:00
Stéphane Adjemian (Charybdis) e20a3ffa45
Export tags on endogenous and exogenous variables. 2019-03-22 14:39:40 +01:00
Stéphane Adjemian (Charybdis) ecfafc048b
Export equation tags if defined in original mod file. 2019-03-22 11:29:59 +01:00
Stéphane Adjemian (Charybdis) 07a40d2df4
Do not unroll expectations in the equation where they are used...
... But create an auxiliary variable with corresponding equation (where the
expectation are unrolled). Also separate the growth neutrality correction.
2019-03-21 17:33:07 +01:00
Stéphane Adjemian (Charybdis) d3db092c81
Added a cherry-pick routine.
Extracts equations from a mod file and produce .inc files (equations, lists of
parameters, endogenous variables and exogenous variables) that can be included
in a mod file that will be used to simulate the model.

If an innovation has a tag `(used='estimationonly')` it will be excluded from
the generated files (ie list of shocks and equations).
2019-03-14 11:04:10 +01:00