Does anyone know of a data source for the dates on which contracts expired in the past? Alternatively, does anyone know the rules for when each contract expires (3rd thursday of the month, etc.) I'm specifically interested in the info for the softs markets, but the more the better.
If you have the EOD datas, the end of the datas is the the contract expiry ! Don't forget that sometimes you can't trade near the end of the contracT. Otherwise you can find current expiry rules on exchange website. For past expiry rules, look at datas.
For the US: Monthly options expire on the 3rd Friday of the month. If that Friday it is an exchange holiday, then it is the day before, ie. Thursday. Weekly options expire on each Friday. There are also a few which expire on different days, I think Wednesday. Each exchange has usually expiration and holiday calenders for the current and next year available on their website. Past expirations can be calculated using the above rules.
I should have been more clear, I was referring to futures contracts not options contracts. My specific situation is that my data stream is a continuous futures contract, which is every front month contract stitched together. Every contract is represented in full, from the last day of trading on the previous contract until the last day of trading on the current contract, and there is no back adjustment done. I'm looking to back adjust the data myself, but I need to know the specific dates on which to apply my roll method. I suppose I could look for gaps in the data, but that's not a fool proof way to do it.
I did the same and it was a mistake. I made the the adjustement using change in open interest. Better to go on quandl and use directly future by future datas.
I'm getting my data from quandl currently, using their (free) continuous contracts. Also, the expiration rules for each contract can be found on the ICE's website. For example, the last trading day for Coffee C contracts is 8 business days prior to the last business day of each contract month. I don't know how far back these rules extend, but I'm hoping long enough to be of use.