shocks

shocks — specifies shocks on deterministic or stochastic exogenous variables

Synopsis

shocks ;
[ [ (1) DETERMINISTIC SHOCK STATEMENT | (2) STOCHASTIC SHOCK STATEMENT ] ...]

end ; (1) var VARIABLE_NAME; periods INTEGER [:INTEGER] [[,] INTEGER [:INTEGER]...]; values EXPRESSION [[,] EXPRESSION...]; (2) var VARIABLE_NAME; stderr EXPRESSION; | var VARIABLE_NAME = EXPRESSION; | var VARIABLE_NAME, VARIABLE_NAME = EXPRESSION; | corr VARIABLE_NAME, VARIABLE_NAME = EXPRESSION;

Description

In deterministic context

For deterministic simulations, the shocks block specifies temporary changes in the value of an exogenous variables. For permanent shocks, use an endval block.

When specifying shocks on several periods, the values EXPRESSION must return either a scalar value common to all periods with a shock or a column vector with as many elements as there are periods in the periods statement just before it.

Example

shocks;
var e;
periods 1;
values 0.5;
var u;
periods 4:5;
values 0;
var v;
periods 4 5 6;
values 0;
var u;
periods 4  5   6;
values  1 1.1 0.9;
end;
    

In stochastic context

For stochastic simulations, the shocks block specifies the non zero elements of the covariance matrix of the shocks.

Example

shocks;
var e = 0.000081;
var u; stderr 0.009;
corr e, u = 0.8;
var v, w = 2;
end;
    

See also

Sigma_e

Mixing determininistic and stochastic shocks

It is possible to mix deterministic and stochastic shocks to build models where agents know from the start of the simulation about future exogenous changes. In that case stoch_simul will compute the rational expectation solution adding future information to the state space (nothing is shown in the output of stoch_simul) and forecast will compute a simulation conditional on initial conditions and future information.

Example

varexo_det tau;
varexo e;

...

shocks;
var e; stderr 0.01;
var tau;
periods 1:9;
values -0.15;
end;

stoch_simul(irf=0);

forecast;