Single-date universe download also caches the next trading day

Đang mở
#10,085 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
data

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C#
Star
22.5k
Fork
5.4k
Merge trung bình
22 giờ 6 phút
Pull request đã merge (30 ngày)
81

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của QuantConnect/Lean

Tất cả issue của QuantConnect/Lean

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.