Back to Community
List Of NASDAQ 100 SIDs To Use In Your Algo

Amritendu Maji and myself have created this list of the NASDAQ 100 SIDs. Please post any corrections here.

P.

    context.nasdaq_100 = [sid(24),    sid(114),   sid(122),   sid(630)  , sid(67),    \  
                          sid(20680), sid(328),   sid(14328), sid(368),   sid(16841), \  
                          sid(9883),  sid(337),   sid(38650), sid(739),   sid(27533), \  
                          sid(3806),  sid(18529), sid(1209),  sid(40207), sid(1419),  \  
                          sid(15101), sid(17632), sid(39095), sid(1637),  sid(1900),  \  
                          sid(32301), sid(18870), sid(14014), sid(25317), sid(36930), \  
                          sid(12652), sid(26111), sid(24819), sid(24482), sid(2618),  \  
                          sid(2663),  sid(27543), sid(27543), sid(2696),  sid(42950), \  
                          sid(20208), sid(2853),  sid(8816),  sid(5530),  sid(3212),  \  
                          sid(9736),  sid(23906), sid(26578), sid(22316), sid(13862), \  
                          sid(3951),  sid(8655),  sid(25339), sid(4246),  sid(43405), \  
                          sid(27357), sid(32046), sid(4485),  sid(43919), sid(4668),  \  
                          sid(8677),  sid(22802), sid(3450),  sid(5061),  sid(5121),  \  
                          sid(5149),  sid(5166),  sid(23709), sid(13905), sid(19926), \  
                          sid(19725), sid(8857),  sid(5767),  sid(5787),  sid(19917), \  
                          sid(6295),  sid(6413),  sid(6546),  sid(20281), sid(6683),  \  
                          sid(26169), sid(6872),  sid(11901), sid(13940), sid(7061),  \  
                          sid(15581), sid(24518), sid(7272),  sid(39840), sid(7671),  \  
                          sid(27872), sid(8017),  sid(38817), sid(8045),  sid(8132),  \  
                          sid(8158),  sid(24124), sid(8344),  sid(8352),  sid(14848)]  
23 responses

Duplicate EXPE corrected to COST

    context.nasdaq_100 = [sid(24),    sid(114),   sid(122),   sid(630)  , sid(67),    \  
                          sid(20680), sid(328),   sid(14328), sid(368),   sid(16841), \  
                          sid(9883),  sid(337),   sid(38650), sid(739),   sid(27533), \  
                          sid(3806),  sid(18529), sid(1209),  sid(40207), sid(1419),  \  
                          sid(15101), sid(17632), sid(39095), sid(1637),  sid(1900),  \  
                          sid(32301), sid(18870), sid(14014), sid(25317), sid(36930), \  
                          sid(12652), sid(26111), sid(24819), sid(24482), sid(2618),  \  
                          sid(2663),  sid(27543), sid(1787) , sid(2696),  sid(42950), \  
                          sid(20208), sid(2853),  sid(8816),  sid(5530),  sid(3212),  \  
                          sid(9736),  sid(23906), sid(26578), sid(22316), sid(13862), \  
                          sid(3951),  sid(8655),  sid(25339), sid(4246),  sid(43405), \  
                          sid(27357), sid(32046), sid(4485),  sid(43919), sid(4668),  \  
                          sid(8677),  sid(22802), sid(3450),  sid(5061),  sid(5121),  \  
                          sid(5149),  sid(5166),  sid(23709), sid(13905), sid(19926), \  
                          sid(19725), sid(8857),  sid(5767),  sid(5787),  sid(19917), \  
                          sid(6295),  sid(6413),  sid(6546),  sid(20281), sid(6683),  \  
                          sid(26169), sid(6872),  sid(11901), sid(13940), sid(7061),  \  
                          sid(15581), sid(24518), sid(7272),  sid(39840), sid(7671),  \  
                          sid(27872), sid(8017),  sid(38817), sid(8045),  sid(8132),  \  
                          sid(8158),  sid(24124), sid(8344),  sid(8352),  sid(14848)]  

Hi,

Code from backtest might help you to debug this. Here is its output:
> 2013-09-04 PRINT extra symbols: CHTR,CMCS,DISC,FOX,GMCR,LBTY,LINT,TSLA
> 2013-09-04 PRINT absent symbols: BMC,CMCSA,DISCA,LBTYA,LIFE,LINTA,NWSA,ORCL

BTW, I've got list of nasdaq 100 symbols from barchart.com this way:

python -c 'import urllib; import re; print sorted(line.split("<")[1].split(">")[-1] for line in re.findall("<a href=\"/quotes/stocks/[A-Z]+\">[A-Z]+</a>", urllib.urlopen("http://www.barchart.com/stocks/nasdaq100.php").read()))'  

Regards,
Ed

Clone Algorithm
30
Loading...
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Put any initialization logic here.  The context object will be passed to
# the other methods in your algorithm.
def initialize(context):
    context.nasdaq_100 = [sid(24),    sid(114),   sid(122),   sid(630)  , sid(67),
                          sid(20680), sid(328),   sid(14328), sid(368),   sid(16841),
                          sid(9883),  sid(337),   sid(38650), sid(739),   sid(27533),
                          sid(3806),  sid(18529), sid(1209),  sid(40207), sid(1419),
                          sid(15101), sid(17632), sid(39095), sid(1637),  sid(1900),
                          sid(32301), sid(18870), sid(14014), sid(25317), sid(36930), 
                          sid(12652), sid(26111), sid(24819), sid(24482), sid(2618),  
                          sid(2663),  sid(27543), sid(1787) , sid(2696),  sid(42950), 
                          sid(20208), sid(2853),  sid(8816),  sid(5530),  sid(3212),  
                          sid(9736),  sid(23906), sid(26578), sid(22316), sid(13862), 
                          sid(3951),  sid(8655),  sid(25339), sid(4246),  sid(43405),  
                          sid(27357), sid(32046), sid(4485),  sid(43919), sid(4668),  
                          sid(8677),  sid(22802), sid(3450),  sid(5061),  sid(5121),  
                          sid(5149),  sid(5166),  sid(23709), sid(13905), sid(19926), 
                          sid(19725), sid(8857),  sid(5767),  sid(5787),  sid(19917),  
                          sid(6295),  sid(6413),  sid(6546),  sid(20281), sid(6683),  
                          sid(26169), sid(6872),  sid(11901), sid(13940), sid(7061),  
                          sid(15581), sid(24518), sid(7272),  sid(39840), sid(7671),  
                          sid(27872), sid(8017),  sid(38817), sid(8045),  sid(8132),  
                          sid(8158),  sid(24124), sid(8344),  sid(8352),  sid(14848)]  
    context.out = None

def handle_data(context, data):
    if context.out:
        return
    context.out = 'done'
    
    n100 = set(['AAPL', 'ADBE', 'ADI', 'ADP', 'ADSK', 'AKAM', 'ALTR', 'ALXN', 'AMAT', 'AMGN', 'AMZN', 'ATVI', 'AVGO', 'BBBY', 'BIDU', 'BIIB', 'BMC', 'BRCM', 'CA', 'CELG', 'CERN', 'CHKP', 'CHRW', 'CMCSA', 'COST', 'CSCO', 'CTRX', 'CTSH', 'CTXS', 'DELL', 'DISCA', 'DLTR', 'DTV', 'EBAY', 'EQIX', 'ESRX', 'EXPD', 'EXPE', 'FAST', 'FB', 'FFIV', 'FISV', 'FOSL', 'GILD', 'GOLD', 'GOOG', 'GRMN', 'HSIC', 'INTC', 'INTU', 'ISRG', 'KLAC', 'KRFT', 'LBTYA', 'LIFE', 'LINTA', 'LLTC', 'LMCA', 'MAT', 'MCHP', 'MDLZ', 'MNST', 'MSFT', 'MU', 'MXIM', 'MYL', 'NFLX', 'NTAP', 'NUAN', 'NVDA', 'NWSA', 'ORCL', 'ORLY', 'PAYX', 'PCAR', 'PCLN', 'QCOM', 'REGN', 'ROST', 'SBAC', 'SBUX', 'SHLD', 'SIAL', 'SIRI', 'SNDK', 'SPLS', 'SRCL', 'STX', 'SYMC', 'TXN', 'VIAB', 'VOD', 'VRSK', 'VRTX', 'WDC', 'WFM', 'WYNN', 'XLNX', 'XRAY', 'YHOO'])
    tickers = set([sid.symbol for sid in context.nasdaq_100])
    if n100 != tickers:
        for title, symbols in [('extra', tickers.difference(n100)),
                                ('absent', n100.difference(tickers))]:
            if symbols:
                 print '%s symbols: %s' % (title, ','.join(sorted(symbols)))

This backtest was created using an older version of the backtester. Please re-run this backtest to see results using the latest backtester. Learn more about the recent changes.
There was a runtime error.

Thanks for sharing, Peter. Mighty useful.

Would be fun to do a pairtrading strategy with this that exploits any arbitrage between the individual stocks and the NASDAQ 100. I believe this is discussed in Ernie Chan's new book.

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.

Hello Ed,

I used the list here. I don't understand why DISCA et al are in the Quantopian data as DISC. BMC, LIFE, NWSA and ORCL are not on the list at www.nasdaq.com

P.

Hello Thomas,

This is all I could find in the new book:

High-Frequency Index Arbitrage
High-frequency traders have been able to exploit two deficiencies in the
intraday computations of the indices and arbitrage between the futures
tracking these indices versus the component stocks. The first deficiency is
that many major indices including Dow Jones, S&P, Nasdaq, and Russell
are computed using only the primary exchange trades data (see Chapter 1
on primary versus consolidated stock prices), which represent less than
30 percent of all shares traded on those stocks (Arnuk and Saluzzi, 2012). The
second deficiency is that the index is updated only once every few seconds.
Both deficiencies lead to a discrepancy between the true, most up-to-date
market value of a basket of component stocks and the index value itself. As a
result, the index future value can be expected to lag the instantaneous market
value of the stocks. If the index future value is higher than the instantaneous
market value, we can simply short the future and vice versa. Where can we
get this true, instantaneous market value of the stocks? We would, of course,
need to subscribe to the direct data feed of every U.S. stock exchange and
ECN (and not the SIAC feed) and monitor the trade prices for all the stocks
in the index with millisecond latency in all these venues. Nobody said highfrequency
trading is easy!

P.

Hi Peter,

That's weird that list on that site is incorrect. Now I took list from nasdaq.com. Here it is:

python -c "import urllib; import re; print sorted(line.split('\"')[1] for line in re.findall('\[\"[A-Z]+\",', urllib.urlopen('http://www.nasdaq.com/quotes/nasdaq-100-stocks.aspx').read()))"  
['AAPL', 'ADBE', 'ADI', 'ADP', 'ADSK', 'AKAM', 'ALTR', 'ALXN', 'AMAT', 'AMGN', 'AMZN', 'ATVI', 'AVGO', 'BBBY', 'BIDU', 'BIIB', 'BRCM', 'CA', 'CELG', 'CERN', 'CHKP', 'CHRW', 'CHTR', 'CMCSA', 'COST', 'CSCO', 'CTRX', 'CTSH', 'CTXS', 'DELL', 'DISCA', 'DLTR', 'DTV', 'EBAY', 'EQIX', 'ESRX', 'EXPD', 'EXPE', 'FAST', 'FB', 'FFIV', 'FISV', 'FOSL', 'FOXA', 'GILD', 'GMCR', 'GOLD', 'GOOG', 'GRMN', 'HSIC', 'INTC', 'INTU', 'ISRG', 'KLAC', 'KRFT', 'LBTYA', 'LINTA', 'LLTC', 'LMCA', 'MAT', 'MCHP', 'MDLZ', 'MNST', 'MSFT', 'MU', 'MXIM', 'MYL', 'NFLX', 'NTAP', 'NUAN', 'NVDA', 'ORLY', 'PAYX', 'PCAR', 'PCLN', 'QCOM', 'REGN', 'ROST', 'SBAC', 'SBUX', 'SHLD', 'SIAL', 'SIRI', 'SNDK', 'SPLS', 'SRCL', 'STX', 'SYMC', 'TSLA', 'TXN', 'VIAB', 'VOD', 'VRSK', 'VRTX', 'WDC', 'WFM', 'WYNN', 'XLNX', 'XRAY', 'YHOO']

And added sids to the output:

extra symbols: CMCS/1637,DISC/36930,FOX/5530,LBTY/27357,LINT/32046
absent symbols: CMCSA,DISCA,FOXA,LBTYA,LINTA

Does it make sense for you?

Regards,
Ed

Hello Ed,

I think FOXA is the 'A' shares traded on NASDAQ and in the NASDAQ-100. FOX is 'B' shares traded on NASDAQ but not in the NASDAQ-100. Does that sound right? FOXA is in the Quantopian data but CMCSA, DISCA, LBTYA and LINTA are not.

P.

Hello Peter & Ed,

How'd this turn out? Were you able to establish a list of Nasdaq 100 sids? If so, would you mind posting the corrected list?

Thanks,

Grant

Hello Grant,

This is updated to replace FOX with FOXA:

context.nasdaq_100 = [sid(24),    sid(114),   sid(122),   sid(630)  , sid(67),    \  
                          sid(20680), sid(328),   sid(14328), sid(368),   sid(16841), \  
                          sid(9883),  sid(337),   sid(38650), sid(739),   sid(27533), \  
                          sid(3806),  sid(18529), sid(1209),  sid(40207), sid(1419),  \  
                          sid(15101), sid(17632), sid(39095), sid(1637),  sid(1900),  \  
                          sid(32301), sid(18870), sid(14014), sid(25317), sid(36930), \  
                          sid(12652), sid(26111), sid(24819), sid(24482), sid(2618),  \  
                          sid(2663),  sid(27543), sid(1787) , sid(2696),  sid(42950), \  
                          sid(20208), sid(2853),  sid(8816),  sid(12213),  sid(3212),  \  
                          sid(9736),  sid(23906), sid(26578), sid(22316), sid(13862), \  
                          sid(3951),  sid(8655),  sid(25339), sid(4246),  sid(43405), \  
                          sid(27357), sid(32046), sid(4485),  sid(43919), sid(4668),  \  
                          sid(8677),  sid(22802), sid(3450),  sid(5061),  sid(5121),  \  
                          sid(5149),  sid(5166),  sid(23709), sid(13905), sid(19926), \  
                          sid(19725), sid(8857),  sid(5767),  sid(5787),  sid(19917), \  
                          sid(6295),  sid(6413),  sid(6546),  sid(20281), sid(6683),  \  
                          sid(26169), sid(6872),  sid(11901), sid(13940), sid(7061),  \  
                          sid(15581), sid(24518), sid(7272),  sid(39840), sid(7671),  \  
                          sid(27872), sid(8017),  sid(38817), sid(8045),  sid(8132),  \  
                          sid(8158),  sid(24124), sid(8344),  sid(8352),  sid(14848)]  

Note 1: NASDAQ 100 list taken from http://www.nasdaq.com/quotes/nasdaq-100-stocks.aspx on 06-Oct-2013.

Note 2: FOXA is in the data as SID(12213) from 1994-11-2 to 2013-10-7 and also as SID(44933) from 2013-6-19 to 2013-6-28 so I used SID(12213).

Note 3: CMCSA, DISCA, LBTYA and LINTA do not seem to be in the data so I have used CMCS, DISC, LBTY and LINT respectively.

P.

Thanks...Grant

I think you want sid(1406) for CELG, not sid(40207). sid(40207) is actually CELGZ. We have a data problem where they are both reporting at CELG that I haven't yet resolved.

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.

@Peter -- what new book is that quote from? sounds like get rich quick scheme! or maybe it should be get rich fast scheme! ;-) any pointers on the best/most affordable direct data feeds for US stocks? where do i go to get them?

Hello Miguel,

It's from 'Algorithmic Trading: Winning Strategies and Their Rationale - Ernest P. Chan (2013)'.

I can't recommend a data feed. It's interesting to look here https://secure.quotestream.com/ where you can customise a monthly feed. You soon see that $17.95 pcm (delayed US Level I prices) becomes $80 pcm or more (real-time US/UK Level I and Level II prices).

P.

This is updated to use SID(1406) for CELG. If you copy/paste this into the IDE you need to delete any whitespace to the right of the '\' as this causes an error.

context.nasdaq_100 =     [sid(24),    sid(114),   sid(122),   sid(630),   sid(67),    \  
                          sid(20680), sid(328),   sid(14328), sid(368),   sid(16841), \  
                          sid(9883),  sid(337),   sid(38650), sid(739),   sid(27533), \  
                          sid(3806),  sid(18529), sid(1209),  sid(1406),  sid(1419),  \  
                          sid(15101), sid(17632), sid(39095), sid(1637),  sid(1900),  \  
                          sid(32301), sid(18870), sid(14014), sid(25317), sid(36930), \  
                          sid(12652), sid(26111), sid(24819), sid(24482), sid(2618),  \  
                          sid(2663),  sid(27543), sid(1787) , sid(2696),  sid(42950), \  
                          sid(20208), sid(2853),  sid(8816),  sid(12213), sid(3212),  \  
                          sid(9736),  sid(23906), sid(26578), sid(22316), sid(13862), \  
                          sid(3951),  sid(8655),  sid(25339), sid(4246),  sid(43405), \  
                          sid(27357), sid(32046), sid(4485),  sid(43919), sid(4668),  \  
                          sid(8677),  sid(22802), sid(3450),  sid(5061),  sid(5121),  \  
                          sid(5149),  sid(5166),  sid(23709), sid(13905), sid(19926), \  
                          sid(19725), sid(8857),  sid(5767),  sid(5787),  sid(19917), \  
                          sid(6295),  sid(6413),  sid(6546),  sid(20281), sid(6683),  \  
                          sid(26169), sid(6872),  sid(11901), sid(13940), sid(7061),  \  
                          sid(15581), sid(24518), sid(7272),  sid(39840), sid(7671),  \  
                          sid(27872), sid(8017),  sid(38817), sid(8045),  sid(8132),  \  
                          sid(8158),  sid(24124), sid(8344),  sid(8352),  sid(14848)]  

Note 1: NASDAQ 100 list taken from http://www.nasdaq.com/quotes/nasdaq-100-stocks.aspx on 06-Oct-2013.

Note 2: FOXA is in the data as SID(12213) from 1994-11-2 to 2013-10-7 and also as SID(44933) from 2013-6-19 to 2013-6-28 so SID(12213) has been used.

Note 3: CMCSA, DISCA, LBTYA and LINTA do not seem to be in the data so I have used CMCS, DISC, LBTY and LINT respectively.

Note 4: CELG matches both SID(1406) and SID(40207). SID(1406) is correct and has been used here.

P.

Just a gentle reminder that including any such fixed list of recent index components introduces a survivorship bias to any backtests.

Just a gentle reminder that including any such fixed list of recent index components introduces a survivorship bias to any backtests.

Thanks Simon,

In this Wikipedia entry, there is a clear explanation of survivorship bias as it applies to finance:

http://en.wikipedia.org/wiki/Survivorship_bias

It sounds like the upcoming changes to fetcher would be a way to manage this, assuming one could obtain a list of the historical index constituents on a daily basis.

Grant

I haven't been following fetcher, but yes - one needs to fetch the index constituents as-of the rebalancing dates and that would solve the problem.

Hello Simon/Grant,

I agree that this list should be used with caution but in the absence of any such 'universes' maintained by Quantopian I thought it might be helpful. I'm tired of seeing SID(24) which is survivorship-bias³. Which is why I often use SID(2) in silent protest.

P.

All quite true. I know the Bloomberg API can export as-of index constituents, I wonder if there are any free web services that do the same. It's probably not allowed for S&P indices, but NASDAQ ones might be available.

Other lists of stocks: https://www.quantopian.com/posts/nyse-and-nasdaq-stock-ticker-symbols-list-ready-to-roll At around 200 each group, if timeouts, try halving, and I think timeouts are load-related / transitory.

One reason I dont like QQQ is because Larry E. moved ORCL to NYSE.
I worry it may add some invalidation-dust to QQQ backtests.

Thanks! :)