Hi,
I'm fetching a CSV and have a column that indicate whether to buy or not.
any clue on how i can use this indicator, of for that matter, any data that is inside the CSV?
thanks,
Z
Hi,
I'm fetching a CSV and have a column that indicate whether to buy or not.
any clue on how i can use this indicator, of for that matter, any data that is inside the CSV?
thanks,
Z
As this forum seems slow (or maybe the purpose of it isn't Q&A, I don't know) I'll attempt to answer although being new to it myself:
There is a good example for what you're trying to do in the help section. Search for "Using Fetcher to create a custom universe". If you fetch the csv as it is done there, you will get a "universe" (i.e. a list of stocks) from the CSV. All those stocks and the information for them will be available to you in the handle_data part of the script through "data".
Example: Lets say you got a column in your csv called "indicator" then you could do:
for stock in data:
if data[stock]['indicator'] == 1:
print "buy!"
Remember that one of your columns has to be "symbol" and contain a list of tickers. That's how they're added to data (as part of your universe).