Course Name: Short Selling in Trading
Hi,
I did a backtest of my strategy using floor and ceiling method and when i went to take it to live market I had problems. The issue lies with how argrelextrema function works. If we use an argrel extrema with 20 as window we need to wait for 20 bars to get the right output as in backtest, which then loses the edge when trading live.
Can floor and ceiling method be adopted to live trading then?
Hi Venkataraghavan,
Yes, you are correct. The signal generated will be lagged by a few days.
Also, when it comes to practically implementing this strategy in live markets, it would not be the ideal way, for instance, to wait out an entire month to confirm if a swing has occurred.
For this, I recommend you go through the last unit under the section floor and ceiling.
Here, in the unit titled - Optional: Lagless Swing Detection, a methodology to eliminate possible lags has been discussed.
One of the ways to tackle this issue would be to use higher-frequency data to detect the swings. For example, you can switch to bars that are in the frequency of 15-minute or 5-minute. And secondly, reducing the lag period to a lower value (for example from 20 periods to 10 periods) can also be beneficial.
I hope this was helpful.
Hi Kevin,
Thanks for the answer, I will include the new functions in my backtest and try.