Navigation: Realtest Script Language > Syntax Element Details >

Slippage

 

 

 

 

Category

Strategy Elements

Description

Slippage amount, in points (dollars per share or contract), for each transaction

Input

Any formula specifying dollars per share or contract (points)

Notes

Defines the amount of slippage to apply to to each transaction, in price points.

Slippage is calculated and applied to each side of the trade (entry and exit) separately.

If FillPrice is used in the Slippage formula, it automatically retrieves the entry price for entry slippage and the exit price for exit slippage calculation.

Slippage, if specified, is applied by default to every transaction, regardless of order type (market, stop or limit) or time (open, intraday or close).

To specify a different slippage amount for limit-order transactions (fills at a limit price), use LimitSlip.

To specify a different slippage amount for stop-order transactions (fills at a stop price) use StopSlip.

To specify a different slippage amount for at-open market transactions use OpenSlip.

To specify a different slippage amount for at-close market transactions use CloseSlip.

If all four of these specific slippage types are specified then there is no need to also specify Slippage.

Use Slippage when a simple average assumption is sufficient for your modeling needs.


For futures, a simple assumption is "one tick" slippage for any market, e.g. Slippage: TickSize.

For stocks, percent-based slippage usually makes the most sense, e.g. Slippage: 0.002 * FillPrice.

A more complex example for less liquid futures, would be: Max(2 * TickSize, 0.02 * ATR(5)), meaning  "2 ticks or 2% of daily average true range, whichever is greater".

A more complex example for less liquid stocks would be: Max(0.05, 0.002 * FillPrice, 0.1 *  Shares / Volume), meaning "0.05/share or 0.2% of price or 10% of the ratio of your shares to the total daily volume, whichever is greater".

 

 

 

 

Copyright © 2020-2024 Systematic Solutions, LLC