Home › Documentation › Building strategies
Realism

Execution costs: commission and slippage

The market does not fill you at the price you see. Between sending your order and getting filled, price moves —almost always against you—, and that difference is called slippage. In strategies that trade often it is the difference between a profitable system and one that is not. AniQuant accounts for it throughout the program, not just at the end.

Where you set it up

In the Quote Manager, which is where each contract's record lives. Slippage is a property of the symbol, not of the strategy: @ES does not slip the same way @GC does.

Tick

The contract's minimum price step. On @ES it is 0.25 points.

Slippage (ticks)

How many ticks you give up on each side on each side of the trade. With 1 tick on @ES, the cost is 0.25 points going in and another 0.25 coming out.

Cost

The commission per trade, separately. It is subtracted from the profit; it does not move prices.

Leave slippage at 0 and AniQuant behaves as always. Set it to 1 and every number drops — those are the good ones.

Getting around the list

The grid sorts by clicking the header of any of its nine columns — symbol, description, file, point value, tick, cost, slippage, modified date and size—; a second click reverses the order and a small ▲▼ arrow marks the active sort column. Text starts A to Z and numbers largest first, which is what you expect when you ask it to «sort by size».

It sorts by value, not by how it looks: «1,000 KB» comes after «999 KB» and dates sort by date, not by the day of the month. Two handy uses: sorting by Modified or by Size groups in one go every symbol whose file no longer exists, and sorting by Cost or Slippage brings to light the ones still sitting at zero — which, now that the Survival Test crosses markets using each one's own costs, are no longer harmless.

The selected row does not change when you reorder: it stays the same row, not whichever one now sits in that position on screen. And the ↑↓ arrow keys move through the order you are looking at.

Where it applies, and where it does not

Not every order suffers the same way, and AniQuant tells them apart. What decides it is the order type, not the exit type.

It does slip — market orders

The entry, the stop loss and the signal exit. You are asking for immediate execution and you get the price that is there, not the one you wanted. The stop is where it hurts most: it fires precisely during fast moves.

It does not slip — the take profit

It is a limit order: if price touches your target, you get filled at your price or better. Its real risk is not getting filled, which is a different thing and is studied separately. Charging it slippage would be punishing it twice.

In the SEARCH too, which is what really matters

Discounting costs only when you open a strategy would be a consolation prize. The problem would be upstream: in how you chose it. If the sweep in the Strategy Lab or in AQ Genesis searches a world without costs, the ranking over-rewards the strategies that trade the most — which are exactly the ones that decay most in real trading. The selection comes out biased by construction.

That is why slippage also goes into the search engine, into the Walk-Forward and into the Survival Test. Measured on @ES with 2 ticks: out of thirty strategies, twenty-eight get worse and none improves, and the best one falls from 62.6 to 34.4. But the numbers are not the point: two strategies dropped out of the top 30 and two others came in. It does not just change how much you make — it changes which ones you pick.

Ticking or not ticking «Use GPU» does not change the result, only how long you wait: the graphics-card accelerator applies exactly the same costs as the processor.

How much can your strategy take?

In the Strategy Performance Report, the Slippage tab repeats the backtest with rising costs and draws the curve. What you are looking for there is the break-even point: how many ticks of slippage it takes for the strategy to stop making money.

A strategy that dies at half a tick is not a strategy: it is an artifact of the history. One that takes three or four has room to survive a fast market, a worse broker or a thin session.

Try it yourself

AniQuant can be tried free for 30 days, with every module and no card.

← Previous
Templates: save and load
Next →
AQ strategy language and editor
More in Building strategies