Continuous Futures Options, Paper Concurrency, OnOrderEvent

These are the LEAN release notes for versions 17319 to 17329. We improved API ergonomics with implicit Security-to-Symbol conversion, added OnOrderEvent to IExecutionModel with algorithm context, and exposed order IDs for closed trades. We enhanced data and modeling with optional consolidator start times, daily OHLCV tracking via Security.Session, and introduced ShortMarginInterestRateModel.

We expanded brokerage capabilities by enabling MOO/MOC for CFDs on Interactive Brokers, adding ComboLimit orders for TastyTrade, validating brokerage-specific MOO submission windows, and enabling concurrency in live PaperBrokerage. We broadened derivatives support by generating option chains from continuous futures, removing normalization requirements for futures options, and correcting multiple FOP expirations.

We strengthened reliability and performance by skipping splits during live warmup, lazily scheduling timers, modernizing dependencies, optimizing session tracking, fixing backtesting streaming portfolio margin and daily request start times, aligning async submit/fill behavior, and enhancing margin charts. We also added VBaseSignalExport for tamper-proof signal stamping.

Thanks dacrowlah for skipping split processing during live warmup to prevent exceptions, and vb-vlb for VBaseSignalExport with ValidityBase stamping enabling tamper-proof blockchain-verifiable signals. Outstanding!

Features

  • Shipped (#9034): Add Consolidator Optional Start time: We added optional start time parameter to consolidators, improving initialization control; implemented new unit tests.
  • Shipped (#9032): Add implicit conversion from security to symbol: We added implicit Security-to-Symbol conversion plus regression algorithms, streamlining API usage, validated via new and existing tests.
  • Shipped (#9028): Add ShortMarginInterestRateModel: We added ShortMarginInterestRateModel, example, and regression tests to validate behavior and improve short margin interest modeling.
  • Shipped (#9025): Remove CFD IB MOC and MOO restriction: We enabled CFDs MOO/MOC orders on Interactive Brokers by removing restrictions, validated via existing and live trading tests.
  • Shipped (#9022): Support Future Options for Continuous Futures: We added support to generate option chains from continuous futures, even without filters; regression-tested for reliability.
  • Shipped (#9003): Feature: support 'ComboLimit' Order type in TastyTrade and refactor 'BrokerageTests': We support ComboLimit orders in TastyTrade and refactor BrokerageTests to enable generic combo-order tests while maintaining existing coverage.
  • Shipped (#8996): Add 'algorithm' as parameter to 'IExecutionModel.OnOrderEvent': We add algorithm parameter to IExecutionModel.OnOrderEvent, enabling context-aware execution handling; verified with regression algorithms.
  • Shipped (#8989): Expose order ids related to statistics closed trades: We expose order IDs for statistics closed trades via TradeBuilder.ClosedTrades[*].OrderIds, enabling precise trade attribution; unit-tested.
  • Shipped (#8987): Add 'OnOrderEvent' method to 'IExecutionModel': We add OnOrderEvent to IExecutionModel, enabling execution models to override and handle all OrderEvent callbacks.
  • Shipped (#8972): Enable concurrency for live paper brokerage: We enabled concurrency in live PaperBrokerage and updated BacktestingTransactionHandler for compatibility with concurrent live trading.
  • Shipped (#8969): Feat: Validation for 'Market On Open' Submission Time: We now validate MOO submission times per brokerage (ET): IB 4:00PM–9:28AM, Alpaca 7:00PM–9:28AM, TradeStation 6:00–9:29AM, with TS warnings.
  • Shipped (#8954): Add VBaseSignalExport: We added VBaseSignalExport implementing BaseSignalExport, integrating ValidityBase REST stamping for tamper-proof, blockchain-verifiable signals; tested with Collective2PortfolioSignalExportDemonstrationAlgorithm.
  • Shipped (#8922): Track OHLCV for Current Trading Day: We add Security.Session for all securities, exposing two-bar daily OHLCV+OpenInterest; midnight consolidation shifts current to previous and creates new.

Bug Fixes

  • Fixed issue (#9030): We skip split processing during live warmup, preventing exceptions.
  • Fixed issue (#9026): We fix negative index bug; accelerate symbol properties tests.
  • Fixed issue (#9024): We prevent null or empty backtest names during updates.
  • Fixed issue (#9012): We fix backtesting streaming portfolio margin calculation.
  • Fixed issue (#9006): We correct 6N, LBS and older ES/EMD/YM/NQ FOP expirations.
  • Fixed issue (#9002): We remove normalization requirement when adding futures options contracts.
  • Fixed issue (#9001): Exclude extended-hours-only days from period history date calculation.
  • Fixed issue (#8998): We corrected futures options expirations and added IB-validated tests.
  • Fixed issue (#8995): We correct soybean meal/oil FOP expirations; add tests, IB-verified.
  • Fixed issue (#8979): We align backtests to same-step submit/fill for async orders.
  • Fixed issue (#8975): We fix daily request start times with non-trading handling.
  • Fixed issue (#8974): We corrected live-paper transaction handler configuration regression.

Updates

  • Fixed issue (#9027): We lazily schedule timers in RateGate, TimeMonitor, ObjectStore.
  • Fixed issue (#9023): We exclude LangChain from syntax checks, addressing minor issues.
  • Fixed issue (#9020): We modernize dependencies and add tests for improved reliability.
  • Fixed issue (#9011): We enhance margin charts: stacked area, zoomed bars, 40-series.
  • Fixed issue (#9008): We removed unnecessary Python model constructors, simplifying framework stubs.
  • Fixed issue (#8990): We optimize session tracking: unsubscribe handlers, reuse market hours.