Commit Graph

1682 Commits (8eeb92e56b7ae5ec0068d4dae4979a578ae267e6)

Author SHA1 Message Date
Sébastien Villemot 8eeb92e56b
Add hyberbolic primitives (sinh, cosh, tanh, asinh, acosh, atanh) 2021-12-07 18:04:56 +01:00
Sébastien Villemot 5f675eee18
Add erfc() primitive 2021-12-07 17:00:59 +01:00
Sébastien Villemot d69c14398d
Factorize test for normpdf(), normcdf(), erf() and trigonometric functions
Incidentally:
- add trigonometric tests for bytecode
- add back a test for pure M-files
2021-12-07 17:00:57 +01:00
Johannes Pfeifer c07508a917
occbin_write_regimes: distinguish between smoother and simulations
Closes: #1828
2021-12-07 12:41:34 +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
Sébastien Villemot 06fd42c19b
Drop the dynare_simul_ MEX in favour of the new Fortran k_order_simul MEX 2021-11-26 17:37:53 +01:00
Sébastien Villemot a3956996f7
Merge branch 'local_state_space_it' of git.dynare.org:normann/dynare
Ref. !1962
2021-11-26 17:35: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
NormannR f889a25e86 Amend the k_order_welfare routine for it to return the adequate output variables 2021-11-24 17:16:03 +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
Johannes Pfeifer 485c815f50 burnside_k_order.mod: fix timing logic
Did not correctly deal with loading of mex-file
2021-10-22 17:59:07 +02:00
Sébastien Villemot 2ab919ebf1
Testsuite: use default number of particles when comparing performance of the various state space iteration MEX 2021-10-21 16:34:22 +02:00
Stéphane Adjemian (Ryûk) f778e3c1ce
Fix growth neutrality correction in PAC equations.
- Force long run levels of the exogenous variables to be zero or g (the BGP growth rate of the LHS endogenous variable).
- Fix the correction of the correction for the share λ (aak γ).
- Provisions for the case where the long run level of the exogenous variable is
different from 0 or g (see tmp1 and ll which should be added to the growth
neutrality correction as a constant).

(cherry picked from commit a4423d734e1df1d4ee09c7225d7fd610e0d94cd1)
2021-10-21 10:19:23 +02:00
Sébastien Villemot e66a1a63f8
local_state_space_iteration_2 MEX: enable parallelization by default 2021-10-20 15:33:04 +02:00
Sébastien Villemot fbba0bf2fc
Testsuite: fix display of relative timings of local_state_space_iteration_{k,fortran} 2021-10-20 15:32:26 +02:00
Johannes Pfeifer 45772571c3 testsuite: expand Ramsey tests to check for consistency of utility and welfare
Also increase variance to make tests more challenging
2021-10-15 12:46:26 +02:00
Sébastien Villemot 3af51e3153
Testsuite: disable an estimation with mode_compute=5 that randomly fails under Octave 2021-10-13 17:01:02 +02:00
Sébastien Villemot f9a550651d Merge branch 'k_order_fix' into 'master'
k_order_simulation bug: fixes simulations and adds/corrects integration test

Closes #1819

See merge request Dynare/dynare!1940
2021-10-12 15:34:29 +00:00
Johannes Pfeifer d5141ced42 simult_.m: remove redundant first simulation period for k_order_simulations
Closes https://git.dynare.org/Dynare/dynare/-/issues/1819
2021-10-12 15:20:26 +02:00
Johannes Pfeifer cd43c8669b burnside_k_order.mod: fix logic of test and compare Fortran and C++ routines
Also decreases approximation order for speedup
2021-10-12 15:20:26 +02:00
Johannes Pfeifer 733ffdf3ab Add unit test for k-order simulations 2021-10-12 15:20:11 +02:00
Johannes Pfeifer fa04600264 Testsuite: add calls to resid for optimal policy 2021-10-11 18:06:37 +02:00
Sébastien Villemot 4a041b3b2c
tests/measurement_errors/fs2000_corr_me_ml_mcmc/fs2000_corr_ME.mod: set mh_blocks=1
This fixes the test under Octave on haumea.
2021-09-29 15:02:13 +02:00
Sébastien Villemot 191cb05f87
tests/block_bytecode/lola_stochastic_block.mod: increase test tolerance on ghx
Needed for Octave on haumea.
2021-09-28 12:45:52 +02:00
Sébastien Villemot 9fd0806643
Testsuite: do not distribute optimal_policy/Ramsey/oo_ramsey_policy_initval.mat
It is a generated file.

By the way, ensure that the generated file has the .mat extension under Octave.
2021-09-27 16:43:50 +02:00
Normann Rion 6475c52b3d Implements k-order simulation routine in Fortran (Ref: #1802)
`k_order_simul` may replace `dynare_simul_` in the long run
2021-09-24 09:11:15 +02:00
Sébastien Villemot 7083f1d692 Merge branch 'local_state_space_it' into 'master'
Implements the Fortran replacement of local_state_space_iteration_k (Ref #1802)

See merge request Dynare/dynare!1918
2021-09-22 15:54:17 +00:00
NormannR cab65dabb5 Implements `local_state_space_iteration_fortran`, the Fortran replacement of `local_state_space_iteration_k` (Ref #1802)
- Creates the library `libkordersim` with all the relevant Fortran routines to `folded_to_unfolded_dr` and `local_state_space_iteration_fortran`
   - Implements `folded_to_unfolded_dr`, which converts folded decision rule matrices to their unfolded counterparts
2021-09-22 16:28:46 +02:00
Sébastien Villemot 014e18df69
Preprocessor: remove unused steady_state_growth option to pac_model 2021-09-22 16:27:48 +02:00
Johannes Pfeifer 76b3f53d0b ramst_initval_file.mod: move to non-deprecated syntax 2021-09-22 09:56:33 +02:00
Sébastien Villemot fa3ed38735
Source package: fix bug introduced in d62a09cdef 2021-09-21 17:45:30 +02:00
Sébastien Villemot 872c0424a8
tests/block_bytecode/lola_stochastic_block.mod: increase test tolerance on ghu
Needed for Octave on lupi.
2021-09-21 17:00:39 +02:00
Sébastien Villemot d62a09cdef
tests/ep/rbcii.mod: use supported mechanism for user-provided steady state file
Incidentally, this should fix random crashes under Octave (where the manually
copied steady state file was not correctly detected by the interpreter).
2021-09-21 16:26:58 +02:00
Johannes Pfeifer 2dd6510051 smoother2histval.m: undo logging
Closes https://git.dynare.org/Dynare/dynare/-/issues/1407
2021-09-17 14:43:50 +02:00
Sébastien Villemot 49a396030b
Yet another batch of Octave compatibility fixes 2021-09-16 18:25:00 +02:00
Sébastien Villemot 37467a9b9d
Merge branch 'octave_fixes' of git.dynare.org:wmutschl/dynare
Ref. !1926
2021-09-16 15:16:14 +02:00
Willi Mutschler 5199ea414b
Fix for testsuite on Octave AnScho_matched_moments.mod 2021-09-16 12:45:38 +02:00
Johannes Pfeifer 38a2dcaa8f dynrbc_common.inc: increase maxit and check_ahead_periods
Required for Octave
2021-09-16 10:40:44 +02:00
Johannes Pfeifer 001971bda6 dynrbc_common.inc: provide file ending required in Octave 2021-09-16 08:56:44 +02:00
Sébastien Villemot ff06b9ad10
More Octave compatibility fixes 2021-09-15 18:35:30 +02:00
Sébastien Villemot 4346903c65
Various Octave compatibility issues
Also improve on e42cf2e5b4 for the compatbilitity
with MATLAB < R2016a in occbin.write_regimes_to_xls.m.
2021-09-14 17:55:55 +02:00
Johannes Pfeifer e7b1d4aca5 testsuite: Fix missing dependence 2021-09-11 11:29:18 +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
Sébastien Villemot e42cf2e5b4
Various MATLAB R2014a compatibility fixes 2021-09-08 14:15:49 +02:00
Sébastien Villemot 8d4f5fbd9b
Fix tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag.mod
A bug was introduced in 440a0e460b, erroneously
changing the name of the baseline for a comparison.

The bug was left unnoticed with recent versions of MATLAB and on Octave,
because the first array in the ensuing comparison had zero line, and because of
automatic broadcasting, the error message was not triggered.

However, the bug was exposed on MATLAB < R2016b.
2021-09-08 14:15:49 +02:00
Sébastien Villemot badb36d6d2
Fix typos introduced in c68e4801bd 2021-09-02 20:43:21 +02:00
Sébastien Villemot c68e4801bd
Build system: add several test files to the source package 2021-09-02 17:14:07 +02:00
Johannes Pfeifer cf6621187e
Add example for system prior
(@stepan removed trailing spaces)
2021-08-17 19:39:02 +02:00