I have the following code:
def tickers():
return (
"YELP",
"P",
"BBRY",
"MBLY",
"GPRO",
"INVN",
"FEYE",
"TWTR",
"CRM",
"AMZN",
"BIDU",
"JD",
"QIHU",
"WB",
"YOKU",
"BITA",
"JRJC",
"INO",
"ISIS",
"TKMR",
"JNUG",
"JDST"
)
def initialize(context):
context.stocks = symbols(*tickers())
def handle_data(context, data):
for stock in context.stocks:
# Do something with stock
Which actually contains two errors according to the Q framework. The first is there is no sid(...) referenced, so it will not Build. Second is (after I put in a random reference to a sid to avoid the first error) the call to symbols(...) fails with "KeyError: 'YELP'". Can anyone help with this?