Instead of checking everything in one mod file, this commit separates the checks into individual mod files that test:
- whether the translation from matched_moments works
- whether the duplicate moments are found
- whether GMM and SMM both work with different estimated_params blocks.
wip
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)
Partially addresses issue #1680:
- unconditional welfare resorts to dynare++ simulation tools, which shall be updated very soon
TO DO:
- implement a function computing kth-order approximation of simulated moments of y
Contains improvements, in order to recover as much as possible static unobserved (filtered, smoothed, updated, k-step ahead), Variance, State_uncertainty, k-step ahead variances trying to map lagged states onto current ones using pinv(T). This has exceptions (namely lagged shocks which are ONLY used to recover static NON observed variables). this exception is also trapped.
For such extensions we can only recover smoothed variables starting from d+1. Variances CANNOT be recovered for such variables (the smoother gives ZERO.)
In its output, the MEX was returning values for all endogenous variables, but
it was used in a context where only the variables from oo_.dr.restrict_var_list
were expected (as is done with local_state_space_iteration_2 MEX).
This commit fixes this discrepancy, and also fixes the test that was checking
that both MEX are returning the same output.
Closes: #1768
Rename histval_initval_file/ramst_data.mod to ramst_data_generate.mod.
Otherwise, there is a conflict between the +ramst_data folder and the generated
ramst_data.m.
Similarily, rename shock_decomposition/shock_decomposition_backward.mod to
shock_decomposition/shock_decomp_backward.mod (otherwise it conflicts with
matlab/shock_decomposition_backward.m).