Dear all,

I am trying to solve a problem with a constraint on one variable “bstar” as postive with upper bound (say 0.1). I attempt to use either the function of exp() or abs() whenever “bstar” appears, and also add an equation “exp(b)+bstar=0.1” to attain such end yet find that “bstar” can be much larger than 0.1 in my stochastic simulation. I cannot figure out why it occurs. How can I deal with it? I really appreciate your help. Thanks a lot!

example1.mod (1.37 KB)

Hi,

Without looking at your mod file, I guess that you are simulating the model with the **stoch_simul** command. In this case Dynare computes a Taylor approximation around the deterministic steady state. Hence all the nonlinear equations defining the model are replaced (I assume a first order approximation) by tangents computed at the steady state. For instance, assuming variable X has steady state level equal to zero, exp(X) is replaced by 1+X. exp(X) takes values between zero and plus infinity but its linear approximation can take values between minus infinity and plus infinity… If you want to impose some inequality constraints on endogenous variables the **stoch_simul** command should not be used. You can use instead the **extended_path** command (see the manual).

Best,

Stéphane.