endval

endval — specifies terminal values for deterministic simulations

Synopsis

endval ;
VARIABLE_NAME = EXPRESSION ; ...

end ;

Description

The endval block makes only sense in a determistic model, and serves two purposes.

First, it sets the terminal conditions for all the periods succeeding the last simulation period.

Second, it provides initial guess values at all the 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 endval block (even though, theoretically, initial conditions are only necessary for forward variables). If some exogenous variables are not mentionned in the endval block, a zero value is assumed.

Note that if the endval 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 endval block, and using the values declared for the endogenous as initial guess values for the non-linear solver. An endval block followed by steady is formally equivalent to an endval block with the same values for the exogenous, and with the associated steady state values for the endogenous.

Example

var c k;
varexo x;
...
initval;
c = 1.2;
k = 12;
x = 1;
end;

steady;

endval;
c = 2;
k = 20;
x = 2;
end;

steady;

The initial equilibrium is computed by steady for x=1, and the terminal one, for x=2.