Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

FB-002: multi-day ticks break every time comparison; ctx.time is wrong [silent-wrong]

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

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

評価

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

調査の方向性

Start in context.py at advance() around line 203, then read the composite key construction in engine.py:171 and context.py:63. Check how multi-day ticks set ctx.time and compare the behavior across day and expiry modes. Done means time comparisons and the can_enter example work in both modes, with ctx.clock and ctx.date consistent; add or run focused tests for those cases.

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

説明

bug

Severity: silent-wrong · Source: BUGS_FASTBT.md (2026-10-09; consolidation B04 2026-10-11)

Composite keys are f"{d} {time_key}" (engine.py:171, context.py:63), and d already carries 00:00:00, so a tick is "2025-07-04 00:00:00 09:20:59". advance() splits on the first space (context.py:203), so ctx.date is right but ctx.time == "00:00:00 09:20:59".

Any code written for day mode then misbehaves without an error:

  • tick >= "15:20:00" is always True → exit_time exit fires on the tick right after entry
  • "09:20:00" <= tick < "09:30:00" is never True → strategy never enters
  • The can_enter docstring example (strategy.py:451) is this exact bug

Seen in this repo: positionals/iron_condor.py, credit_spread.py, credit_spread_v2.py compare ctx.time in period="expiry" mode and never enter.

Workaround: read the clock as str(tick)[-8:] and the date as str(tick)[:10]; use exit_time=None.
Fix: build keys from d[:10]; add ctx.clock ("HH:MM:SS") and ctx.date that behave the same in every mode.

主要言語
Python
スター
28
フォーク
17
平均マージ
8時間 50分
マージ済み PR(30日)
2

環境構築

はじめの一歩

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

uberdeveloper/fastbt のほかの issue

uberdeveloper/fastbt の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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