Skip to content

IndexOption applies SPX-style tiered minimum price variation (0.05/0.10) uniformly to XSP, ignoring XSP's uniform $0.01 tick per CBOE spec #9717

Description

@robbart90

Expected Behavior

XSP (Mini-SPX) index options should use a minimum price variation of $0.01
for all price levels, per the CBOE product specification:
https://www.cboe.com/tradable_products/sp_500/mini_spx_options/specifications

"The minimum tick for XSP options is 0.01 ($1.00) for all series."

Actual Behavior

Live orders (limit and stop) for XSP contracts are rounded to $0.05/$0.10
increments instead of $0.01, triggering LEAN's brokerage-precision warning
and producing incorrect order prices.

Concrete examples from live trading logs:

  • Stop order calculated at $1.98 was rounded to $2.00.
  • Limit order price rounded from $0.86 to $0.85

This matches the tiered rule documented for QuantConnect.Securities.IndexOption.
IndexOption.GetMinimumPriceVariation(): "For prices greater than or equal to
$3.00 USD, the minimum price variation is $0.10 USD. For prices less than
$3.00 USD, the minimum price variation is $0.05 USD." This rule is correct
for SPX/SPXW, but appears to be applied uniformly to ALL IndexOption
instances, including XSP, which has a different, uniform $0.01 tick.

Reproducing the Problem

class XspTickSizeBug(QCAlgorithm):
    def initialize(self):
        self.set_start_date(2024, 1, 1)
        self.set_cash(100000)
        self.set_brokerage_model(BrokerageName.INTERACTIVE_BROKERS_BROKERAGE, AccountType.MARGIN)
        index = self.add_index("XSP")
        option = self.add_index_option(index.symbol, "XSP")
        # Submit a live limit/stop order at a price with 2 decimal places
        # that is not a multiple of 0.05 (e.g. 0.86, 1.02, 1.98) and observe
        # the brokerage-precision rounding warning.

Attempted Workarounds (all unsuccessful)

  1. security.set_price_variation_model(CustomModel()) with a custom class
    overriding get_minimum_price_variation to return a fixed 0.01 — no effect,
    rounding to 0.05/0.10 persisted in live testing.
  2. security.set_PriceVariationModel(CustomModel()) (alternate casing) —
    same result.
  3. security.symbol_properties.minimum_price_variation = 0.01 — rejected
    outright by QuantConnect's own type checker as read-only.

Given that a custom PriceVariationModel assigned via the security-level
API does not change the observed behavior, this suggests
IndexOption.GetMinimumPriceVariation() is a hardcoded override on the
IndexOption class itself (reimplemented from Security) rather than
delegating to the pluggable PriceVariationModel, meaning it cannot
currently be corrected from user algorithm code at all.

Potential Solution

Distinguish XSP (and any other index options with a flat, non-tiered tick)
from SPX/SPXW in IndexOption.GetMinimumPriceVariation(), or make this
logic properly respect a user-assigned PriceVariationModel instead of
being hardcoded at the class level.

Environment

LEAN Engine v2.5.0.0.18004, live trading via Interactive Brokers, XSP index
options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions