Market hours: no late open after CME full-day holidays (2019-12-25, 2020-01-01, 2022-12-26, 2023-01-02), so the 18:00 ET reopening session is dropped

オープン 初心者向け
#10,236 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp, json

調査の方向性

Data/market-hours/market-hours-database.json から始め、Future-cme-NQ と Future-cme-MNQ のエントリを見つけ、次にこれらの休日付を共有する他の CME ルートを見つけてください。それらを 2025-01-20 の lateOpens エントリと比較してください。MarketHoursDatabaseJsonConverter が holidays と lateOpens をどのようにマージするかを読み、18:00 New York / 17:00 Chicago の新しい再開エントリが受け入れられるようにしてください。完了とは、4 つの日付がもはや ClosedAllDay ではなく、issue の history probe が 18:00-24:00 ET のバーを返すことです。

索引モデルが issue の本文から書いたものです。

説明

Expected Behavior

On a CME Group full-day holiday after which Globex reopens at 17:00 CT (18:00 ET) for the next trade date, the market-hours database should give the futures entries a late open at that time, as Future-cme-MNQ and Future-cme-NQ already do for 1/20/2025 (lateOpens 18:00, New York). LEAN then serves the reopening session the store holds.

Actual Behavior

Future-cme-[*] lists these dates under holidays, and Future-cme-NQ / Future-cme-MNQ carry no early close or late open on them, so MarketHoursDatabaseJsonConverter adds each one to the entry's holidays and the whole exchange day resolves ClosedAllDay. History and the data feed then drop the 18:00-24:00 ET reopening session, although the store has it (dataTimeZone: UTC; the bars are 23:00 UTC onward in the holiday's own file and 00:00-05:00 UTC in the next day's file):

date future/cme/minute/nq/<date>_trade.zip session in the file
2019-12-25 60 bars from 23:00 UTC (18:00 ET)
2020-01-01 70 bars from 23:00 UTC
2022-12-26 63 bars from 23:00 UTC
2023-01-02 64 bars from 23:00 UTC

future/cme/minute/mnq/20230102_trade.zip is the same (60 bars from 23:00 UTC). A member reported that a minute request for MNQ over 2023-01-02 18:00-24:00 ET returns no bars while 2023-01-03 00:00 ET onward returns data, and that the exchange hours show 2023-01-02 closed.

Checked on Data/market-hours/market-hours-database.json at master adac927f6 for NQ and MNQ only; other CME Group roots with a Globex reopening on these dates are likely affected the same way.

Potential Solution

Add lateOpens entries for the reopening on these dates (18:00 for the New York entries, 17:00 for the Chicago ones) on the affected futures entries, so the converter treats them as trading days for the evening session while expiry rules still skip them as bank holidays.

Reproducing the Problem

from AlgorithmImports import *

class LateOpenProbe(QCAlgorithm):
    def initialize(self):
        self.set_start_date(2023, 1, 3)
        self.set_end_date(2023, 1, 3)
        future = self.add_future(Futures.Indices.MICRO_NASDAQ_100_E_MINI, Resolution.MINUTE, extended_market_hours=True, fill_forward=False)
        history = self.history(future.symbol, datetime(2023, 1, 2, 18), datetime(2023, 1, 3, 0, 15), Resolution.MINUTE)
        self.log(f"bars 2023-01-02 18:00 to 2023-01-03 00:15 ET: {len(history)}")
        hours = future.exchange.hours
        self.log(f"2023-01-02 open: {hours.is_date_open(datetime(2023, 1, 2), True)}")

System Information

LEAN master adac927f6.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
主要言語
C#
スター
22.6k
フォーク
5.4k
平均マージ
11時間 27分
マージ済み PR(30日)
106

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

QuantConnect/Lean のほかの issue

QuantConnect/Lean の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。