Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Conflict over multiple securities with the same symbol

Trying an algo with various symbols, error messages occur when a current symbol matches a previous instance (symbol was repurposed).

Since it seems there should never be two securities that use the same symbol (one is always defunct), requesting the default behavior be changed to simply run with the one that is currently trading and ignore the old one. We can automatically steer away from companies that have for example gone out of business and not need to worry that they once existed.

For the rare instance where the user might want to be testing against something in the distant past and no longer valid, an option will remain open to them, in that case they can go thru that process of invoking set_symbol_lookup_date().

This means for example if a user is testing with DAL (Delta Airlines), they are fine if the start date is no earlier than 2007-04-25 when that current symbol came online, and even before that there would simply be no data for DAL. If they go back to before 2006-02-02 when the previous symbol ended there would also simply be no data however they can test using the stale symbol via set_symbol_lookup_date().

Error  There are multiple securities that have used the symbol DAL. You must  
       use set_symbol_lookup_date() before using symbol(). The table below  
       shows when each company traded using the symbol DAL. Learn More

SECURITY                   FIRST TRADED      LAST TRADED  
DELTA AIR LINES INC DEL    1993-01-03        2005-10-11  
DELTA AIR LINES INC        2007-04-25        2014-10-14  
5 responses

Gary, thanks for the thorough feedback. Symbol() was created to make it easier to read code and reference securities in the algorithm. Since trading tickers are reused on exchanges (as you noted) we have a set_symbol_look_up_date so a person can specify which company to use. We didn't automatically filter them out to avoid survivorship bias.

If you prefer, you can use the sid() method to choose a specific company - it will bring up the same dropdown box and it will be easier in this case to choose the company you intended.

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.

[removed by author]

Hi Quantopian experts/staff,

what do we do when the sid() function also returns multiple possibles (sids) for an entered symbol? Use GDX as an example

The sid() method will always refer to a single security. While a symbol (ie ticker) can potentially be re-used and therefore designate multiple securities, the sid is never re-used. It is the unique identifier for a given security. For this reason it's often better to use the SID rather than the symbol - it won't ever be ambiguous.

Using the symbol GDX as an example, since 2002 it has referred to two separate securities

SID:32133 VANECK VECTORS ETF TRUST from 05-22-2006 to current
SID:25426 GOLDMAN SACHS STRUCT PRDS BASKET LKD NTS from 08-01-2003 to 08-02-2004

To ensure one is referring to the desired security use either the sid() method or use the symbol() method but then specify the symbol lookup date.

vaneck_etf = sid(32133)

set_symbol_lookup_date('1-1-2020')  
vaneck_etf = symbol('GDX)

Attached is a notebook to experiment with. One can also see the various asset properties. There's a full list here https://www.quantopian.com/docs/api-reference/asset-api-reference#asset-api-reference

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.

Here's the notebook.