Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Using Fetcher

Hi all, attempting to import Nasdaq composite data from an externally hosted file. Having issues with recognizing the symbol. It sounds like the symbol in the file must match an existing symbol in Quantopian's database. True?

def initialize(context):  
    # fetch data from a CSV file somewhere on the web.  
    # Note that one of the columns must be named 'symbol' for  
    # the data to be matched to the stock symbol  
    fetch_csv('https://dl.dropboxusercontent.com/u/2895223/nasdaq.csv',  
               date_column = 'date',  
               date_format = '%m/%d/%y')  
    context.stock = symbol('IXIC')  
def handle_data(context, data):  
    if 'close' in data[context.stock]:  
        record(close = data[context.stock]['close'])  

Build fails with

Symbol 'IXIC' was not found. Did you check set_symbol_lookup_date() to confirm the asset traded at this time?

I should mention that context.stock = symbol('IXIC') works in the Research environment when calling the following before the initialize method:

data = Panel({'IXIC': local_csv(  
    'nasdaq.csv',  
    date_column = 'date',  
    use_date_column_as_index = True  
)})