Took this thread and the example algo from Seong Lee here:
https://www.quantopian.com/posts/looping-to-compare-all-stocks-to-pick-highest-gainer
And I've gotten through updating the "set universe" to a pipeline but needing some help with the syntax error on line 106:
104 for stock in data:
105 context.daily_stocks[stock] = (data.current([stock],price)/(context.daily_stocks[stock])
106 winner = max(context.daily_stocks.values())
I was thinking that this would have to become:
winner = max(data.current(context.daily_stocks,price)
but that is not working. I would appreciate the help as I feel I'm misinterpreting how the "context." is used.
Thanks in advance!