Course Name: Quantitative Trading Strategies and Models, Section No: 2, Unit No: 4, Unit type: Notebook
Hello,
I was wondering if for the exit signal and a vectorized backtest this can be done:
I'm placing '1' when buy signal, '-1' when a sell signal and '0' if the candle 5 periods ago is '1' or '-1' (exit). After than I use .ffill() in signal column. Is this correct?