Deployment of a ML Trading Strategy

I have a ML based trading strategy which is giving decent results in back testing hence I want to deploy that in Live environment. While back testing, I applied .shift(1) from all the features to eliminate look-ahead bias.



My concern is whether I should remove this .shift(1) from Live trading strategy code so that my model can read intraday market moves to generate signals. 



Please note that I am not using pickle as of now and I am training the model daily; hence I am a bit skeptical that if I remove .shift(1), my model will be exposed to look-ahead bias while doing the same.

Hi Mohit,



So basically, while trading live, you will generate a signal based on the features till the previous candle, which will be used to trade on the current candle. For example: if you are using daily data and say today is 29th December, you will generate the signal after the market end and based on that signal, you can take the trade on 30th December. A similar thing can be done intraday as you can take data till the previous candle to generate signal and use it to trade on the current candle's close. 



Hope this helps!



Thanks,

Akshay