Systematic Trading research and development, with a flavour of Trend Following

## Slippage: Are your back-testing results realistic?

#### May 10th, 2010 · 11 Comments · Backtest

Slippage can make or break your trading system.
Hard to believe? Read on and check the tests and charts further below…

We recently talked about some data pitfalls that can affect your trading and testing of mechanical systems. Slippage was not mentioned. However, this is a critical piece of data to integrate in your back-testing parameters (and to get right if you want to get accurate backtest results).

I decided to study the impact of slippage on one of the trading systems from the suite used for the State of Trend Following report.

### Impact of Slippage on Donchian System

The system under study is the simple Donchian Channel with the following parameters:

• Entry breakout: 20 days
• Exit breakout: 10 days
• Entry Stop: 2 x 39-day exponential ATR, risking 1% of Total Equity

One of the good things about Trading Blox is the wide range of parameters you can test in your simulation. There are over 30 simulation parameters such as interest, rollover, commissions, handling of lock-days, which can be tested to check their impact on the system performance.

So, I quickly fired up Trading Blox, and ran a stepped simulation with slippage varying from 0% to 35%.

### Slippage in Trading Blox

The slippage percentage is not an amount directly added/substracted to the entry/exit price. Instead it takes into account the range of the day of the order. From Trading Blox documentation:

For a long entry, the slippage factor is calculated by measuring the range from the theoretical entry price to the day’s highest price, and multiplying that amount by the Slippage Percent. (For short entries, the slippage factor is calculated by measuring the range from the theoretical entry price to the low). The slippage factor is then added to, or subtracted from the theoretical entry price, to obtain the simulated fill price.

Here’s how it works for a buy trade:

Slippage percent: 25%
Theoretical buy order price: 100
High Price (for the day): 120
Slippage Factor: (120 – 100) x 0.25 = (20 x 0.25) = 5
Simulated fill price: Order Price + Slippage Factor = (100 + 5) = 105

The distance between the high price and the order price is multiplied by the slippage factor. In this example, the difference between the high price and the order price is 20 points. The 20 points are multiplied by the 25% slippage to get an estimated slippage of 5 points. The fill price for the order will be 5 points worse than the stop order price of 100 simulating a fill at 105.

### Slippage test results

Here are the results of the stepped simulation and a chart of the resulting equity curves for each stepped test:

 Slippage (%) Ending Balance CAGR% MAR Modified Sharpe Annual Sharpe Max Total Equity DD Longest Drawdown # Trades 0% 6,002,394,255.23 56.26% 1.08 1.02 0.49 52.1% 27.4 6,483 5% 555,900,504.33 32.36% 0.51 0.73 0.31 63.6% 50.6 6,482 10% 166,197,092.85 21.66% 0.29 0.59 0.21 74.5% 58.5 6,473 15% 33,017,684.15 8.69% 0.11 0.40 0.07 82.1% 59.8 6,392 20% 8,004,611.35 -1.54% -0.02 0.24 -0.06 91.5% 128.9 6,371 25% 1,914,036.01 -10.89% -0.11 0.07 -0.22 96.1% 128.9 6,371 30% 455,560.44 -19.39% -0.20 -0.13 -0.43 98.4% 128.9 6,349 35% 142,291.14 -25.67% -0.26 -0.37 -0.86 99.3% 128.9 5,573

The impact of slippage is rather dramatic. Even ignoring the extreme cases, consider the difference between a back-test with no slippage and the next one up, 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 v 0.51) as both CAGR and Drawdowns deteriorate sharply.

Imagine setting up a buy order for 100 tomorrow. 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…

### Slippage: fact of life for Trend Followers

Most Trend Following systems get in and out in the same direction as the current price momentum. Therefore, this keeps them more exposed to slippage than a mean-reversion system, for example.

Unfortunately, this is not something that can be tested, apart from running tests in real markets (or having some more complete and granular data, such as tick data, complemented with some book depth information).

An idea to investigate would be to avoid the obvious price levels that every trader and their dog are watching (ie breakout of 20-day range, 50-day moving average, etc.). Alternative but close parameter values (19 or 21-day breakouts, 50-day MA + 1%, etc.) could possibly give similar results (they should if the system is robust) but trade at levels less watched and possibly expose the system to less slippage.

### Slippage at the “Pros”

I was recently talking to an emergent Trend Following hedge fund in London. They mentioned their team of two traders to enter and manage positions. You could think that the need for two traders in a Long Term Trend Following fund managing under \$20M is possibly superflous. However the result they were getting is negative slippage, which, as the backtest results show, can mean much more than just a nice little extra boost to the overall performance.

Aspect Capital, one of the Trend Following Wizards, is an example of a large fund having developed a research team and infrastructure to enhance their trade executions, with the use of algorithmic trading (execution) in combination with their trading desk. This is used in addition to their main alpha-generating automated trading signals. Their approach is discussed in an interview with Automated Trader magazine:

“At the moment about 90% of our electronic trading is managed by our algorithmic execution model”

“we see automation as being of value in […] removing our footprint in the market by keeping our order flow under the radar”

“We have a team of three people mostly focused on the execution algorithms”

### Slippage: an essential part of a System

Slippage might be considered as an after-thought in developing an automated trading system, However, the results of our tests point to slippage being a core contributor to the overall system performance. This is further highlighted by the effort professional fund managers put in to improve their executions.

The question is: how can you reduce slippage as a small trader? Sure, your footprint is much smaller than the big funds, but if you employ a Trend Following system you’re likely to occur slippage. Probably a case where it does not pay to be a small fish in a big pond (with bigger fish having better market access).

Picture credits: eek-the-cat@flickr

Tags: ·

### 11 Comments so far ↓

• Pumpernickel

The impact of Entry/Exit slippage is a strong function of the average trade profit (profit measured in ATRs). Shorter duration systems like your CBO(20,10) example have got smaller average trade profit in ATRs and are thus more sensitive to Entry/Exit slippage.

Longer duration systems (think: average trade duration > 250 days) have much larger average trade profit in ATRs, so the impact of Entry/Exit slippage is correspondingly less. If you adopt the Trading Blox model of slippage, you can’t be filled above the High or below the Low, so slippage can be at most one ATR. Thus entry+exit slippage is at most two ATRs. If your average trade profit is fifteen ATRs, Entry/Exit slippage can’t turn a winning system into a loser, even in the worst case.

Run the same test on one of your much longer term systems and note the impact of Entry/Exit slippage: it’s much less. These long term systems are, instead, more sensitive to rollover (spread trading) slippage. Fortunately, slippage on spreads is much easier to contain.

• Hi PumperNickel,
Very good point and well put.
I was thinking of mentioning rollover slippage and how it can still affect longer term systems, albeit much less as, as you mention, rollovers can often be traded as spreads, and in any case they are not so affected by the momentum effect that can occur at entry/exit levels for Trend Following system.
So thanks for completing the picture by mentioning it. I think I’ll actually run your suggestion of testing longer-timeframe systems and see how slippage impacts their performance (including rollover slippage – which I had set to 0 for this test). Probably a follow-up post…

• Erik

I would test slippage from 0% to 2% by 0.25%, since I think that is a more reasonable range. My feeling is that anyone seeing even 5% slippage is fairly likely trading the wrong product for their AUM/account size.

• Erik, thanks for the input.
To be honest, I am a bit blind at this level as I do not have enough data to get proper slippage stats. As you say, it depends on AUM and markets as well.
If any reader could chime in with what level of slippage they consider adequate for back-testing, that might give us a better idea of the consensus.
I’ll probably run the long-term systems using lower figures of slippage (and more granular)
Thanks,
Jez

• Pumpernickel

“I am a bit blind at this level as I do not have enough data to get proper slippage stats”

You will find that in the particular context of this blog message (namely, trend following futures trading with average trade durations between 3 days and 350 days), the more data you accumulate, the more confused you become.

Each data point is probably something like a 9-tuple: (MarketName, BuyOrSell, OrderType, DailyHigh, DailyLow, TheoreticalFill, ActualFill, SlippageInTicks, SlippageInBloxPct, SlippageInDollars). OrderType is MarketOnClose, MarketOnOpen, LimitFilledIntraday, StopFilledIntraday, StopFilledOnOpen, etc. Daily high and low are needed so you can compute the Trading Blox slippage in percentage terms. I’ve guessed that you will measure entry/exit slippage three different ways (%, Ticks, Dollars) but you might want to do more or fewer. I’ve also neglected complexities related to tradesize, such as split fills and partial fills, because those require you to actually *define* slippage, which isn’t easy. Unables (filled in theory, not filled in practice) are also philosophically difficult — but very real and in fact commonplace in real futures trading with stop orders.

Once you have executed many hundreds of trend following futures trades, laboriously recorded your fills, & computed your 9-tuples of slippage data, you will find that your data does not fit any of the classical probability distributions. Let loose TableCurve from Sigmaplot software & have it fit all 200+ equations it knows, all at once (a very handy feature!). Look at the fitting errors from these 200+ simultaneous fits: appalling. Slippage isn’t Gaussian, or Uniform, or Exponential, or any other distribution you can think of. Slippage is pathological.

And when you look at your pathologically ugly plots of real-world, real-trade slippage, you may decide that you would be horrified to “model” slippage as a single constant. What constant will you select? The average (mean) of your slippage data? The median? Mean plus one standard deviation? The 66% point of the distribution? The worst case slippage (the 99.99999% point of the distribution)? Yick, none of them are at all representative.

This is why professional trend following traders typically give three word answers to the question “What’s a good model for slippage?” The complexities are enormous, and for those who have invented a half-decent solution, it’s a proprietary edge they have no incentive to disclose. As you have seen, entry/exit slippage can destroy shorter-term trend trading. Those who can model slippage more accurately, can crank down their timeframe more safely, and sail closer to the wind.

• @Pumpernickel
Thanks for sharing these great insights..
Appears I was also “blind” on how complex the issue can be!

“Slippage is pathological”
nice summary ;-)

• Motomoto

Slippage is pathological – that would make a good t-shirt.
In backtesting – as we tested longer term trading, we found the same thing, slippage is less important, but to define it is next to impossible. Its only after actual trades can you get and idea, and then the research to improve/reduce the slippage is important. We guestimated by a simple mechanism of assuming a few elements and testing for those. Such as –
1) buying at the highs, selling at the lows and seeing the effects
2) buying the next day after a signal was triggered at the highs and lows, or at variations of an average price of sorts.
3) percentage based slippage like the blox.

For all they made a difference, but not so significant to be a worry…. but more to show the effect can be detrimental in short term time frames.
In the real world it really depends on the instrument traded…. eg; corn is different to oil, to equities to rubber….. so as pumpernickel mentioned to really model it…. get ready to tear your hair out.
the ongoing research by the larger trend following funds and CTAs seems to be largely centered around reducing slippage and market impact (I sent you an article you might be able to add to the blog)

• lozen

Hi Jez,

I executed a trade yesterday with stop order, bought 1567 shares of FXF at 96.8427 even though i set my order at 96.79 (theoretical entry price). basing on your formula, i calculated my slippage % at roughly 58% (yesterday’s high was 96.88). did i knock myself hard or what? its hard to believe that setting an order at 100.00 and being filled at 105.00 (5 \$ gap) has much less slippage % than my trade (0.0527 \$ gap). what’s the theory behind using day’s high as basis to calculate this??

lozen

• Iozen, if you think about it in terms of worst case scenario (ie buying at the high of the day), this way of calculating slippage is just a way of measuring how close to the worst case your trade executed compared to the desired entry price.
Note that slippage can really impact (some) system trading performance and measuring real-life slippage to feed this back into your back-testing simulations is where it becomes very useful.