Samuel
Samuel
When instantiating the Strategy, try passing the algos as a list (i.e. `s = bt.Strategy('strategy', [branch_stack], ['spy', 'agg'])` instead of `s = bt.Strategy('strategy', branch_stack, ['spy', 'agg'])`).
Q1: Can you generate the signal before running the backtest? I don't think there' any way around it if you need to run a calculation every single minute. Q2: Would...
The columns of the DataFrame you pass into `WeighTarget` must be the same as the securities of your backtest. When you are generating the EMAs in your code, you are...