Page 1 of 1

CDF external function problem

PostPosted: Fri Jun 09, 2017 5:19 pm
by st348
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

Re: CDF external function problem

PostPosted: Fri Jun 09, 2017 5:34 pm
by jpfeifer
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?

Re: CDF external function problem

PostPosted: Fri Jun 09, 2017 7:43 pm
by st348
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

Re: CDF external function problem

PostPosted: Sun Jun 11, 2017 8:13 am
by jpfeifer
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.

Re: CDF external function problem

PostPosted: Mon Jun 12, 2017 11:23 am
by st348
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!