How Trading Costs Affect Short Term Algorithmic Systems?

How trading cost effects short term algo systems

Guest Post by ProfessionalTradingSystems

In this article, I would like to touch upon a very often neglected topic – trading costs. Many of us – traders – for some reason are not enough cautious regarding the matter and there are many, many examples of failed live trading results because of incorrect trading costs estimation during the backtest period.  Today I will present to you how a small change in spreads will reduce your trading profits significantly.

How Trading Costs Affect Short Term Algorithmic Systems?Click To Tweet

The strategy

For the above stated purpose I will use a swing Forex trading system, which should be considered also as a very short-term. Its concept is based on a sideways detector indicator which monitors for flat markets when the prices are not trending in either direction. Once we have such juncture the systems looks for RSI overbought for sell signal and RSI oversold for buy signal. Below you could see the equity curve where all trades are converted in R-multiple in order to be equalized:

equity curve

R-multiple is a ratio which divides trade`s gain by the amount of its initial Stop Loss. So if a particular trade has gained 150 pips and its SL is 120 pips, then it is 150/120 = 1.25 R.

The conversion is done in order every market to be equalized, every trade to have equal weight and across to different market cycles with changing volatility the trades to be treated equally. So with this ratio, I could compare 10 points gain in Gold with 120 pips on eur-usd and 50 pips during quiet market to 200 pips gain during wild juncture.

The backtest has been done for 15 years – form beginning of 2001 to the end of 2015. The portfolio consists of 7 markets – eur-usd, usd-chf, gbp-usd, aud-usd, usd-jpy, spot Gold and gbp-jpy. Totally the trades are 11 531, which is 739 per year or 15 per week. Here are the spreads used in the backtest:

spreads used in backtest

Currency pairs spreads are in pips displayed and the Gold is in points. These spreads are a little bit optimistic and unless you are using true ECN broker you will experience difficulties to find a broker with such spreads. The difference between the spreads across the brokers comes from the fact that each broker has a various access level which determines the bid/ask difference. The deeper the access, the better the conditions. Also when you have a big account you will get better conditions (spreads). And the third factor is the quality of the liquidity providers to the broker which is connected the first factor.

The total return is 521 R and the MaxDD is 22 R. These results are not bad at all because average annual return/MaxDD ratio is 1.57. This means that if you limit your MaxDD to 20% using the appropriate money management, then you could earn 31.4% on average per year.

In order to show you the effect of changing the spreads, I have done a second backtest with the absolutely the same inputs but with bigger bid/ask difference. Here are the new spreads used in the new backtest:

spreads used in the new backtest

On average these spreads are 50% bigger than the first ones and they are quite conservative. The total return for the period is changed to 361 R which is 30% less and the MaxDD has increased from 22 to 28 R which is 22% rise. Annual return/MaxDD ratio is down to 0.86 – a 45% decrease compared to the first test. Below is the new equity curve:

new equity curve

As you see a small change in spreads could cause much worse system performance. I should reiterate that this is swing trading system which has 15 trades per week. If you make the same spreads change for day trading strategy with 50 trades per week the deterioration of the equity curve could be much, much bigger and you could even end up with a system which is no longer profitable. On the other side if you try the same procedure with long-term trend-following Forex strategy with 20 trades per year, then the difference in the results will be negligible.

The solution

There are two options which can be taken in order to avoid any big difference between backtested performance and then real time trading results of your system. The first one is focusing on algorithmic strategies with high average trade measured in pips (points). Such systems are least dependent on increasing of spreads and other trading costs like commissions and slippage. A strategy with an average trade of 8 pips is very stable because even if you subtract 0.5 pips per trade additional costs then you will end up with 7.5 pips which is only 6.5% decrease.  On most occasions, this means fewer trading activity systems and avoiding any day trading strategies.

The second options make your backtest with the real spreads which your broker offers to you and then to make a little mark up for any additional and hidden costs like slippage. Being conservative on this stage is very useful for your live trading results because you are not going to be caught by surprise.

I hope I have brought some clarity regarding the trading costs of an algorithmic system and how a little difference could make a huge impact on real trading results. I wish you a profitable trading.

Disclaimer:

The views, opinions, and information provided within these guest posts are those of the author alone and do not represent those of QuantInsti®. The accuracy, completeness, and validity of any statements made or the links shared within this article are not guaranteed. We accept no liability for any errors, omissions or representations. Any liability with regards to infringement of intellectual property rights remains with them.