Bounding a variable value


I have a question, is it possible to bound the value of a variable within certain interval? For example, I have a model where there is a credibility stock that depends on the deviation from public debt to certain target, but credibility has to live in the [0,1] interval, but in dynamic the parameter often goes out from this interval, I’d like to know if this is possible (I’m running a stochastic simulation to get the policy functions but then I use simult_ function, where I’m able to see that the variable goes out from the interval).


See e.g.