order book question

Discussion in 'Order Execution' started by AdiDavid, Oct 12, 2015.

  1. AdiDavid

    AdiDavid

    Hey everyone ,

    I would like to ask how can i know where my order is placed in the order book?
     
  2. Baron

    Baron Administrator

    Your position in the order book is totally relative to the other orders sitting in the book, and since orders are constantly being entered, executed and cancelled, your position in the book is constantly changing as well.

    Orders within the book are positioned by price first, then time. So the better the price, the better the position in the book. If there are multiple orders in the book at the same price, then time becomes the priority, meaning that the order which was entered first will be executed before any of the other orders at the same price.
     
  3. rmorse

    rmorse Sponsor

    If you are asking if there is a way to query your platform to see how many shares are ahead of you on the order book, that's a good question. I don't know if he exchange offers that ability, or if there any platforms that have the ability to respond. I think it's something that the exchanges should offer, but I don't believe they do anymore. It was available when we had specialist on the floor of the New York and American Stock Exchanges.

    Bob
     
  4. Ahem, if this "Feature" is provided by the Exchanges, then it would make any low latency trading (MM like) almost trivial. Since a simple "algo" would be like:

    1) Enter a bunch of orders on the ladder.
    2) Keep Inside order only if there are enough others Orders to "lean" on.
    3) ??? (fairly simple)
    4) Profit!

    Floor specialists have the Level-3 view, which where the Specialist order order position is can be extrapolated. Which, combined with preferential execution, makes "leaning" against non-MM orders your bread and butter.

    - ex-floor trader
     
    Baron likes this.
  5. AdiDavid

    AdiDavid

    All i want to know if there is 300 limit order in some price where is my order placed in this line.
    some times the last price is your limit price but your order has not been fulfilled because your order wasn't one of the first in the line and i think that its impotent to know what is chance that your order will be fulled if the last price was your order price but didn't cross that price.
     
  6. Occam

    Occam

    The answer to your question depends on the instrument you're trading.

    For most future in the US, this is easy to answer -- the contracts only trade on a single exchange and you can tell your place in line by the book (I think -- correct me if I'm wrong).

    For US stocks, the picture is very complicated. There are many exchanges and even more dark pools, each of which has its own order types. Furthermore, you can be "queue jumped" by an internalizer or wholesaler (and unfortunately this is legal) who offers a "price improvement" of $.0001, if the other person's broker decides to go for the bait (the bait is a payment made to the broker, not to the customer). Of course this increases the spreads (and hence transaction costs) for everyone else.

    US options as I understand it have some form of queue jumping as well -- something like "broker priority" -- so that market is a mess as well when trying to determine queue position. Incidentally, IEX tried to get a "broker priority" feature into the US stock market with their exchange application, and fortunately the SEC resisted this and they took it out..for now.
     
  7. You know exactly where in the queue your order is positioned at at the time the matching engine receives your limit order. However, you will have no idea as soon as someone else cancels/modifies/adds size and new orders are entering the system. There are some exchanges in Asia where brokers and exchange members are tagged and you can see how many shares in aggregate any other exchange member has in the order book (example, you know how many shares UBS has got in the order book for a particular name) but even there you won't see a breakdown by price level.

    Forget all the above, said for fragmented equity markets like in the US. And increasingly everywhere else you also have dark pools and various other "venues" that obfuscate the picture.

     
  8. rmorse

    rmorse Sponsor

    The option markets offer "customer priority". Customer orders go in front of firm/BD orders.

    To my knowledge, neither option nor equity markets allow you to query your place on the book. Also, on the NYSE, the "members" or whatever they call them now, get a match with the order book. So even if there are 50K shares ahead of you, you won't be up next after 50K shares trade on at your price, because the NYSE members are able to do some of the volume and not be on the book restrained by time order priority.
     
  9. cjbuckley4

    cjbuckley4

    As has been mentioned, it depends on the exchange. If it is a ITCH feed, you can see your order in the updates and you'll know your exact position in the queue. That is not the case for all exchanges. CME, for example, uses an aggregated limit order book, meaning that you see only the number of orders and size at each price level. As a market maker, you will likely want to compute your expected position in the queue. This is nontrivial, and something that pretty much any HFT would consider proprietary information. Here are some clues:
    1. Since the number of orders and size is (in theory...) updated for each order, you know your upper bound on queue position when you enter the order.
    2. Your task is to decide if decreases in the size variable (cancellations) come from in front of or behind you in the queue after you place your order.
    3. Given that you can see the quote accumulation process taking place for the nearest 10 levels in the book, you can also maintain a queue (for FIFO matching products) of all the order sizes and corresponding numbers of orders between when a price level comes into view and when it leaves your view. You're out of luck on the resting orders that are there as soon as a level comes into view.
    4. Given the above queue, you know the order sizes of each order that took place between the price level coming into the sliding ten level window and now. If an order is either notably large or has a unique size among the orders in the list (which is usually an assumption because there will be resting orders you know nothing about), you can do fairly well ascertaining where in the queue it came from by matching up the sizes and changes in the number of orders variable. There are cases where this isn't true.
    5. However you choose to construct your estimate of queue position, there's of course an easy if costly way to test it: come up with an estimator, put down some one lot limit orders and compare your estimate to when you get filled.
     
    AdiDavid likes this.