MarketOnClose fills are not volume-capped - orders larger than closing volume fill in full

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

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

Hướng nghiên cứu

Start by reproducing the issue with a backtest that submits a MarketOnClose order larger than the closing volume of an equity such as SPY. Then find where the backtest fill logic handles MarketOnClose orders and how it reads closing volume data. Done means an oversized close order is partially filled or raises a warning, with a test covering that case. The expected behaviour is not fully specified, so confirm the intended outcome with maintainers first.

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

Mô tả

Expected Behavior

Market-on-close orders should be capped by the closing volume (or partially fill / warn) so they do not unrealistically fill larger size than actually traded at the close.

Actual Behavior

An order larger than the closing volume fills in full at the close price.

Steps to Reproduce
  1. Use an equity with known closing volume (e.g. SPY or a low-volume stock).
  2. Submit a MarketOnClose order larger than that volume.
  3. Observe that the order fills completely.
Environment
  • Lean version: master / latest
  • Asset class: Equities
  • Mode: Backtest
Additional Context

This makes volume-sensitive strategies unrealistically optimistic.

Ngôn ngữ chính
C#
Star
22.5k
Fork
5.4k
Merge trung bình
22 giờ 6 phút
Pull request đã merge (30 ngày)
81

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 QuantConnect/Lean

Tất cả issue của QuantConnect/Lean

Issue tương tự

Thêm issue về C#

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.