Back to Community
Delisted / Acquired Stocks

How are delisted and acquired stocks managed for historical data purposes?

6 responses

Our database includes all stocks that have traded since January 1, 2002. For example, you can include Lehman Brothers (LEH) in your stock universe during a a backtest from 2002-2014, but it will drop out of your universe after 2008 when the company went bankrupt. This prevents survivorship bias in your algo. For more details, take a look here for more details on our data sources.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

I was wondering also - how are mergers, stock-in-kind dividends and spin-offs handled in backtests and live trading?

The information is available in our help doc under the data sources and dividends sections:
https://www.quantopian.com/help#overview-datasources
https://www.quantopian.com/help#ide-dividends

In brief, the data in backtesting is adjusted for splits and mergers, but not for dividends. The dividends are added as cash to your portfolio and are not automatically reinvested. However, the benchmark, which by default is SPY, will reinvest the dividends during the backtest. You can also set your own custom benchmark.

In live trading, we will get the updated positions on splits and mergers from IB. And the dividends are automatically reinvested in your algorithm.

I meant stock-in-kind dividends, where the dividend is paid as additional fractional shares of the stock (or a different stock, like a warrant). Ditto for mergers, if you own a stock that gets merged into another company, how does this affect the data one gets in the callback during backtesting, forward testing and live trading?

The answer is, it depends. Most corporate events are handled in a price-adjusted manner. IAC's spin off, for instance, is handled in Quantopian by adjusting the price. Yahoo handles it differently. In general, if we can model it in a reasonable way by adjusting the price, we do.

Where our data isn't likely to work well is when the spinoff is to something that isn't cash or tradeable, or when the merger takes the stock to a foreign exchange, or things like that. In those cases we're going to correctly show that the stock isn't trading any more, but we will continue to price it at whatever the last traded value is. That's what we do with delisted stocks, too. The downside to that is that the price in reality is updating on the OTC, but since we don't have OTC data, that doesn't make it back to Quantopian.

The recent Google share/governance change is an example where there isn't a great precedent for what to do. We ended up building some custom code to handle the Google split.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

How to get data for delisted stocks when the symbols are replaced? For example BOX is currently used for Box Inc but used to be Seacube Container Leasing Ltd 2013 and prior. Normally the previously used symbol would be renamed as BOX1 or similar but I cannot find anything of the sort.