Exante futures fees do not scale with contract quantity

Đang mở Phù hợp với người mới
#10,187 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
88/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ệ
csharp
Lĩnh vực
backend

Hướng nghiên cứu

Đọc Common/Orders/Fees/ExanteFeeModel.cs, tập trung vào nhánh SecurityType.Future, rồi so sánh hành vi của nhánh này với cấu hình hiện có InteractiveBrokersFeeModelTests.USAFutureFee. Bổ sung kiểm thử hồi quy cho một và nhiều hợp đồng theo cả hai chiều lệnh, sau đó chạy các kiểm thử mô hình phí có liên quan. Công việc hoàn tất khi phí hợp đồng tương lai thay đổi theo giá trị tuyệt đối của số lượng, trong khi mức phí hiện có trên mỗi hợp đồng và hành vi tính phí không liên quan vẫn giữ nguyên.

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

Mô tả

priority:p2

Problem

ExanteFeeModel.GetOrderFee returns a constant 1.5 USD for every futures order, without multiplying by the absolute contract quantity (Common/Orders/Fees/ExanteFeeModel.cs, SecurityType.Future branch). Multi-contract orders therefore have the same commission as a single contract.

This behavior is present on master and is independent of #10180's Forex fee-currency fix.

Reproduction

Built and ran a standalone .NET 10 program using the existing fee model and a CME ES future. Calling GetOrderFee with market orders produced:

Order quantity Returned fee At the model's existing USD 1.50-per-contract rate
1 USD 1.50 USD 1.50
10 USD 1.50 USD 15.00
-10 USD 1.50 USD 15.00

A test can use the same Future setup as InteractiveBrokersFeeModelTests.USAFutureFee and replace the fee-model call with:

var fee = new ExanteFeeModel().GetOrderFee(new OrderFeeParameters(
    security, new MarketOrder(security.Symbol, 10, time)));
Assert.AreEqual(Currencies.USD, fee.Value.Currency);
Assert.AreEqual(15m, fee.Value.Amount); // Actual: 1.5m

The provider's cost-and-charges disclosure, Example 8, explicitly states: “Fee per trade is calculated as US DOLLARS per contract.” Its futures page lists starting rates by exchange. This report concerns quantity scaling, not changing the modeled rate schedule.

Fix requirements

Scale the existing futures commission by absolute contract quantity, with regression coverage for a single contract, multiple contracts, and both order directions. Keep unrelated Forex/equity behavior unchanged.

Priority P2: limited to multi-contract futures orders using this fee model; single-contract orders are unaffected. Evidence of broader usage and materially wrong backtest results would justify raising it.

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

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.