how to load stock list into strategy
I have a dictionary of stock list which is generated outside the strategy,
the list looks like:
My question is how I can load the dictionary into strategy so that I can use buy order to buy them?
thanks a lot
First you will need to load all data feeds for all stocks into
bt. You may want to parse your dictionary and compile this list of all stocks and then load data feeds into
Then every time you do your calculations in the
next()to issue buy order you need to check if the stock is included in your original stock_list_# on that date.