I have generated a list of stocks inside the research environment and I'm having trouble using it in an algorithm. For example, at the moment I have a list of pairs of sids that I want to convert into Equity objects in order to pass to data.history . Inside initialize(context) I have:
context.stock_pairs = [[1900, 5061],
[5061, 13905],
[5061, 14014],
[5061, 14848],
[5061, 18529],
[5061, 18870],
[5061, 19725],
[5061, 20239],
[18529, 18870],
[18529, 19725],
[18529, 25555]]
stock_pairs = [[sid(pair[0]), sid(pair[1])] for pair in context.stock_pairs]
...
I have the error:
"The sid(id) method takes one parameter. "
What's going on here?
More generally, if I have a list of equities generated inside research, what's the best way to pass it into the IDE?
Thanks.