Best order execution Algorithm

Discussion in 'Order Execution' started by FreeGoldRush, Nov 2, 2021.

  1. Looking for advice on best algorithms for order execution. I am writing software to enter my orders obviously. Once I determine to enter or exit a position I simply want the most efficient executions, on average, over a large number of trades. The obvious first approach is to break an order into small chunks, sit on the bid or ask, and then move very slowly if the market moves away.

    The algorithm you suggest will obviously be a function of things like very recent volume, price, spread, size that must be filled, NBBO sizes, etc.

    If you have no clue what I am talking about and don't know what an algorithm is then please do not respond. I am NOT looking for these things:

    1) The many simple order entry algos at places like IB
    2) General answers such as, "Just hit the bid and find the dark liquidity!"
    3) An answer that derives from zero experience with efficient order executions

    Thank you!
     
  2. Robert Morse

    Robert Morse Sponsor

    It would help to know some more information. How time sensitive is the order entry? How large are your orders vs the typical liquidity in the market? Time sensitive orders have to prioritize getting in or getting out quickly while large orders have to consider market impact.
     
    FSU and qlai like this.
  3. Good point. The time to enter is another input to this function. Orders fall into two categories. The first set need to be fast - all fills within 60 seconds or so. The other set of orders we have 120 minutes to get done.

    Order size as a percentage of recent volume varies quite a bit. It may be as much as 10% of the average daily volume. For the set of orders that I want to get into within 60 seconds volume might be most of the volume during that time.

    I'm currently getting almost all trades done without taking liquidity but my current algorithm does have to go to the order book when fills aren't happening. My position sizes are increasing over time so this is becoming more of an issue. Obviously we want to be a maker and not a taker when possible and get the better pricing and exchange rebates.
     
  4. 10% of average daily volume is an outlier case. But it can vary from 0.01% to maybe as much as 10%. So I'm looking for ideas to cover all the bases.
     
  5. thecoder

    thecoder

  6. Robert Morse

    Robert Morse Sponsor

    First let me say that I would not consider 60 seconds as time to fill as fast, unless it is a very illiquid small cap stock. Market impact will get very costly with larger orders and can cost more than taking liquidity. IMO, large VWAP and TWAP orders can be "seen" by HFT because the child orders are rhythmic. I would consider those when the route is all DARK or a high volume symbol. There is not going to be a "best" for every stock. For me, I like to get a small position on right away, so I do not miss it. Then I prefer to put my own limit orders out like a peg order, to work into a position. I feel that I'm not ever right in the first minute, so what is the rush. In general, my positions are small, so market impact is only an issue on OTC symbols. I'm happy to chat about this on the phone one day.
     
  7. Not interested in measuring success based on VWAP. That's way too simple. Most of my trade volume is far lower than 10% of average daily volume. That is an outlier case with very small companies.

    Assume I need to fill an order where the fill size is 10% of the volume during the last 10 minutes.
     
  8. I have developed a method to measure the efficiency of my order entries. Basically you take a snapshot of NBBO at the time you enter an order. You then move your price around according to your algorithm until it is fully filled. Over hundreds or thousands of trades you can then measure how well you did compared to just taking liquidity from the order book.

    Let's use an example:

    I need to buy 50,000 shares of stock ABC trading at $3/share. Volume during the last 10 minutes has been 75,000 shares. The "best" strategy should be defined as the strategy that produces the best result on average across hundreds of trades of different companies with similar trading volume at the time.

    One idea is to just break this into 5 orders of 10,00 shares each and sit on the bid. If you get a fill then put 10,000 more shares out there. If the bid moves away from you then move the price up.

    1) Move the price every 2 minutes
    2) Add randomness to both the timing of order adjustments and order size so as not to trigger someone else's algo that is anticipating your demand.

    Can anyone objectively improve on this example?

    We are optimizing our results compared to NBBO. Measuring results over time will allow for changing the algo parameters as we seek the best result (on average).
     
  9. thecoder

    thecoder

    @FreeGoldRush, you can also use options "now" and convert them to stocks later when it suits...
    Just an idea...
     
  10. That's a neat idea but option spreads are too costly.
     
    #10     Nov 2, 2021
    d08 likes this.