Hi there, I am currently trying to learn quantopian framework but am having difficulty wrapping my head around the whole thing. There seems to be many resources but lots of them seem to be out of date, for example I really want to backtest a certain futures trading strategy and am trying to familiarise myself with futures syntax of quantopian by reading the lectures, but trying to run one of the example algorithms (https://www.quantopian.com/lectures/example-pairs-trading-on-futures), it actually returns an error:
AttributeError: 'NoneType' object has no attribute 'root_symbol'
USER ALGORITHM:126, in rebalance_pairs
context.current_weights[future_x_contract] = context.long_term_weights[future_x_contract.root_symbol]
I am not too sure how to debug it, I can put a breakpoint on line 126, but it only breaks after it passed certain date and since the whole thing is a giant loop (Based on my understanding the offending code is run daily), it will be hundreds of iterations before I come to the point of interest
This is just one of example case of tens of errors I face during the last few days. Are there any tips on how to debug ?
thanks