Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
The sid(id) method takes one parameter.
    sids = [24105, 25392, 20928, 22918,  8644, 21266, 10268,  7148,  7918,  
       33604,  7728, 28049, 20284, 23709,  8306, 11361, 17988, 33239,  
       23687, 19909,  3950, 11710, 26350, 27529,  8516,  7367, 19185,  
         405,  6925, 26439,  6489,  1703, 12615,  5413,  2105,  6018,  
        4803, 11999, 26410,  6897, 20539, 23499,   987,   209, 32121,  
        8166,  8288, 25806,  6624, 21736,  4435,   523, 24489,  1833,  
        4621,  5621, 26781, 21754, 23019,  1103]  
    context.sids = [sid(x) for x in sids]  

Is there any way to make this work? It seems to be trying to pre-compile this or something...

1 response

That method doesn't work as you need to call [sid(24105), sid(25392)...etc]

Something to do with magic data retrieval they can't be created dynamically like that.

I have had success using the tickers rather than sids using the symbols function as follows:

context.stocks = symbols('GOOG','AAPL')