Sébastien Villemot
81d4fd5d83
Occbin: generate +<basename>/occbin_difference.m
...
In particular, this implies that steady state values of endogenous in the
“occbin_constraints” block must now be specified using the STEADY_STATE()
operator (and not with a “_ss” suffix).
Moreover:
– make various simplifications to the fields generated under M_
– in the driver file, replace the call to occbin.initialize() by a few explicit operations
Ref. #68
2021-07-20 12:26:11 +02:00
Sébastien Villemot
90b1235a64
New utility to check if an expression contains an exogenous (possibly deterministic)
2021-07-20 12:10:58 +02:00
Sébastien Villemot
08ac455fcd
Implement “occbin_constraints” block
...
Consequently drop “occbin” option to “model”.
Incidentally, allow more values in equation tag names (previously some keywords
such as “alpha” were disallowed).
Ref. #68
2021-07-16 11:34:27 +02:00
Stéphane Adjemian (Ryûk)
6b9d94405c
Return the reduced form of the structural VAR model optionally.
...
Also
- changed the name of the generated matlab routine,
- changed initialization of matrix a0.
2021-07-16 08:33:26 +02:00
Sébastien Villemot
2e696a2e0d
Add shocks(surprise) block (for occbin)
...
Ref. #68
2021-07-13 21:55:31 +02:00
Sébastien Villemot
f0002c5ac6
Fix compiler warning introduced by 61b37942ab
2021-07-13 17:18:06 +02:00
Sébastien Villemot
c3b0ce8e69
shocks/mshocks/conditional_forecast_paths: various cleanups
2021-07-13 17:17:57 +02:00
Sébastien Villemot
5624260a07
Merge branch 'occbin_rebase' into 'master'
...
First part of Occbin interface
See merge request Dynare/preprocessor!42
2021-07-13 13:38:26 +00:00
Johannes Pfeifer
61b37942ab
First part of Occbin interface
2021-07-13 13:38:25 +00:00
Sébastien Villemot
c9c36c037a
New preprocessor option “nocommutativity”
...
This option tells the preprocessor not to use the commutativity of addition and
multiplication when looking for common subexpressions.
As a consequence, when using this option, equations in various outputs (LaTeX,
JSON…) will appear as the user entered them.
There is however a potential performance cost to using this option, yet to be
determined.
Ref. dynare#1788
2021-07-13 14:35:10 +02:00
Sébastien Villemot
6aeef11bb2
New perfect_foresight_with_expectation_errors_{setup,solver} commands
2021-07-09 17:14:22 +02:00
Sébastien Villemot
365fb27f3d
New “structural” option to “var_model”
...
As the name implies, this option allows contemporaneous variables on the RHS.
The A0 matrix for contemporaneous variables is added as a second (optional)
output to the generated var_ar.m file. Note that for reduced-form VAR, this
matrix will be the identity.
Also, the user is now allowed to write the VAR models in a more flexible form:
the LHS must still be a single variable, but the RHS can be an arbitrary
expression (as long as it is linear, obviously). Internally, the preprocessor
now uses derivation to compute the coefficients of the AR and A0. This change
applies to both reduced-form and structural VAR models.
Ref. dynare#1785
2021-07-08 12:55:47 +02:00
Sébastien Villemot
f7a367d7b1
“var_model” statement: make “eqtags” option mandatory
2021-07-08 12:55:40 +02:00
Sébastien Villemot
67f4777ac3
Remove support for obsolete syntax: var_model(order = 2) X Y Z;
2021-07-07 18:26:09 +02:00
Sébastien Villemot
4cc22897b7
Cosmetic improvements
2021-07-06 19:09:25 +02:00
Sébastien Villemot
8df34c1ca5
VAR and trend component models: improve sanity checks on lead/lags on RHS
...
In particular, forbid lagged exogenous.
2021-07-06 18:52:38 +02:00
Sébastien Villemot
c9d6d9c6f8
Enforce non-positivity of the “time_shift” option to “var_expectation_model”
...
Closes : #70
2021-07-06 16:40:20 +02:00
Sébastien Villemot
221daeab6f
New time_shift option to var_expectation_model
...
Ref. dynare#1787
2021-07-01 17:56:07 +02:00
Sébastien Villemot
5a33699f03
VAR / trend component models: cosmetic changes
2021-07-01 17:52:05 +02:00
Sébastien Villemot
700dd31d57
Merge branch 'mom_varlist' into 'master'
...
method_of_moments: remove var_list_
Closes #69
See merge request Dynare/preprocessor!44
2021-06-28 09:32:07 +00:00
Sébastien Villemot
e6e25a5c87
macOS: fix detection of GCC installed by Dynare package
...
Since the preprocessor has moved, the relative path of the local Homebrew needs
to be adjusted.
2021-06-24 15:16:55 +02:00
Johannes Pfeifer
f354458418
method_of_moments: remove var_list_
2021-06-24 15:10:24 +02:00
Sébastien Villemot
1c3e6f89af
macOS: bump to GCC 11 (for compilation and for use_dll)
2021-06-24 12:34:29 +02:00
Sébastien Villemot
824433aa3f
Refactor driver output for heteroskedastic_shocks
...
Ref. dynare#1791
2021-06-15 12:53:40 +02:00
NormannR
d0ec5eb155
Allows to write M_.objective_tmp_nbr in the driver.m file
...
Writes the number of temporary terms of the planner objective function derivatives objective_tmp_nbr in the driver.m file.
Useful for the k-order approximations of welfare.
2021-06-11 12:37:31 +02:00
Sébastien Villemot
74ef3457b4
Use secure URL for link to GNU licenses
2021-06-09 17:21:00 +02:00
Sébastien Villemot
86b2b4c2da
When order option > 3, compute planner objective derivatives at that order
...
Ref. dynare!1866
2021-06-04 16:20:29 +02:00
Sébastien Villemot
04f242f971
xls_sheet option: allow quoted strings as value
...
Closes : #67
2021-05-31 18:18:25 +02:00
Johannes Pfeifer
4b401e6253
Preparations for Occbin MR
...
Related to https://git.dynare.org/Dynare/dynare/-/merge_requests/1863
2021-05-31 15:12:46 +02:00
Sébastien Villemot
c5f9ae89e7
Implement new “occbin” option to “model” block
...
For the time being, the preprocessor will refuse that this option be used with
any command other than estimation.
By the way, remove occbin_likelihood and occbin_smoother options to estimation.
Ref. dynare#569
2021-05-31 10:00:59 +02:00
Sébastien Villemot
1e9ea1acf4
Merge branch 'smoother_redux' into 'master'
...
Add smoother_redux option
See merge request Dynare/preprocessor!38
2021-05-27 14:55:35 +00:00
Johannes Pfeifer
2a8726fe6e
Add kalman_algo and filter_covariance to calib_smoother
2021-05-27 16:42:10 +02:00
Johannes Pfeifer
0d635aed36
Add smoother_redux option
2021-05-27 16:41:36 +02:00
Sébastien Villemot
b12b254f2c
Add heteroskedastic_filter option and heteroskedastic_shocks block
...
Ref. dynare!1844, dynare!1851
2021-05-26 18:27:52 +02:00
Sébastien Villemot
e552bfc4b3
Refactor parsing of deterministic shocks
...
This will simplify the implementation of heteroskedastic_shocks.
2021-05-26 17:05:51 +02:00
Sébastien Villemot
c35f160e3f
Minor simplification
2021-05-26 16:17:18 +02:00
Sébastien Villemot
97e9609c28
Streamline use_dll compilation under MATLAB
...
— drop Windows 32-bit support
— drop -fno-omit-frame-pointer compilation flag under GNU/Linux
— drop -static-libstdc++ flag under Windows
— no longer link to -lstdc++ under GNU/Linux and macOS
— gracefully fail when 'mexext' value is unknown
2021-05-24 18:21:23 +02:00
Sébastien Villemot
a2c96a9d79
Allow empty quoted strings
...
Can be useful when resetting a filename option to an empty value, e.g. for the
mh_initialize_from_previous_mcmc_* options.
Ref. dynare!1841
2021-05-11 18:50:18 +02:00
Sébastien Villemot
73e07b78b8
Add mh_initialize_from_previous_mcmc option family to estimation command
...
Ref. dynare!1841
2021-05-11 18:12:54 +02:00
Sébastien Villemot
be7ff255f6
The fast_realtime option now accepts a vector of integers
...
Ref. dynare!1842
2021-05-10 15:41:36 +02:00
Sébastien Villemot
80e1090257
Add no_init_estimation_check_first_obs option to estimation
...
Ref. dynare!1839
2021-05-07 17:41:20 +02:00
Sébastien Villemot
337b6f469c
New parallel_use_psexec command-line option
...
Ref. dynare!1843
2021-05-06 16:25:46 +02:00
Sébastien Villemot
1d188a7444
Add comment
...
[skip ci]
2021-05-04 17:21:47 +02:00
Sébastien Villemot
3c4d647cc3
Forbid mfs > 0 in a stochastic setup (or even when using check)
...
The result would be wrong.
Ref. dynare#1726
2021-05-04 17:11:09 +02:00
Sébastien Villemot
7765efe95b
Windows: fix detection of location of MinGW compiler
2021-04-30 15:03:53 +02:00
Sébastien Villemot
12b61e4817
Bugfix in DataTree::writeToFileIfModified()
...
If the old file and the new contents shared a common prefix, then the output in
the generated file would be truncated at the start.
Ref. DynareJulia/Dynare.jl#1
2021-04-26 14:10:47 +02:00
MichelJuillard
9773bafc5b
Julia: write definition of get_power_deriv inside generated static/dynamic files
2021-04-26 10:52:18 +00:00
Sébastien Villemot
dca294de3a
Julia: refactor the auxiliary variable/series files
...
— rename the files with camel case
— encapsulate the functions with modules
— change the signature of function <MODFILE>_dynamic_set_series!, by removing
the output argument and appending the exclamation mark, since this function
modifies one of its arguments, and for symmetry with the static version
Ref. DynareJulia/Dynare.jl#1
2021-04-23 17:57:33 +02:00
Sébastien Villemot
4354d8a578
Julia: do not overwrite steady state / auxiliary variables/series files if contents has not changed
...
Ref. DynareJulia/Dynare.jl#1
2021-04-23 17:56:54 +02:00
Sébastien Villemot
4cfc7a563b
Julia: do not overwrite Static/Dynamic files if contents has not changed
...
Ref. DynareJulia/Dynare.jl#1
2021-04-22 18:03:47 +02:00
Sébastien Villemot
81b1d02748
Julia: fix typo in StatsFuns package name
...
Ref. DynareJulia/Dynare.jl#1
2021-04-22 15:48:25 +02:00
Sébastien Villemot
0213c9be73
Merge branch 'ramsey_k_order' into 'master'
...
Allows to write M_.NNZDerivatives_objective in the driver.m file
See merge request Dynare/preprocessor!36
2021-04-22 13:28:18 +00:00
normann
22fbfb0fba
Allows to write M_.NNZDerivatives_objective in the driver.m file
...
Writes the number of non-zero derivatives of the planner objective function NNZDerivatives_objective in the driver.m file. Useful for the k-order approximations of welfare.
2021-04-22 15:26:25 +02:00
Michel Juillard
d511e3ec3a
add deterministic_trends statement (only used by Dynare Julia)
2021-04-22 15:19:21 +02:00
Sébastien Villemot
910649dd28
Fix treatment of “series” option of “initval_file”
...
This option was treated as a numeric value: it was a hack to ensure that the
name of the dseries object was printed without quotes in the driver file.
However, that would make the JSON output synctically incorrect.
This commits removes the hack, and treats the “series” option as a string
value (in the same way as for the “data” command). A modification of the MATLAB
code will thus be needed to accomodate the change.
2021-04-20 10:39:14 +02:00
Sébastien Villemot
1f17528383
Julia: update dependencies of Static/Dynamic modules
...
Ref. DynareJulia/Dynare.jl#1
2021-04-19 17:02:46 +02:00
Sébastien Villemot
c2d47fb48e
Julia: remove driver file
...
The Julia code now uses the JSON output for retrieving the information that
previously was in the driver file.
2021-04-19 17:02:41 +02:00
Sébastien Villemot
7b3df21f11
DataTree::operator=(): fix crash when symbol ID ordering of model local variables does not correspond to the recursive ordering in the model block
...
Ref. dynare#1782
2021-04-16 17:34:13 +02:00
MichelJuillard
c2009e2012
fix set_auxiliary_variables.jl
2021-04-01 17:05:13 +02:00
MichelJuillard
6662d8014e
fix writeJsonOutput for load_params_and_steady_state
2021-04-01 17:05:13 +02:00
Michel Juillard
fd979f625a
add maximum lead and lag to modfile.json
2021-04-01 17:05:13 +02:00
Michel Juillard
c9dd241f5b
add varobs statement to JSON output
2021-04-01 17:05:12 +02:00
Michel Juillard
50a2e7c44f
Add escape codes in NativeStatement and VerbatimStatement writeJsonOutput() method
2021-04-01 17:05:10 +02:00
Sébastien Villemot
29b3b744ef
Remove spurious space produced when parsing key/value pairs
...
Introduced in e46168db66
.
2021-02-26 12:28:06 +01:00
Stéphane Adjemian (Charybdis)
f0d67b01dd
Honour bi-annual dates in mod file.
2021-02-26 09:30:02 +01:00
Sébastien Villemot
5581052451
Add particle_filter_options option to estimation
...
Ref. #59
2021-02-23 16:54:36 +01:00
Sébastien Villemot
e46168db66
Simplify parsing of lists of key/value pairs options
2021-02-23 16:49:11 +01:00
Sébastien Villemot
54365b16ed
Remove unfinished “occbin” option to perfect_foresight_solver and extended_path
...
Partially reverts f914837aff
and
567156aad4
.
2021-02-22 16:22:17 +01:00
Sébastien Villemot
825b9ee8ef
Fix bugs introduced in d3e115194b
...
Ref. #65
2021-02-19 20:29:18 +01:00
Sébastien Villemot
4798a5e2bc
Cosmetic change
2021-02-19 20:09:48 +01:00
Sébastien Villemot
ca4b1ba4ed
Remove time subscript in LaTeX output of model-local variables
...
See https://forum.dynare.org/t/tex-output-unwanted-subscript-t/16072
2021-02-19 17:45:58 +01:00
Sébastien Villemot
d3e115194b
Fix output write_latex_original_model for model-local variables
...
Those variables were substituted out by early substitution methods (which are
also called on the original model, for an unknown reason).
Closes : #65
2021-02-19 17:45:02 +01:00
Willi Mutschler
071a46a798
Add interface to set zero_moments_tolerance
...
Useful in identification and method_of_moments toolbox to set the tolerance which replaces very small numbers by hard zeros in unconditional second moments (particularly in pruned_state_space_system.m and disp_moments.m)
2021-02-16 16:29:57 +01:00
Sébastien Villemot
2781e3e6f6
A few modernizations using clang-tidy
2021-02-10 16:48:46 +01:00
Sébastien Villemot
9274675efb
Allow booleans in optimization options list
...
Closes : #63
2021-02-10 16:18:58 +01:00
Willi Mutschler
f7cd6dbf0a
🐛 save oo_.time also in _results.mat
2021-02-04 10:48:59 +01:00
Sébastien Villemot
702cf62ee3
Declare some methods as const
2021-02-03 18:09:11 +01:00
Sébastien Villemot
234fcd1d2b
Remove obsolete stuff from bytecode
2021-02-01 14:46:08 +01:00
Sébastien Villemot
754a1a464d
Use default member init
...
Performed using modernize-use-default-member-init from clang-tidy.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-default-member-init.html
2021-02-01 12:44:24 +01:00
Sébastien Villemot
4ee89d6e70
Use more auto keyword
...
Performed using modernize-use-auto from clang-tidy.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html
2021-02-01 12:42:59 +01:00
Sébastien Villemot
07391e0f9f
Remove unused kludge
2021-02-01 12:07:33 +01:00
Sébastien Villemot
89e2daf7c7
C++17 modernization: convert the remaining enums to enum classes
2021-02-01 12:05:06 +01:00
Willi Mutschler
c79ae5d4bd
Save 'Total computing time' into oo_.time
2021-01-28 11:28:41 +01:00
Johannes Pfeifer
ad22e62874
filter_initial_state: Port lost preprocessor commits from https://git.dynare.org/JohannesPfeifer/dynare/-/commits/filter_initial_state
2021-01-26 16:03:04 +01:00
Sébastien Villemot
7468b4d8d7
Remove more stuff related to unfinished decomposition in linear and nonlinear blocks
...
Ref. #39 , dynare!1626
2021-01-25 18:13:35 +01:00
Sébastien Villemot
af9bd8f109
Remove the unfinished decomposition in linear and nonlinear blocks
...
Also remove the det_cond_forecast interface, that was related to it.
Ref. dynare!1626
Closes : #39
2021-01-25 18:03:37 +01:00
Sébastien Villemot
1e5de7d71e
Fix typo
...
Introduced in 4c14dc3fbf
.
2021-01-22 14:20:52 +01:00
Sébastien Villemot
4c14dc3fbf
Macro processor: gracefully fail when argument to @#ifdef/@#ifndef is not a variable name
...
Ref. dynare#1771
2021-01-22 12:20:13 +01:00
Sébastien Villemot
ec66768a63
Forbid exogenous deterministic variables with a lead or lag
...
Ref. dynare#1765
2021-01-22 11:59:44 +01:00
Sébastien Villemot
ab656f2d84
macOS/use_dll: upgrade to gcc-10 compiler
2021-01-13 15:42:09 +01:00
Sébastien Villemot
a0d12310cb
macOS/use_dll: drop -mmacosx-version-min=10.9 flag
...
The MEX files are not intended for distribution to other systems.
2021-01-13 15:42:09 +01:00
Sébastien Villemot
c91178e3e3
macOS/use_dll: no longer pass -arch x86_64, in preparation for ARM support
2021-01-13 15:42:09 +01:00
Stéphane Adjemian (Charybdis)
7a8446e836
Added call to a routine filling the fields required by some nonlinear solvers.
...
At some point this task might be delegated to the preprocessor.
(cherry picked from commit ca230d0902eadeb89ab705cf66790ffa2f135192)
2021-01-12 19:50:37 +01:00
Willi Mutschler
a87b2753ed
MoM: Add option analytic_jacobian
2021-01-08 18:57:06 +01:00
Sébastien Villemot
8e03f17350
Cleanup the “output” option
...
— output Julia files as soon as “language=julia” is passed, independently of
the value of the “output” option
— drop the “dynamic” and “first” values of the “output” option, since they
actually do nothing
— obey the “output” option even in the deterministic case
Ref. dynare#1600
2021-01-08 18:51:48 +01:00
Sébastien Villemot
a9daec1c07
Rename preprocessor binary to dynare-preprocessor
...
Ref. dynare#1728
2021-01-06 17:08:42 +01:00
Sébastien Villemot
cd443a6083
Revert to accepting the “nolog” option, but do nothing about it
...
This is necessary to avoid an “unknown option” error.
Ref. dynare#1743
2021-01-06 15:50:30 +01:00
Sébastien Villemot
78874a01d3
No longer deal with the log file at the preprocessor level
...
Ref. dynare#1743
2021-01-06 14:19:33 +01:00
Johannes Pfeifer
1def52a088
Add interface to set schur_vec_tol
2020-12-17 19:55:20 +01:00
Sébastien Villemot
91db87b1cf
Forbid some basenames, since they will cause trouble
...
Closes: preprocessor#62
2020-12-16 18:21:55 +01:00