Today we have launched an important improvement to the backtester: the handling of delisted securities. With the addition of the pipeline API, delisted securities (also known as zombie positions) have become a larger and more frequent problem. This change will improve the execution and accuracy of backtests with large dynamic universes by automatically removing these positions from your portfolio when they are no longer tradable.
How It Works
In backtesting, when a security becomes delisted, the system will exit the position at the last known sale price and return cash to your portfolio. If you are short the stock, we will take the equivalent cash position from your cash balance. No commissions will be charged for the transaction and it will be logged in the Transaction History. The cash out date (or exit date) is 3 days after the end date of the security. This delay is so that we can better manage incorrect delisting dates.
Companies become delisted because they are part of a merger or acquisition, or stop meeting the listing exchange's criteria (e.g. going bankrupt). The same approach will be used for each of these scenarios. For example, if the company goes bankrupt, the last sale price will be very low. Likewise, if the company is acquired, the last sale price should be something similar to the value of the company. While this doesn't correctly simulate every delisting scenario (for example, some stock acquisitions,) the value of the last sale price will be close enough to reality in most situations. It is certainly a better proxy than the previous behavior where the stocks hung out in the portfolio forever.
Nothing changes with IB live trading (real or paper) because delisted securities are handled by IB. Quantopian paper trading previously did not handle these events but with the new changes, will behave the same as backtesting where delisted positions are cashed out 3 days later.