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

FB-007: _handle_cycle_done silently drops still-open legs after on_exit [silent-wrong]

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend, data

調査の方向性

Read strategy.py around _handle_cycle_done at line 401, then trace how on_exit closes legs and how closed_trades records P&L. Check existing tests for cycle completion and exit handling. Done means any legs still open after on_exit are handled with a CYCLE_DROP reason or an explicit error, with no lost P&L or unlogged positions.

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

説明

bug

Severity: silent-wrong · Source: BUGS_FASTBT.md (2026-10-09)

After on_exit, _handle_cycle_done runs self.positions.clear() (strategy.py:401). A custom on_exit that leaves any leg open (partial close, a hedge kept on purpose, a close that failed) makes that leg vanish. It is in neither positions nor closed_trades, so its P&L is lost and nothing is logged.

Workaround: on_exit must close everything.
Fix: close the remaining legs with a reason such as CYCLE_DROP, or raise.

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

環境構築

はじめの一歩

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

uberdeveloper/fastbt のほかの issue

uberdeveloper/fastbt の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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