FB-005: per-day context fields are actually per period [trap]
还没有人认领这个 Issue。
评估
调研方向
Read context.py around lines 97 and 218, then trace how tick dates and period-level fields are built and exposed to strategies and trades. Check the existing context tests for day boundaries; done means per-day tick index and date are available on ctx, and the affected docstrings describe their actual scope.
由索引模型根据 Issue 内容生成。
描述
Severity: trap · Source: BUGS_FASTBT.md (2026-10-09)
ctx.tick_index,total_ticks("today's clock",context.py:218),is_last_tickandticks_remainingspan the whole period. A "first tick of the day" check (tick_index == 0) fires only on the period's first date.ctx.trade_date,strategy.trade_dateand everytrade.trade_dateare the period's first date.DayStartContext.get_spot()("first available tick of the day",context.py:97) returns the period's first bar.
Workaround: derive the date from the tick and keep your own per-day index.
Fix: add ctx.day_tick_index and ctx.date, and correct the docstrings.
- 主要语言
- Python
- 星标
- 28
- 派生
- 17
- 平均合并
- 8 小时 50 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
uberdeveloper/fastbt 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 48/100
uberdeveloper/fastbt#31 ·
-
bug
难度 4/5 3-5 天 新手友好度 52/100
uberdeveloper/fastbt#30 ·
-
bug
难度 4/5 3-5 天 新手友好度 48/100
uberdeveloper/fastbt#28 ·
-
FB-008: close_trade mixes price and tick; stale exits are silent (zero-P&L fallback) [silent-wrong]未关闭bug
难度 3/5 1-2 天 新手友好度 70/100
uberdeveloper/fastbt#27 ·
-
bug
难度 3/5 1-2 天 新手友好度 55/100
uberdeveloper/fastbt#26 ·
查看 uberdeveloper/fastbt 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
lidofinance/diffyscan#239 ·
维护者通常 1 天内回复
-
area: tools documentation good first issue ready for a contributor
难度 2/5 1-3 小时 新手友好度 82/100
eyalgolan/statecraft-israel#873 · 1 条评论 ·
维护者通常 1 天内回复
-
GET rooms API returns 500 due to nonexistent Room.is_active attribute可能已有人在做 @Mars-60 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 5 天内回复
-
Harmony OPeNDAP SubSetter (HOSS) Geographic production rssmif16d 7 XYZ_PROV
难度 2/5 1-3 小时 新手友好度 62/100
nasa/harmony-autotester#341 ·