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.
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)
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.
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
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).
perfect foresight model simulation.
Using a linearized version of the SW model we check that the
linear_approximation option does not affect the results.
Try to reduce the size of the nonlinear system of equations by skipping the (last) periods for wich the residuals are
already (almost) zero. The number of periods is not constant during the Newton, the effective number of periods for
each iteration of the Newton is available in oo_.deterministic_simulation.vperiods.