# Shocks to bounded variables

Hi!
I am trying to simulate a model in which I put a shock on a bounded variable (more precisely, this variable is a proba and thus bounded btw 0 and 1). Unless I consider small shock variances , the simulated variable is not bounded any more and the simulation generates errors. Considering ‘tricks’ like min, max or arctan in order to keep shocks bounded does not seem to help, because of the linearisation I think.
I would like to know if it is possible to impose bounds on shocks or to simulate finite Markov chains, which could also be helpful in my case.
Thanks for any help.
Francois

Dear François,

The perturbation approach is not able to handle any kind constraint (positivity, probability less than one, …) on the endogenous variables of a DSGE model. If you ‘trick’ dynare with max or min functions you introduce non differentiabilities and the Taylor approximation does not apply anymore. If instead you consider a logistic-like function, the S-shape pattern is lost when the model is linearized (the same if you choose a k-order local approximation).

Dynare simulates the approximated model using gaussian random numbers for the structural innovations. This can be seen at the end of the function simult_.m:

``oo_.exo_simul(:,i_exo_var) = randn(M_.maximum_lag+M_.maximum_lead+options_.periods,nxs)*chol_S;``

Obviously you can truncate these innovations (modifying this matlab function). But a first problem is that the needed truncation should depend on the state of the economy (as a consequence innovations are not strong white noise). A second (more important) problem is that, when solving the model, the expectations are computed using non truncated distribution for the innovations. Consequently the expectations would not be consistent with the effective distribution of the innovations implied by the truncation.

I am not sure to understand how a finite a Markov Chain would help here… What do you have in mind ?

Best,
Stéphane.

Dear Stephane,
Thanks for the answer. I get convinced of the issue after I compared a transformation of the innovation and its linearization.
Regarding the finite Markov chain, it would allow to approximate an AR(1), while keeping the parameter bounded. However, it should also raise analogous issues regarding Dynare.
Francois

Yes the approximation of the AR(1) would raise other issues. The approximation of an autoregressive process by a finite Markov chain is a discretization of a continuous state variable… Perturbation methods do not apply for discrete state variables.

Best, Stéphane.