Futures Monthly Expiration
Author: rmandel00
Creation Date: 4/11/2016 10:56 AM
profile picture

rmandel00

#1
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

profile picture

Cone

#2
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).
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).