QuantConnect Lean Keeps Delisted Securities Until Settlement Completes
QuantConnect Lean engine improved its delisted security handling. Previously, securities were removed immediately upon delisting, causing settlement proceeds or
QuantConnect Lean — C#/Python Backtesting & Live Trading Engine · Release 18184: Keep delisted securities until their funds settle (#9877) · 2026-10-15
QuantConnect Lean engine improved its delisted security handling. Previously, securities were removed immediately upon delisting, causing settlement proceeds or pre-delisting sale funds to not settle in cash accounts. Now delisted securities remain in the system until all positions, pending orders, and unsettled funds are cleared, with hourly settlement checks. Delisted securities are also removed from universes and won't be fully deleted if other universe removal states remain pending.
weltiq perspective: Accurate settlement of delisted security funds in backtesting and live trading improves portfolio balance calculations and performance measurement.
Release Notes Excerpt
Keep delisted securities until their funds settle Delisted securities were removed from the active securities as soon as the delisting was handled, so the hourly settlement scan never reached the proceeds of the delisting liquidation, or of a sale right before the delisting, on cash accounts. Delistings now go through the pending removals like any other removal, keeping the security until it's safe to remove it, and pending delisted removals are checked hourly. Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com Remove delisted securities from their universes too Pending delisted removals now complete through RemoveSecurityFromUniverse, like every other pending removal, so the…
Source: https://github.com/QuantConnect/Lean/releases/tag/18184