CDF external function problem

Hi,
I am using the logncdf(x,j,k) function to attach values to a variable in my code.
The problem is that checking the simulation values my variable takes variables less than 0 and greater than 1 which is impossible for a CDF.

Any ideas why this is happening?

Best,
Stelios

I presume you are talking about stochastic simulations, i.e. stoch_simul. These simulation rely on perturbation techniques, i.e. approximating any nonlinear function by a polynomial. Even if your nonlinear function is bounded, that boundedness will not be preserved when being approximated. Is that what you experience?

Hi Johannes,

That’s exactly what I am talking about. Is there any rule of thumb or common solution to this problem (e.g. change of the parameter values)?
If I get a probability of e.g. -2, it just makes intuitively no sense.

Best,
Stelios

No, there is nothing you can do about this if your model and the shock processes are correctly specified. If you get so big deviations from what is theoretically feasible, it tells you the solution method you use is too inaccurate. Note, however that this statement relies on the shock processes being specified correctly. One percent is 0.01, not 1 in the shocks block.

Yes I know. It somehow becomes better if I reduce quite a lot the standard deviations, in order to keep the probabilities in the [0,1] bound.
Thank you!