Lars K Oestergaard
Lars K Oestergaard
I'm having the exact same issue.
I can't seem to get bt.algos.WeighTarget() to work in any scenario when backtesting, unless if I set the signal series to all zeroes (which of course doesn't do anything).
> > `ma_co_strat = bt.Strategy('EMA_crossover', [bt.algos.WeighTarget(signal), bt.algos.Rebalance()])` > > Does it work if you add `bt.algos.SelectAll()`? This is how I use it: > > ``` > s1 = bt.Strategy('s1', [bt.algos.SelectAll(),...
I tried running the master branch too. It looks like the error occurs when the signal flips to a non-zero value for the first time.