RelativeDailyVolume returns zero after the final historical time slot
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
Hướng nghiên cứu
Đọc Indicators/RelativeDailyVolume.cs quanh các dòng 111–138 và theo dõi cách chỉ báo chọn khối lượng tích lũy trong lịch sử cho thời điểm được yêu cầu. Tìm các bài kiểm thử RelativeDailyVolume hiện có và thêm một trường hợp trong đó thời điểm hiện tại nằm sau khung thời gian cuối cùng trong dữ liệu lịch sử; xác minh kết quả sử dụng khối lượng tích lũy mới nhất hiện có và giữ nguyên cách xử lý khoảng trống bên trong được đề cập trong #9629.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
When the current time-of-day is later than every historical time slot, RelativeDailyVolume leaves its fallback denominator at zero and returns zero despite having a nonzero historical cumulative volume.
Source: Indicators/RelativeDailyVolume.cs, lines 111–138.
This is a boundary case distinct from #9629: the existing break fixes selection between historical slots, but no loop iteration assigns a denominator after the final slot. A historical early close followed by a longer trading session can reach this path.
Reproduction
using System;
using QuantConnect;
using QuantConnect.Data.Market;
using QuantConnect.Indicators;
var symbol = new Symbol(SecurityIdentifier.GenerateEquity("SPY", Market.USA, false), "SPY");
var start = new DateTime(2024, 1, 2, 9, 30, 0);
TradeBar Bar(DateTime time, decimal volume) =>
new TradeBar(time, symbol, 9, 10, 9, 10, volume, TimeSpan.FromMinutes(1));
var rdv = new RelativeDailyVolume(1);
rdv.Update(Bar(start, 100));
rdv.Update(Bar(start.AddMinutes(1), 100));
rdv.Update(Bar(start.AddDays(1).AddMinutes(2), 50));
Console.WriteLine($"{rdv.IsReady}: {rdv.Current.Value}");
Executed result: True: 0. Expected: True: 0.25.
The completed historical day has cumulative volumes 100 at 09:30 and 200 at 09:31. At 09:32, the latest historical cumulative volume is still 200, so the ratio is 50 / 200 = 0.25. No historical key is greater than 09:32, and the fallback never assigns that value.
Required result
Use the most recent available historical cumulative volume when the requested time is after the final historical slot. Add a regression test for this boundary without changing the interior-gap behavior covered by #9629.
Priority is low pending evidence of broader impact; this is limited to unmatched times beyond the historical range.
- Ngôn ngữ chính
- C#
- Star
- 22.6k
- Fork
- 5.4k
- Merge trung bình
- 11 giờ 39 phút
- Pull request đã merge (30 ngày)
- 104
Chuẩn bị môi trường
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.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của QuantConnect/Lean
-
priority:p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
QuantConnect/Lean#10216 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority:p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
QuantConnect/Lean#10206 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority:p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
QuantConnect/Lean#10199 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority:p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
QuantConnect/Lean#10197 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
priority:p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
QuantConnect/Lean#10191 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của QuantConnect/Lean
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
dotnet-outdated/dotnet-outdated#871 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage/untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
unoplatform/uno#26676 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
.NET bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[问题] 导出文件时,提示后面还有1243390911步Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
jhaizhou-ops/S2Arm#2177 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area-CodeGen-coreclr untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
dotnet/runtime#138181 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày