From the August 01, 2011 issue of Futures Magazine • Subscribe!

# Measuring and avoiding slippage

System traders prefer to focus on the core of their strategies — entry and exit order logic. As such, an important but often-neglected factor in system development, backtesting and live trading is slippage. Slippage by itself can break an otherwise profitable trading system. Most momentum strategies, such as trend-following, get in and out of positions in the direction of the price momentum. This makes them especially susceptible to the negative effects of slippage.

Slippage simply is the difference between a theoretical entry price and the actual fill price. It can be measured in several ways (ticks, points, dollars, etc.). We'll address slippage from a relative point of view by measuring it in percentage terms compared to the range of the price bar. For any given order, the worst possible slippage would occur by buying at the high of the bar (or, conversely, selling at the low of the bar): This would represent 100% slippage on the order.

Slippage percentage is calculated by dividing "d1," the distance between the theoretical order entry price and the actual fill price, by "d2," the distance between the theoretical order price and the worst possible fill price. As an example, consider the following for a "buy" order:

Theoretical entry price: 1060
Actual fill price: 1064
Bar high (worst possible) long entry price: 1100

d1 = 1064 - 1060 = 4
d2 = 1100 - 1060 = 40
Slippage = d1 / d2 = 4 / 40 = 10%

This article will measure the effect of slippage and discuss ways to control it, including the use of different order types to improve success.

Slippage impact

To measure the impact of slippage, we'll employ a test that uses a typical price breakout trend-following strategy: A 20-day Donchian channel system. The system enters when price makes a new 20-day high or low and exits when price reverses and registers a 10-day low or high (that is, in the opposite direction). We also will employ an alternative exit of a stop loss of twice the Average True Range (ATR) at entry. Backtesting this system from 1990 over a diversified portfolio of futures gives a compound annual growth rate (CAGR) of 56.3%. This result is obtained without any consideration for slippage, and therefore is not realistic. Some slippage should be worked into all systems, but the key is to limit it as much as possible.

One backtesting school of thought is to try and break the system while testing it. If the system still holds up, it might have value. One method of attempting to "break the system" is to include large slippage assumptions. To measure the gradual effect of slippage, and check if the system described above holds up, a stepped simulation can be run using different slippage assumptions, with values ranging between 0% and 35%. The results are shown in "Slippage simulation" (below).

The impact of slippage is rather dramatic. Even ignoring the extreme cases, consider the difference between a backtest with no slippage and the next one down, with a small 5% number: The performance is cut drastically, to a point where the MAR ratio of the system is more than halved (1.08 vs. 0.51) as both CAGR and drawdown performance deteriorate sharply.

To put things in perspective, imagine setting up a buy order for 100 on tomorrow's open. If the price trades between 99 and 102, your order should be filled. However, with 5% slippage, the fill price would be 100.1 instead of the order price of 100. This is the difference between a good system and a not-so-good one.

Long-term solution

Slippage might be considered an after-thought in developing a trading system. However, the results of this test suggest that slippage can be a major contributor to the overall system performance. Slippage impact usually is proportional to the trading frequency of a system. Therefore, one of the simplest ways to limit slippage while developing a trading system is to increase the time frame of the strategy.

Going back to the Donchian breakout system, we can test the effects of slippage when trading it at a much higher breakout period. "Expanding lookback" (below) shows the results of a test that simulates the system trading with a 100-day breakout period (50-day for exits) over the same portfolio, for a range of slippage between 0% and 35%.

One reason for the reduction in slippage is that the number of trades drastically decreases (compared to the 20-day breakout system), while trade length increases. The average trade duration is 119 days, while the average winning trade lasts 203 days.

Slippage obviously still has a detrimental impact on performance. However, its effect is felt much less than with the 20-day breakout system. The system keeps producing positive results across the whole slippage-stepped simulation. The MAR is halved between the 0% slippage and 35% slippage cases, which is small relative to the reduction in the 20-day system.

Note, however, that this test does not reflect the effects of rollover slippage. Longer duration trades accrue rollover slippage when you transfer the position from one contract to the next. A trade lasting one year potentially could involve buying and selling 12 times (if the position is moved to another contract each month). However, rollover slippage usually is lower than entry/exit slippage, as it is less subject to the price momentum that generated an order in the first place.

Stops and limits

A breakout system usually enters positions using stop orders: As soon as the price hits the stop level, the order is executed, with momentum often driving price beyond the stop price and generating slippage. Trading with stop orders inherently exposes a system to slippage.

On the other hand, a way to control order fill prices and slippage is the use of limit orders. Modifying the breakout system by adding a limit element to the entry order logic might modify the underlying system's characteristics, but at the same time it helps keep slippage under control.

The idea is based on taking advantage of breakout reversals. Most breakouts usually overshoot the breakout level before eventually revisiting it a few bars later. Instead of using simple stop orders for entries, the system would use stop-limit orders, which would be defined with identical stop and limit price levels (at the breakout point). This would prevent the system from buying/selling above/below the entry breakout level, thus reducing entry slippage.

Of course, with daily data, it is impossible to know and test whether the price moves through the breakout stop level and never pulls back (a stop-limit order not executed) or whether it revisits these levels later throughout the trading session (and triggers the order execution). However, if the instrument trades again at the same level a few days later (that is, the price has retraced from the breakout), the limit order should be executed.

The problem with this approach is that it does not adhere to the basic principles of following the trend. This philosophy is what underlies a system such as a Donchian channel breakout. Trend-following system trade distributions often consist of several small losers outweighed by a few large winners. Missing a large winner can have a strong negative impact on the overall system performance, and this is exactly what could happen when implementing a stop-limit order approach. For example, this would occur if the price simply takes out the breakout level without looking back — usually the sign of a strong breakout — and continues higher to create a strong winning trade.

The 20-day breakout system has a losing trade ratio of 62%. A reasonable assumption is that all these losing trades still would be captured by the modified stop-limit version of the system, when they start to retrace toward the breakout price. Further assuming that around 85% of all trades do retrace to touch their breakout level within the next five bars, we can estimate the winning/losing trades ratio of the new modified system. Out of 100 trades, 85 would be captured by the system, 62 of them being losers and the remaining 23 being winners. This would increase the losing trades ratio to 62/85 = 73%.

As such, this "stop-limit order" system modification is a trade-off between missing winning trades and getting better slippage on all other trades. This trade-off can be quantified by backtesting this modified system that implements the same logic as the 20-day Donchian channel, except for the entry order logic, which uses stop-limit orders that wait for five days for a potential retrace to the breakout price.

Results comparison

Testing the retrace system with 0% slippage produces a CAGR of 35.51% with a MAR ratio of 0.48, whereas running the original system gave a CAGR of 57.62% and a MAR ratio of 1.11. The percentage of losing trades goes up (as expected) for the retrace system (72% vs. 62%). However, this is not a fair comparison, as the original Donchian system will be subject to slippage on entry, whereas the new retrace system should not. Adding 5% slippage to the original Donchian system gives a CAGR of 33.55% and MAR of 0.53 (see "Assessing retracement").

The comparison does not look bad for the retrace system, but it obviously is dependent on the real level of slippage suffered by the system. Note also that the modified "retrace" system simulation results are pessimistic, as it always is assumed that no retrace occurs on the same day as the breakout (because of single bar information limitation). Therefore, this simulation misses out on more winning trades than actual trading would reflect (all those trades that retrace on the day but not in the next five days).

Pushing the concept even further, it might be interesting to test the impact of waiting for an even stronger retrace, past the original breakout level. By adding an additional retrace parameter to the system, we can decide and test by how much the retrace must overshoot the initial breakout level to enter the position. The higher the extra retrace parameter, the more trades are likely to be missed, but the better the entry price would be on all the other trades, producing "positive slippage" as described above.

"Comparing multipliers" (below) shows the results of a stepped simulation with different values for the extra retracement (expressed in average true range multipliers). There is a notable improvement in the system by waiting for an extra retracement, which seems to simulate some negative slippage — although more trades are missed as the extra retracement increases in size.

In light of these tests, it's clear that while the actual implementation may be open to fine tuning, integrating the use of stop-limit orders and retracement techniques into a traditional breakout strategy may increase trading results and the long-term chance of success.

Jez Liberty is a London-based independent trader. He can be found at www.automated-trading-system.com.

Positive slippage
By Daniel P. Collins

Positive slippage is possible when the market bounces off, not through, the stop price. An "or better" fill is considered to be bad execution on an exit stop but is beneficial on an entry stop. In the days of pit trading, skilled floor brokers would choose to "not elect" a stop if there were a lot of size at the price. For example, on a buy stop in the 30-year T-bonds, if the stop price is 126-00 and the market rallies up to and trades 126-00, if there are 1,000 contracts offered at 126-00 the broker can choose not to elect the stop as the large size offered at 126-00 makes it likely the market will go back down. In that scenario if it were an exit stop, the short position still would be viable. If it were an entry stop and the 126-00 print initiated the buy signal, the trader could buy at the market once the price moves back down. This can add to the return of the system and occurs relatively often as entry stops in channel breakout systems often are at high-traffic support and resistance areas and the market may take several passes at a support or resistance area before it breaks through.

Of course with electronic execution you would not have your stop sitting in the market, but you would be monitoring the market waiting for it to touch your stop price. Many traders do this as a matter of course as they worry about high frequency algorithms fishing for stops. It also would be possible to set a trade not to execute if there is X amount of size offered directly above or below the market.

Page 2 of 6