Hi Guys:
I am interested in creating some functions around the /VX futures term structure. This daily data is available from Quandl and I have imported into WLP. Is there a function, fundamantal or simple way of coding the monthly rollover of these futures. I would like to calculate the number of days remaining between today and the current future expiration date and the next expiration date, one month later. The definition of the monthly expiration is as follows:
Expiration Date: The Wednesday that is 30 days prior to the third Friday of the calendar month immediately following the month in which the contract expires.
Thanks for your help,
Rich Man
Size:
Color:
Strike F11 and find
NextOptionExpiryDate(). This will give you the 3rd Friday of the month. Adjust as required with Date functions. e.g., Date[bar].Date.AddDays(-2).
As for days between, see
DaysBetweenDates() and
TradingDaysBetweenDates() in the wiki (requires Community.Components).
Size:
Color: