Page 1 of 1

three consecutive values

Posted: Wed Mar 04, 2020 4:28 pm
by bahri
Hi,

I want to set "fluctuated price1" to be "1" as long as "randomized prices" are not zero in three-consecutive time.
(otherwise set "fluctuated price1" to be "0" )

What shall I do?

I attach the model.

Re: three consecutive values

Posted: Wed Mar 04, 2020 4:37 pm
by Administrator
I don't understand what you want to do.

Do you want to take a random sample and make it last for a certain amount of time?

Re: three consecutive values

Posted: Wed Mar 04, 2020 4:51 pm
by tomfid
If you want to test for price = 0, that event is incredibly unlikely, even if the mean of the distribution is 0, and three in a row will probably never happen, even if you run the model for years. Your Normal distribution is truncated at 1, and in any case 0 is 14 standard deviations below the mean, so it will definitely never happen.

However, if you change the distribution and the test so that there's some likelihood of price<=0, you could count those instances with a stock:
count price 0.mdl
(2.31 KiB) Downloaded 168 times

Re: three consecutive values

Posted: Tue Mar 10, 2020 9:32 am
by bahri
Great!.
Thanks Tom.
Cheers,
Bahri