In this blog post I wanted to run a couple of quick experiments to see how clearly I was able to highlight the importance of incorporating various elements and components into a backtest that I admittedly often overlook in most of my posts – that is I make the assumption that they will be dealt with by the reader at some point down the line, but choose not to include them for sake of simplicity.
That probably isn’t a great way to proceed without at least explicitly demonstrating just how important these “auxiliary” factors can be. Well actually, perhaps “auxiliary” isn’t a great label as again, for a backtest to be considered valid all these elements do need to be accounted for – elements such as brokerage costs/commissions, slippage, bid/offer spread, liquidity/order book depth and so on.
In this post I will concentrate on the difference in outcomes that result from simply incorporating a more realistic way of accounting for the bid/offer spread when trading equities. I will be using minute bar data, with each minute containing information such as the opening bid/offer prices, the closing bid/offer prices and corresponding size available at those prices, the actual trades that took place and in what kind of size, the maximum and minimum spread recorded in that minute and so on. The full list of data points are as follows: