Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Stocks "disappearing" from historic fundamental data in research

Hi,

I've found the following statement in the help:

"Our US equities database includes all stocks and ETFs that traded
since 2002, even ones that are no longer traded. This is very
important because it helps you avoid survivorship bias in your
algorithm. Databases that omit securities that are no longer traded
ignore bankruptcies and other important events, and lead to false
optimism about an algorithm. For example, LEH (Lehman Brothers) is a
security in which your algorithm can trade in 2008, even though the
company no longer exists today; Lehman's bankruptcy was a major event
that affected many algorithms at the time."

But by playing around in the research environment, I found several stocks which simply "vanish" from one day to another.

On example of this are the ADRs of AkzoNobel (AKZOY), which were delisted from Nasdaq on August 27th 2007. I checked this with:

fundamentals = init_fundamentals()  
get_fundamentals(query(fundamentals.company_reference.sid,  
                              fundamentals.company_reference.company_status,  
                              fundamentals.company_reference.short_name)  
                             .filter(fundamentals.company_reference.sid ==  271),  
                             '2007-08-27')  

I get valid information, and the company status is "U". For the next day, I don't get ANY result.
Now shares can be delisted for various reason, but in this case, it was still possible to trade the shares over the counter (see: https://www.akzonobel.com/for-media/media-releases-and-features/akzo-nobel-intends-delist-nasdaq). Also, the company was still listed on euronext.

So it's definitely not appropriate to regard these shares as without value, as would probably be the case for a delisting because of insolvency. To be able to correct for survivorship bias and to adequately treat the delisted shares, we would need to know the reason for the delisting. So far I could not find a way to get this information from the fundamental data. Does anybody know how to do this?

Ideally I would like to be able to set the value to 0 for bankrupt companies and to the (discounted) last traded price for delisted companies for other reasons.

2 responses

Hi Julian,

Quantopian's database includes US equities as long as they are trading on any of the NYSE, NASDAQ, or AMEX. Once they move to OTC trading, they are considered to be delisted in algorithms/research. In backtesting, your algorithm will close out delisted positions (or anything that moves off of one of the 3 supported exchanges) and provide you with the cash equivalent of the position your held, using the last known close price for the equity. Unfortunately, we don't currently support the ability to define custom handling of delistings.

Sorry for the inconvenience.

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.

Thanks for the reply. But since I'm referring to the research environment, allow me one follow up question.
Can I find out if a company went bankrupt in the research environment? That would allow me to treat it correctly.