My EuroDollar futures have monday of third week expiration and settlement date from CME exchange how ever Python Quantlib doesn't seem to like it. Anyway I can get away with IMM check?

futures = { ql.Date(14,9,2020): 99.700, ql.Date(14,12,2020): 99.67, ql.Date(15,3,2021): 99.76 }

futuresHelpers = [ ql.FuturesRateHelper(ql.QuoteHandle(futures[d]), d, months, calendar, ql.ModifiedFollowing, True, dayCounter, ql.QuoteHandle(ql.SimpleQuote(0.0)), ql.Futures.IMM) for d in futures.keys() ]

error message:

RuntimeError: September 14th, 2020 is not a valid IMM date


2 Answers 2


IMM dates are actually Wednesdays and not Mondays...

There are several methods to work with IMM dates in the ql.IMM class.

To check if dates are IMM dates, use ql.IMM.isIMMdate(date, mainCycle=True)

In your example:

futures = { ql.Date(14,9,2020): 99.700, ql.Date(14,12,2020): 99.67, ql.Date(15,3,2021): 99.76 }
list(map(ql.IMM.isIMMdate, futures.keys()))

[False, False, False]

You can also check what is the next IMM date:

list(map(ql.IMM.nextDate, futures.keys()))

[Date(16,9,2020), Date(16,12,2020), Date(17,3,2021)]

  • $\begingroup$ Thank you David. My problem is, I have to build curve with futures that expired on monday of thrid week of the month, not Wednesday. FuturerRateHelp on the other hand inforce the IMM day or ASX date both stop me from using the actual date of the future. $\endgroup$ Jun 25, 2020 at 3:20
  • $\begingroup$ Did you find a solution? I'm having the same issue w/ BAX futures $\endgroup$ May 12 at 2:44

Eurodollars futures contracts stop trading on 2 business days (usually a Monday) before the third Wednesday of the expiry month.

BUT that is not the date that the reference 3 month interest rate, 3M USD Libor, starts. That date is actually the third Wednesday itself, which is the IMM date (see contract specification here)

So in your example, liborStartDate (which is "d", the second argument to FuturesRatesHelper() in your example) should be set to 16 Sep 2020, not 14 Sep 2020. This is why you get an error.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.