Which context are we talking about? In OSR, this is not easily possible yet.
In estimation, you can use the estimated_params-block to set upper and lower bound for your parameters or specify a prior that does not allow the parameters to be bigger than certain bounds.
you need to use the current unstable version (to be Dynare 4.5) with the attached files. In osr_optimizer_function_wrapper.m you can manually change the bounds (and the optimizer to use). It currently requires a Matlab Toolbox as I am using fmincon as an example. Note also that there is a bug in the current unstable that will soon be fixed. You need to replace in dynare_minimize_objective.m the calls to
After reading your code, I’m wondering whether osr now works with second order approximation to the model’s policy function? (I’m asking because of the “order=2” in the osr command).
No, because a first order approximation already delivers second-order accuracy in the unconditional moments, which osr minimizes. Going to second order would yield fourth-order accuracy.