In the documentation
def handle_data(context, data):
price_history = history(bar_count=30, frequency='1d', field='price')
my_sid_series = price_history[context.my_sid]
ema_result = talib.EMA(my_sid_series)
record(ema=ema_result[-1])
what i do not understand is why need to do
my_sid_series = price_history[context.my_sid]
Since I thought the price_history == my_sid_series as there's only one stock here
Any help appreciated.