Wolverine, RBI and TDAmeritrade fee models charge no fees
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
Research direction
Open Common/Orders/Fees/WolverineFeeModel.cs, RBIFeeModel.cs and TDAmeritradeFeeModel.cs and compare GetOrderFee against the base FeeModel.GetOrderFee signature to see why the methods hide rather than override. Add override to each, then fix the unsupported-security-type message in Common/Messages/Messages.Orders.Fees.cs to print the value instead of nameof(securityType). Build and run the existing fee model tests to confirm the $0.005/share and $0.65/contract amounts and that the CS0114 warnings are gone.
Written by the indexing model from the issue text.
Description
Expected Behavior
Orders placed with WolverineBrokerageModel or RBIBrokerageModel are charged $0.005 per share by default, and option orders placed with TDAmeritradeBrokerageModel are charged $0.65 per contract, as WolverineFeeModel, RBIFeeModel and TDAmeritradeFeeModel describe.
Actual Behavior
Every order is charged 0 USD. The three fee models declare GetOrderFee without the override keyword, so they hide FeeModel.GetOrderFee instead of overriding it (compiler warning CS0114). Lean calls fee models through IFeeModel, which dispatches to the base FeeModel.GetOrderFee and returns 0 USD.
Potential Solution
Add override to GetOrderFee in Common/Orders/Fees/WolverineFeeModel.cs, RBIFeeModel.cs and TDAmeritradeFeeModel.cs. The TDAmeritrade unsupported security type message in Common/Messages/Messages.Orders.Fees.cs also prints nameof(securityType) instead of the value.
Reproducing the Problem
var security = /* SPY equity security */;
var order = new MarketOrder(security.Symbol, 1000, DateTime.UtcNow);
IFeeModel feeModel = new WolverineBrokerageModel().GetFeeModel(security);
var fee = feeModel.GetOrderFee(new OrderFeeParameters(security, order));
// fee.Value.Amount is 0, expected 5 (1000 shares x $0.005)
The same happens with RBIBrokerageModel (expected 5) and with TDAmeritradeBrokerageModel for 10 option contracts (expected 6.5).
System Information
Ubuntu x86_64, .NET SDK 10.0.403, master at 22404ea28b8d3f3c9eb74d6ed9f0444426f8e417.
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
masterbranch - I have confirmed that this is not a duplicate issue by searching issues
- I have provided detailed steps to reproduce the issue
- Dominant language
- C#
- Stars
- 22.3k
- Forks
- 5.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 52
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QuantConnect/Lean
-
library-request
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
QuantConnect/Lean#10034 ·
Maintainers usually reply within 1 day
-
`LeanData.TryParsePath` fails on an absolute universe file pathPossibly taken @FeiyangP claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QuantConnect/Lean#10005 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
QuantConnect/Lean#9965 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
QuantConnect/Lean#9955 ·
Maintainers usually reply within 1 day
-
WebullFeeModel charges SPXW options the SPX exchange feeMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
QuantConnect/Lean#9922 · 2 comments ·
Maintainers usually reply within 1 day
All issues in QuantConnect/Lean
Similar issues
-
The Recommended preset turns on Import Uno DSP, which only works with the Material themePossibly taken @agneszitte claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
unoplatform/uno.templates#2388 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
eyalgolan/statecraft-israel#2732 ·
Maintainers usually reply within 1 day
-
要トリアージ
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
kind/chore status/draft
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Altinn/altinn-events#1158 ·
Maintainers usually reply within 1 day
-
S: Untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Trauma-Station/Trauma-Station#5285 ·
Maintainers usually reply within 1 day