Skip to content

Performance regression: multi-symbol minute strategy severely slowed since v17894 (auto-subscription of indicators/consolidators) #9587

Description

@AlexCatarino

Performance regression: multi-symbol minute strategy severely slowed since v17894 (auto-subscription of indicators/consolidators)

Description

LEAN version 17894 (released 2026-07-02) introduced the following change:

"Registering indicators and consolidators now automatically subscribes symbols, fixing the error for previously unsubscribed symbols."

We are seeing reports of severe backtest performance regression for complex multi-symbol minute-resolution Python strategies beginning on 2026-07-02. Simple or single-symbol strategies are not affected; multi-symbol strategies with many indicators/consolidators — particularly those that reference market-context symbols (sector ETFs, volatility products, etc.) beyond the core trading symbols — are running orders of magnitude slower than before the v17894 change.

Observed pattern

  • Before v17894: Affected algorithms complete full backtests in minutes
  • After v17894: Same algorithms run 7% completion in over an hour; some are killed before finishing
  • Not affected: Simple single-symbol or small (≤15 symbol) minute strategies with explicit subscriptions only

Hypothesis

In complex multi-symbol strategies, indicators and/or consolidators are commonly registered against reference symbols (e.g., market regime / volatility indicators using VXX, SOXL, XLK, SMH, SPY, etc.) that were not explicitly added as traded subscriptions. Under the pre-v17894 behaviour, this may have raised warnings but did not create a subscription. Under v17894, the auto-subscription now silently creates full minute-resolution subscriptions for every such symbol, potentially multiplying the total subscription count several-fold and causing major per-bar overhead.

Steps to reproduce

  1. Use a Python multi-symbol minute strategy that registers indicators or consolidators against market-context symbols not explicitly added via self.add_equity() / self.add_equity() calls in initialize().
  2. Run the same backtest on LEAN v17893 (or earlier) vs. v17894.
  3. Compare backtest runtime.

Expected behaviour

Auto-subscription of symbols via indicator/consolidator registration should not introduce significant performance regression compared to prior behaviour. If this is intentional new behaviour, there should be either (a) a way to opt out of auto-subscription for performance-sensitive algorithms, or (b) documentation guiding users to explicitly subscribe all symbols before registering indicators against them.

Environment

  • LEAN version: 17894
  • Language: Python
  • Resolution: Minute
  • Backtest node: B2-8 cloud

Reference

Intercom conversation: 215474948389505

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions