Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

FB-008: close_trade mixes price and tick; stale exits are silent (zero-P&L fallback) [silent-wrong]

Đang mở
#27 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
70/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend, data

Hướng nghiên cứu

Start in strategy.py at the cited lines 231 and 245, then trace get_price and the trade fields used by close_trade. Check existing tests for stale prices, fill-forward behavior, and no-price exits. Done means one tick source is used, the exit lag is recorded, and an optional maximum lag is enforced with tests covering the stated cases.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Severity: silent-wrong · Source: BUGS_FASTBT.md (2026-10-09; seen in skill trial 11)

  • The price is read at ctx.tick (strategy.py:231), but the trade is stamped with the tick argument (strategy.py:245). A caller passing a different tick records a price from one time against another.
  • The lag returned by get_price is discarded, so a fill-forward exit of any age is accepted: from yesterday's close, or from a contract with no bars left.
  • With no price at all, the exit price falls back to the entry price (zero P&L) with only a logger.warning.

Observed: on the stale 2025-11-27 monthly gap, the fill-forward and live-only variants exit differently.

Workaround: check the lag before closing; pin the ffill-vs-live exit policy.
Fix: use one tick source; store exit_lag on the trade; add an optional max_exit_lag.

Ngôn ngữ chính
Python
Star
28
Fork
17
Merge trung bình
8 giờ 50 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của uberdeveloper/fastbt

Tất cả issue của uberdeveloper/fastbt

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.