More about the risks specific to algo trading
We have already considered the main risks in any trading: operational, systemic, and transactional. Let’s highlight another kind of risk that is specific to algo trading.
When you develop and backtest a strategy using compressed data, along with limit or stop orders, there is a risk that more than one of these orders will be simulated on the same bar. Typically, this happens when the order prices are too close to each other and the data resolution is not granular enough. For example, if you place a limit and a stop order at a distance of 5 pips from each other and run a backtest using daily data, then on most days, both orders should be executed during a single bar. This is what you want to avoid at all costs because the backtester has no idea about how the price has actually moved inside this single bar and therefore no one knows which of the two orders will have been triggered first and which next. So, it is extremely important...