QuantConnect / Lean

Lean Algorithmic Trading Engine by QuantConnect (Python, C#)
https://lean.io
Apache License 2.0
9.64k stars 3.24k forks source link

Future Expiration Does Not Observed Juneteenth 2023 #7164

Closed AlexCatarino closed 1 year ago

AlexCatarino commented 1 year ago

Expected Behavior

The expiration day of EUR (6E) Futures contract for June is 16.

Screen Shot 2023-04-04 at 20 00 47

Actual Behavior

Lean is calculating Jun 19th, 2023:

2023-04-04 09:54:51 [--SECURITIES--] Adding 6E Y9FBS83UF3EP (6E19M23) | 6/19/2023 expiry
2023-04-04 13:20:13 Runtime Error: No security definition has been found for the request. Origin: [Id=2] IBPlaceOrder: 6E19M23 (FUT EUR USD CME  20230619 0  )
2023-04-04 13:20:13 Runtime Error: No security definition has been found for the request. Origin: [Id=2] IBPlaceOrder: 6E19M23 (FUT EUR USD CME  20230619 0  ): StackTrace: System.Exception: No security definition has been found for the request. Origin: [Id=2] IBPlaceOrder: 6E19M23 (FUT EUR USD CME  20230619 0  )

Since the market is closed on Jun 19th, 2023 (Juneteenth), the contract expires on Friday Jun 16th, 2023.

Potential Solution

Add Juneteenth to MHDB holidays for Futures.

Checklist

connorjohnlind commented 1 year ago

Note the [--SECURITIES--] Adding 6E Y9FBS83UF3EP (6E19M23) | 6/19/2023 expiry is from my own personal logs.