Commit Graph

62 Commits (ec908386b67d1b27e0dc4174ef64796f74246318)

Author SHA1 Message Date
Johannes Pfeifer 4837a4d444 testsuite: clean up main folder 2023-03-17 10:35:00 -04:00
Sébastien Villemot 65053667cf
New “homotopy_alt_starting_point” option to “perfect_foresight_solver” command 2023-02-07 14:49:00 -05:00
Sébastien Villemot c3524d33d0
Testsuite: replace “simul” by “perfect_foresight_setup” + “perfect_foresight_solver” 2023-02-06 15:42:34 -05:00
Sébastien Villemot 5aca770931
perfect_foresight_with_expectation_errors_{setup,solver}: fix bugs with several exogenous
Closes: #1883
2023-01-24 15:02:07 +01:00
Sébastien Villemot 1b47c8a5e5
Drop the “periods” statement 2023-01-16 16:52:40 +01:00
Johannes Pfeifer cbbbdf4b3d make_y_.m: fix interaction with steady_state_model
closes https://git.dynare.org/Dynare/dynare/-/issues/1866
2022-10-13 16:33:58 +02:00
Sébastien Villemot 06f665e231
Perfect foresight: LBJ now available under stack_solve_algo=1 (with/without block/bytecode)
Previously, LBJ was available:

– under stack_solve_algo=6 when neither block nor bytecode were present
– under stack_solve_algo=1 with either block or bytecode (but the documentation
  was not making it clear that it was LBJ)

This commit merges the two values for the option, and makes them
interchangeable. LBJ should now be invoked with stack_solve_algo=1 (but
stack_solve_algo=6 is kept for compatibility, and is a synonymous).
2022-06-15 15:06:33 +02:00
Sébastien Villemot 63a116fb28
New += and *= syntaxes in “endval(learnt_in=…)” blocks 2022-05-03 17:46:59 +02:00
Sébastien Villemot 252a592f1a
Allow “learnt_in=1” for “shocks” and “endval” 2022-04-29 15:55:57 +02:00
Sébastien Villemot a600336c92
New “add” and “multiply” keywords in “shocks(learnt_in=…)” block 2022-04-26 15:22:15 +02:00
Sébastien Villemot 8488674ce4
New shocks(learnt_in=…) and endval(learnt_in=…) blocks
For use with perfect_foresight_with_expectation_errors_setup.
2022-04-21 17:10:52 +02:00
Sébastien Villemot b70b864829
perfect_foresight_with_expectation_errors_setup: move terminal condition to last line of CSV file 2022-04-12 15:51:04 +02:00
Sébastien Villemot a8a9051b31
New option “constant_simulation_length” to “perfect_foresight_with_simulation_errors_solver” command 2022-04-12 15:45:50 +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
Johannes Pfeifer 440a0e460b
Storage of results: use subfolder
Ref. #1758
2021-07-23 14:12:17 +02:00
Sébastien Villemot abd64c256e
New perfect_foresight_with_expectation_errors_{setup,solver} commands
These command solve the problem where agents think they know perfectly the
future (they behave as in perfect foresight), but make expectation errors.
Hence they can potentially be surprised in every period, and their expectations
about the future (incl. the final steady state) may change.

Currently the sequence of information sets needs to be passed through a CSV
file. Another interface may be added in the future.

The algorithm uses a sequence of (true) perfect foresight simulations (not
necessarily as many as there are periods, because if the information set does
not change between two periods, there is no need to do a new computation).

There are two possibilities for guess values:
— the default is to use the initial steady state for the simulation using the
  first-period information set; then use previously simulated values as guess
  values
— alternatively, with the terminal_steady_state_as_guess_value option, use the
  terminal steady state as guess value for all future periods (this is actually
  what the “true” perfect foresight solver does by default)
2021-07-09 18:16:46 +02:00
Stéphane Adjemian (Charybdis) 27ee801a67
Add specialized version of sim1 for static models.
Also add an integration test and fix homotopy error message.
2021-05-28 14:11:34 +02:00
Sébastien Villemot 62e42e08a8
Testsuite: more fixes related to stochastic block decomposition + mfs > 0
Ref. #1726
2021-05-05 10:15:52 +02:00
Sébastien Villemot ef58f1329a
Testsuite: factorize code between block decomposition tests based on LOLA model
By the way, move tests files under tests/block_bytecode/, which is a more
natural place.

Ref. #1726
2021-05-04 16:17:37 +02:00
Sébastien Villemot fcb52478e4
Preprocessor: replace exogenous with lead/lags by auxiliary variables in deterministic models
Several tests need to be adapted, because they were implicitly making the
assumption that there is no auxiliary variable.

Incidentally, this closes #1731. This commit therefore also removes the
workaround introduced in 0391dbbeb1.
2020-11-09 16:34:12 +01:00
Sébastien Villemot e7162a2a69
Block decomposition: new tests for mfs>0
Ref. #1726
2020-10-07 19:01:09 +02:00
Sébastien Villemot e5f45ef7b1
Testsuite: fix calls to fataltest.m 2020-05-13 14:58:09 +02:00
Sébastien Villemot 1ac7344e42
Rollback introduction of +get and +set folders
Under Octave, having namespaces called “get” and “set” overshadows the builtin
functions with the same names, which are needed for graphics manipulation.

Therefore we go back to the initial function naming scheme, but moving all
those functions under an “accessors” subdirectory.

Among other things, this is a revert of
e4134ab59b and
c5e86fcb59.

Ref. !1655, !1686
2019-12-19 17:20:38 +01:00
Marco Ratto e4134ab59b fixed calls to moved utilities 2019-12-17 22:26:38 +01:00
Michel Juillard cc0f2865a6 use tolf option inside simul() 2019-11-24 09:56:35 +01:00
Sébastien Villemot 42f172dec3
perfect_foresight_problem MEX: optimization for linear models
When the model is linear, there is no need to reevaluate the Jacobian for each
time period, since it is invariant.

Closes: #1662
2019-11-14 14:45:10 +01:00
Sébastien Villemot 42392df3bc
Put binary test datafiles in the git repository
This makes the testsuite robust to network failures.
2019-09-19 14:20:00 +02:00
Stéphane Adjemian (Charybdis) 64dc44740b Efficiency change. 2019-04-26 16:20:45 +02:00
Sébastien Villemot 1e5fab3881 Fix tests for stack_solve_algo=7
Completes commit db0cf1b8ea from PR #1616.
2018-06-08 10:29:53 +02:00
Johannes Pfeifer db0cf1b8ea Add unit tests for perfect foresight simulations with exogenous leads and lags
Closes #1616
2018-06-07 20:46:30 +02:00
Sébastien Villemot 79484607a7 Fix various issues with stack_solve_algo=7 and lags on exogenous > 1
Complete the fix started in 8913791ff0.

Change the test case to prevent regressions.
2018-06-07 16:14:02 +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) 6d6f850a49 Test the value of oo_.deterministic_simulation.status in tests/deterministic_simulations/* 2017-03-20 16:27:13 +01:00
Houtan Bastani 38f36091a9 test suite: increase timeout option for downloading files to 30 seconds 2017-03-08 12:30:58 +01:00
Johannes Pfeifer d5a6f132b5 unit tests: remove more unused exogenous variables 2017-01-10 19:58:44 +01:00
Johannes Pfeifer c5c465d675 Remove unused exogenous variables from unit tests 2017-01-08 19:00:04 +01:00
Johannes Pfeifer 6c9a08d7e2 Further adjust tolerance of Octave unit tests 2016-12-28 19:30:24 +01:00
Johannes Pfeifer 3fc011a1b2 Adjust unit test for stack_solve_algo=7 to actually trigger different algorithms 2016-08-23 17:28:41 +02:00
Johannes Pfeifer 077917b1f4 dynare_solve: use correct termination criterion with stack_solve_algo=7 2016-08-23 17:28:41 +02:00
Johannes Pfeifer 299d7edf8b Expand stack_solve_algo=7 unit tests to other solve_algo 2016-08-23 17:28:41 +02:00
Michel Juillard 22f49971bc fixing bug in mcp model setup
makes perfect_foresight_problem more efficient
added test case for stack_solve_algo == 7
2016-07-03 10:56:44 +02:00
Stéphane Adjemian (Hermes) 7eed391eb7 Do not display max. abs. error. 2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 8763c29f34 Renamed and changed integration test for sim1_purely_forward routine.
Check the results against analytical solution. Also added a new
integration test (ar1.mod).
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 02c71eb270 Renamed and changed integration test for sim1_purely_backward routine.
Compare the solution returned by sim1_purely_backward with the true solution.
2016-05-24 17:26:06 +02:00
Stéphane Adjemian (Charybdis) 0abb9dc6f9 Added integration test.
Comparison of the solutions for the endogenous variables in perfect
foresight models with stack_solve_algo equal to 0 and 6 (LBJ, legacy
algorithm).
2016-05-24 17:26:06 +02:00
Johannes Pfeifer d84bf3e107 Add unit tests for perfect foresight to detect issues with histval 2016-03-23 20:15:57 +01:00
Michel Juillard 066c79f46a test case for previous commit 2016-03-07 21:51:45 +01:00
Houtan Bastani 779e59cf02 test suite: add missing deletion of downloaded binaries 2015-08-03 08:52:12 +02:00
Michel Juillard e5d431919c fixing one more test case for deterministic simulations and leads lags
on more than one period
2015-07-29 16:36:13 +02:00
Michel Juillard 0cccceff86 fixed test cases for deterministic simulations with histval and leads
and lags on more than one period: All variables different from zero
must be declared in histval. The reference simulation has one lag
because of k(-1).
2015-07-29 16:12:53 +02:00