initval

initval — specifies numerical starting values for finding the steady state and/or initial values for simulations

Synopsis

initval ;
VARIABLE_NAME = EXPRESSION ; ...
end ;

Description

The initval block serves two purposes: declaring the initial (and possibly terminal) conditions in a simulation exercise, and providing guess values for non-linear solvers.

In a deterministic (i.e. perfect foresight) model

First, it provides the initial conditions for all the endogenous and exogenous variables at all the periods preceeding the first simulation period (unless some of these initial values are modified by histval).

Second, in the absence of an endval block, it sets the terminal conditions for all the periods succeeding the last simulation period.

Third, in the absence of an endval block, it provides initial guess values at all simulation dates for the non-linear solver implemented in simul.

For this last reason, it necessary to provide values for all the endogenous variables in an initval block (even though, theoretically, initial conditions are only necessary for lagged variables). If some exogenous variables are not mentionned in the initval block, a zero value is assumed.

Note that if the initval block is immediately followed by a steady command, its semantics is changed. The steady command will compute the steady state of the model for all the endogenous variables, assuming that exogenous variables are kept constant to the value declared in the initval block, and using the values declared for the endogenous as initial guess values for the non-linear solver. An initval block followed by steady is formally equivalent to an initval block with the same values for the exogenous, and with the associated steady state values for the endogenous.

In a stochastic model

The main purpose of initval is to provide initial guess values for the non-linear solver in the steady state computation. Note that if the initval block is not followed by steady, the steady state computation will still be triggered by subsequent commands (stoch_simul, estimation...).

It is not necessary to declare 0 as initial value for exogenous stochastic variables, since it is the only possible value.

This steady state will be used as the initial condition at all the periods preceeding the first simulation period for the two possible types of simulations in stochastic mode:

  • in stoch_simul, if the simul or periods options are specified

  • in forecast (in this case, note that it is still possible to modify some of these initial values with histval)

Example

initval;
c = 1.2;
k = 12;
x = 1;
end;

steady;