AlgoSeekFuturesProcessor duplicates the last tick on final flush
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 ToolBox/AlgoSeekFuturesConverter/AlgoSeekFuturesProcessor.cs 开始,重点查看第 133 行附近的 tick 分辨率设置,以及第 211–213 行附近的 FlushBuffer。追踪 IdentityDataConsolidator<Tick> 如何写入每个 tick,以及最终 flush 如何处理 WorkingData。完成标准是:复现代码在 tick 分辨率下为每个输入 tick 写入一行,同时最终 flush 仍会在聚合分辨率下写入未完成的 bar。
由索引模型根据 Issue 内容生成。
描述
Problem
ToolBox/AlgoSeekFuturesConverter/AlgoSeekFuturesProcessor.cs writes the last tick of each contract and tick type twice when converting at tick resolution.
At Resolution.Tick the processor uses IdentityDataConsolidator<Tick> (line 133). Its Update raises DataConsolidated for every tick, which writes the line, and also keeps the tick as WorkingData. FlushBuffer(frontier, finalFlush: true) then writes WorkingData again (lines 211-213), so the file ends with a duplicate of its last row.
Reproduction
var date = new DateTime(2020, 4, 22);
var symbol = Symbol.CreateFuture("CL", Market.NYMEX, new DateTime(2020, 5, 19));
var processor = new AlgoSeekFuturesProcessor(symbol, date, TickType.Trade, Resolution.Tick, outputDirectory);
processor.Process(new Tick { Symbol = symbol, Time = date.AddHours(10), TickType = TickType.Trade, Value = 20m, Quantity = 1 });
processor.FlushBuffer(DateTime.MaxValue, true);
// the generated tick file holds 2 identical rows instead of 1
What a fix must achieve
Each input tick is written once at tick resolution, including the last one, while the final flush still writes the unfinished bar at aggregated resolutions. Suggestion only: skip the WorkingData write when the resolution is Tick.
- 主要语言
- C#
- 星标
- 22.5k
- 派生
- 5.4k
- 平均合并
- 13 小时 11 分钟
- 30 天内合并 PR
- 104
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
QuantConnect/Lean 的其他 Issue
-
priority:p2
难度 2/5 1-3 小时 新手友好度 82/100
QuantConnect/Lean#10191 · 1 条评论 ·
维护者通常 1 天内回复
-
priority:p2
难度 2/5 1-3 小时 新手友好度 85/100
QuantConnect/Lean#10189 ·
维护者通常 1 天内回复
-
priority:p2
难度 2/5 1-3 小时 新手友好度 88/100
QuantConnect/Lean#10187 ·
维护者通常 1 天内回复
-
priority:p2
难度 2/5 1-3 小时 新手友好度 78/100
QuantConnect/Lean#10175 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
QuantConnect/Lean#10082 ·
维护者通常 1 天内回复
查看 QuantConnect/Lean 的全部 Issue
相似的 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
area/backend type/bug
难度 2/5 1-3 小时 新手友好度 72/100
umbraco/Umbraco-CMS#24668 · 1 条评论 ·
维护者通常 1 天内回复
-
Pri3
难度 2/5 1-3 小时 新手友好度 72/100
MicrosoftDocs/windows-dev-docs#6205 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
area-ai untriaged
难度 2/5 1-3 小时 新手友好度 78/100
dotnet/extensions#7956 ·
维护者通常 1 天内回复