Automatic Order Execution Rules

Discussion in 'Order Execution' started by DGunz, Dec 8, 2010.

  1. DGunz


    In an equities stat arb model that I run live, I have coded rules for managing orders which I would like to put out here for the forum to discuss and perhaps improve.

    A little about the model: it is time sensitive and places the execution of the trade above, trying to get price improvement. However, having said this, I still try and make my executions rules as efficient as possible to reduce slippage where I can.

    These are the rules of my auto order execution algo, if you have some suggestions I would be glad to hear them. The following are simplified to buying orders only.

    1. If spread is = 1-15 cents wide;
    then limit order to bid at 1/2 the spread for 5 seconds;
    if does not execute, then replace with limit order to 1/2 the spread of last limit and the ask for 5 seconds;
    repeat until spread is < 1 cent, then replace with limit order to take liquidity.

    2. If spread is = 16-30 cents wide;
    then limit order to bid at 1/3rd of the spread for 5 seconds;
    if does not execute, then replace with limit order to 1/3rd the spread between the last limit and the ask for 5 seconds;
    repeat until spread is < 1 cent, then replace with limit order to take liquidity.


    e,g 1. if market 50.00 x 50.15, bid 50.07 for 5 sec, then 50.12 for 5 secs, then 50.14 for 5 secs.
    e,g 2. if market 80.00 x80.30, bid 80.10 for 5 secs,then 80.17, ect...

    As you can see the larger the bid ask spread, the more willing I am to work the order. Any one else willing to share?
  2. dinn13


    My stuff has been built out to minimize tcost in order to maximize size traded/pnl, basically a function of volume passed/time/and characteristics of the stock traded to set limit price, where to place the order (which exchange and order type), and where and when to take liquidity (try to source dark liquidity/take from the nbbo)

    Take rate varies a lot based on strat parameters and stock traded but avg is always under 50%..

    Sounds like what you're doing is fairly aggressive.. if you don't mind saying, what is the percentage of your order working taking liquidity? and what do you use as your benchmark for tcost analysis? the midpoint?
  3. DGunz


    Taking liquidity for this particular model is > 50% of the time. I want to emphasize that the edge in is getting in for the move, rather than superior price execution, but ofcourse I am still looking to improve where I can.

    Regarding a benchmark to compare slippage, it is my actual fills compared to the original mid market when the signal first occured.

    Yes, the rules are fairly agressive and I would like suggestions that are in the realm of agressively filling orders, but not foolishly aggressive by filling with all market orders.

    A backtest of recent performance suggests that I would have been better off firing off all market orders than the current execution rules I have least for this strategy. So I am looking for tweaks that would improve my slippage from where it is now, but still be better than slippage for an all out 100% taking of liquidity. It is a fine balance.
  4. dinn13


    I have seen models that do take near 100% of the time but I've stayed away from those cause they tend to be limited in size that can be traded. But they have had ridiculously high sharpes.

    I'm guessing you have at least several bps in tcost based on that benchmark, eh?

    Sounds like you probably have a momentum strategy and assuming that for 1 cent spreads it probably makes sense to immediately send mid point orders to a few exchanges.

    Also might want to try posting first to bxouch/edga/byz on the more liquid names or at least have that be a step in between posting on say nasdaq and taking liquidity.

    And lastly might want to try sourcing dark liquidity prior to taking from the nbbo. So for example ioc the mid points/dark pools every second prior to hitting the nbbo.

    As far as increasing adding liquidity on high rebate exchanges, that's a hard game cause there is so much competition to add liquidity at 'good' prices.
  5. rosy2


    i do something very similar to that myself. If you think your strategy is profitable even after a paying a 15 cent spread then I guess always hit the market.
  6. promagma


    This is often the case with HFT trying to sniff out the supply and demand ....

    Don't forget that on all but the most liquid stocks, size matters .... your game might work well for a 100 share order but be a loser with 500 shares. My strategy has buy and sell levels and I have done of a lot of testing to get the best execution. I found it does best with a stack of 100 shares orders averaged around the price level. With one 500 shares order, there was a larger tendency to get a full fill on losing trades and partial/missed fill on the winners.
  7. DGunz


    I started out with an assumption that: Hitting the bid and offer to get execution is an unacceptable amount of slippage.

    So I tried to devise an execution that would manage the the orders but strong evidence suggests that I that hitting bid and offers performed better. Perhaps my initial assumption was wrong, at least for this model.

    It just rubs me the wrong way to know that I can not get better execution than 100% taking of liquidity, in this system,,, it feels lazy, which is why I brought it up. Maybe I am thinking too hard. Thanks for the suggestions.
  8. Some questions from a stat arb ignoramus:
    - What automation software do you use?
    - Is assessing stationarity of a pair of instruments part of your process, or is this irrelevant?

    If you do assess stationarity:
    o Do you use the cointegrating augmented Dickey-Fuller test (which I have a hell of a job getting my head around!)? Or is there something else (hopefully simpler) that works just as well in your experience?
    o What software platform do you use to determine stationarity/cointegration?
  9. DGunz


    1. Matlab for backtest and signal generation, followed by a rather low tech solution...DDE order execution direct to the platform.

    2. Not for this model, which requires entering and exiting out of baskets of equities daily. For short term trades like this, stationarity is irrelevant.

    I do mess around with longer term strategies but my 2 cents is that longer term position trades tend to have larger PNL deviations and I value consistency on a daily basis. Which is also why I started the thread, because trade execution was becoming more important to me.

    There is a saying in the tech start up industry "Fail Fast". I like to think it's the same with trading. If I am going to persue a RTM strategy then I am going to go for one that gives me fast confirmation of my failures. To tie up 1 mil in BP for a week with 100 trades using a long term RTM strategy is inferior to using 1 mil in BP daily with 100 trades. Even if the edge per share on the longer term RTM strategy is double or triple the edge in the short term RTM strategy, say 3 cents per share vs 1 cent per share, you are better off with the latter.
  10. Many thanks.
    #10     Dec 10, 2010