The resource loading... loading...

How to effectively avoid slippage

Author: Inventors quantify - small dreams, Created: 2017-08-30 12:52:48, Updated: 2017-08-30 12:53:16

How to effectively avoid slippage

  • Slip of the tongue

    First, let's talk about the slippage points in programmatic trading. In fact, the slippage point in programmatic trading is the difference between the actual transaction price and your expected price.

    From this we can give a formula for calculating the slippage point: network latency time * market tick level fluctuation rate = slippage point.

    It is not the case that the market is always volatile, and in the analogue and historical retrospective, there is no slippage because there is no delay in the network (but the market is still volatile at this time, but does not produce slippage), in the analogue, if you set a stop loss margin for each single piece, it is not difficult to find that the stop loss or stop loss triggered in each trade is 100% at the price you expect.

    Firstly, the market fluctuations, which we cannot change, but we can control the network delay time. We must be clear that the market we see on the computer, not live but replay, according to this market the instructions we program, but also the time needed to pass to take effect.

    img

  • To avoid the effects of slippage, there are three ways to do this:

    • 1 Increase the level of processed transactions

In the process of programmatic trading, the average gain and loss points of the large-cycle trading level are necessarily greater than those of the small-cycle trading level. If a small-level is an average profit of 10 points, an average loss of 7 points, while the large-level model is an average profit of 100 points, an average loss of 70 points, in the simulation and historical review, the two models can be stable profitability, but in the real world, the latter must be very different from the former, because the average gain and loss number, and the scale of slippage, is not a scale at all.

  • 2 Reducing network latency is helpful for programmatic transactions

    In addition, the company is trying its best to find the fastest way to connect to a programmatic transaction server to reduce network latency.

  • 3 Avoid periods of high market volatility

For example, for non-farms, you can take a complete avoidance approach, all the time of clearing the stock is kept 15 minutes before the data is published. You are unable to control the volatility of the market, but you want to avoid or do it well, for accurate to the second non-farm publication time, this time we do not hold stock, even if a big slippage, does not affect us at all.

根据上述内容,对计算公式两个乘数进行调整而降低或者规避程序化交易中的滑点是第二和第三点,而第一点,只是使得降低滑点的影响效果而不是降低滑点,我们的收益率曲线率根本不会受到影响。程序化交易中的滑点有的时候还可以增加你的收益,这需要我们队开单和平仓的方式有一个更好的理解,总而言之,如果我们用的是逆tick级别的势的开单方式,那滑点对我们是有好处的,如果我们用的是顺tick级别的势的平仓方式,滑点对我们也有好处,此时,网络延迟较大对我们来说,倒是一件好事!

比如靠回踩方式去下单,还有靠固定点数的止盈,我们和滑点都可以成为朋友。当我们有两个以上的交易主机的时候,就需要去甄别所有的下单和平仓,如果滑点对我们有利,则用慢速网络主机去操作这些指令,如果滑点对我们不利,则要将这些指令拆分到快速网络主机去操作。

FeiyangEA开单方面,回踩方式达到六成以上,所以最好用国内慢速网络主机去开单,而对于平仓方面,都是滑点对程序化交易中不利的方向,所以目前都是由美国快速网络VPS负责平仓操作。这些改进,使得同期历史回测不如实盘的成绩,从而确保了,实盘与回测一致的高度,这个前提是程序化交易中最为重要的,否则根本无法做出交易模型的编制和优化。

Translated from Programmatic trading and quantitative investing


More