[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RT] The moon cycle - how strong?



PureBytes Links

Trading Reference Links

> D> I'd be more inclined
> D> to look at days before or after options expiration as the real
> D> trigger for these somewhat close to monthly cycles.
> 
> Good idea. Got a date algorithm to share?

Omega's Next3rdFriday(date) function isn't the cleanest code but it
returns the number of *calendar* days until the next expiration. If you
want to roll your own variations on the theme, the general conditions
for expiration day are:

  dayofweek(date) = 5
  and dayofmonth(date) <= 21
  and dayofmonth(date) >= 15

If you want to limit it to triple witch, you need to add:

  and mod(month(date),3) = 0

-- 
  Dennis

To unsubscribe from this group, send an email to:
realtraders-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/