Single-date universe download also caches the next trading day

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

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

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

評価

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

調査の方向性

Read Engine/DataFeeds/DownloaderDataProvider.cs around lines 175-176 and Common/DataUniverseDownloaderGetParameters.cs around line 81, then follow the universe branch in Fetch and UniverseExtensions.RunUniverseDownloader. Check existing tests for DownloaderDataProvider and add coverage for a single requested date and the completed-day cutoff; done means no next-day file is written and incomplete current-day data is not cached.

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

説明

Problem

Fetching a single dated universe file downloads and writes the following trading day's universe too. If that following day is still in progress, partial data can be retained as a completed, date-based universe file and is not downloaded again.

Reproduction and observations

Use DownloaderDataProvider(IDataDownloader) with a deterministic downloader returning an underlying AAPL daily TradeBar and one AAPL option-contract daily TradeBar for each requested trade date, and empty enumerations for quote/open-interest requests. Configure Data as the relative data folder and create Data/option/usa/universes/aapl first.

  • Fetching Data/option/usa/universes/aapl/20241112.csv issues eight requests: four for November 12 and four for November 13. It can write both dated files even though only November 12 was requested.
  • Repeating this with yesterday's universe while today is a trading day writes today's universe file as well. Fetching today's file afterward makes zero new downloader requests:
requested-date=2026-11-10; extra-date-file=True; extra-fetch-new-requests=0

The latter check was run during the November 11 US session. A provider returning the current day's available bars can therefore leave an incomplete universe cached. This reproduces using previously supported relative paths, independently of absolute-path parsing.

Cause
  • Engine/DataFeeds/DownloaderDataProvider.cs:175-176 supplies processingDate through processingDate.AddDays(1) for a single universe-file request.
  • Common/DataUniverseDownloaderGetParameters.cs:81 uses Time.EachTradeableDay, whose end date is inclusive (Common/Time.cs:547-555).
  • The universe branch does not use the completed-data cutoff computed earlier in Fetch.
  • UniverseExtensions.RunUniverseDownloader writes a separate file for every enumerated date.
  • DownloaderDataProvider.NeedToDownload does not refresh existing date-based files.
Required outcome

A single-file universe request must not generate an unsolicited next-day file or cache an incomplete trading day's data. Cover both the requested date range and subsequent cache behavior. A suggestion is to pass the single processing date as both ends of the inclusive universe range, and enforce the completed-day cutoff for universe files too.

主要言語
C#
スター
22.5k
フォーク
5.4k
平均マージ
22時間 6分
マージ済み PR(30日)
81

環境構築

Codespaces で開く

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

はじめの一歩

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

QuantConnect/Lean のほかの issue

QuantConnect/Lean の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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