Skip to content

Charge SPXW options the SPXW fee in WebullFeeModel - #9923

Closed
Amadeus-22 wants to merge 1 commit into
QuantConnect:masterfrom
Amadeus-22:bug-9922-webull-spxw-fee
Closed

Amadeus-22 wants to merge 1 commit into
QuantConnect:masterfrom
Amadeus-22:bug-9922-webull-spxw-fee

Conversation

@Amadeus-22

Copy link
Copy Markdown

Description

WebullFeeModel picks the index option fee tier from the option ticker (Symbol.ID.Symbol) instead of the underlying, as InteractiveBrokersFeeModel does.

Related Issue

Closes #9922

Motivation and Context

A real SPXW contract has the SPX index as its underlying, so the "SPXW" case was never reached and SPXW fills were charged the SPX fee ($0.07 more per contract). VIXW, NDXP and XSP now also resolve by their own ticker; VIXW and NDXP fees are unchanged since they share their pair's rates.

Requires Documentation Change

No.

How Has This Been Tested?

GetOrderFeeSpxwOptionOnSpxIndex builds an SPXW option on the SPX index (the test helper takes an optional option ticker). It fails on master (1.07 instead of 1.00, 4.64 instead of 4.36) and passes with the fix. All *FeeModelTests pass (452).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description>

🤖 Generated with Claude Code

Pick the index option fee tier from the option ticker instead of the
underlying, which is SPX for SPXW contracts.

Closes QuantConnect#9922

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@arhancanli

Copy link
Copy Markdown

Checked this against the fee model. security.Symbol.Underlying.Value is "SPX" for an SPXW option, so the case "SPXW" branch in GetIndexOptionExchangeFee was unreachable and SPXW orders were charged the SPX tier (0.57/0.66 instead of 0.50/0.59). Symbol.ID.Symbol is the option ticker, so the same change also routes VIXW and NDXP to their own cases; those share fees with VIX and NDX, so nothing else moves.

The new test numbers check out against the constants: 0.50 + 0.50 = 1.00 for one contract under $1, and (0.50 + 0.59) x 4 = 4.36 at $2.00. One suggestion: add an SPX-ticker case beside it, so a regression in either direction is caught.

@Amadeus-22

Copy link
Copy Markdown
Author

Thanks for checking the numbers and catching the VIXW/NDXP routing too. The SPX-ticker side is already covered by the existing GetOrderFeeSpxPriceTierReturnsCorrectFee cases (SPX at $0.50 and $1.50), so together with the new SPXW-on-SPX test both directions are pinned.

@jaredbroad

Copy link
Copy Markdown
Member

Closing for now but transfering work to the issue comment for review: #9922 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebullFeeModel charges SPXW options the SPX exchange fee

3 participants