Hi,
Im having an issue with the fetcher_assets
im importing a csv file that looks like this:
Date,symbol,Signal
07.01.2014,AIG,-1
07.02.2014,CBI,1
07.03.2014,FMCC,1
then if i run
fetch_csv('https://dl.dropboxusercontent.com/s....txt?dl=0', date_column = 'Date', date_format = '%m.%d.%Y', post_func=rename_col)
only the columns with the dates and the symbol are getting imported while the signal column isnt (i can see that because i have a preview command in rename_col and the ouput i get is:
sid
dt
2014-07-01 00:00:00+00:00 Equity(239 [AIG])
2014-07-02 00:00:00+00:00 Equity(1287 [CBI])
2014-07-09 00:00:00+00:00 Equity(239 [AIG])
2014-07-10 00:00:00+00:00 Equity(239 [AIG])
2014-07-11 00:00:00+00:00 Equity(239 [AIG])
)
then I have another issue using the fetcher_assets command. If I run:
def before_trading_start(context, data):
"""
Called every day before market open. This is where we get the securities
that made it through the pipeline.
"""
for i in range(0,len(data.fetcher_assets)):
log.info(data.fetcher_assets[i].asset_name)
not only the stocks that should be active on this day according to my list and according to the help file are being returned, but all the stocks that have been 'activated' so far. so this is the log i get:
2014-07-01 before_trading_start:51 INFO AIG
2014-07-02 before_trading_start:51 INFO CBI
2014-07-02 before_trading_start:51 INFO AIG
2014-07-03 before_trading_start:51 INFO CBI
2014-07-03 before_trading_start:51 INFO AIG
even though on the 07/02/2014 (for example) the only stock that should be returned is the CBI
could you give me some pointers?
thank you,
Dario