How does 2 orders match in the market

Discussion in 'Order Execution' started by cxr061, May 15, 2022.

  1. cxr061

    cxr061

    New to trading, want to know what determines a match of 2 orders in the market.

    Think of an example here:

    A stock is trading at $10, there’s an order willing to sell at $15. If I place an order to buy at $15 now, does this trade get executed right away ? Or do I need to wait till the price gradually moves into $15 before it can be executed

    This is to suppose that somebody is willing to overpay (demand), and there's someone want to sell at that exact price (supply). But if the current trading quote differs from that, Can this trade take place ?
     
  2. stochastix

    stochastix

    Read up on limit order book. It's a price time priority auction
     
  3. cxr061

    cxr061

    Haven't understood, Can you explain a little ?
     
  4. stochastix

    stochastix

  5. With sub-millisecond order arrival times, LOB's are effectively Walrasian Continuous-Time Double Auctions.

    Try googling the term.
     
    longandshort likes this.
  6. 2rosy

    2rosy

    depends on the exchange. And it's not "A stock is trading at $10" it's a stock traded at $10. there are buyers and sellers and priority. When a buyer is willing to pay the same or more than a seller (vice versa) an execution occurs
     
  7. cxr061

    cxr061

    Yes, I mean 'a stock traded at $10'. So if you are willing to match a seller's order, regardless the current stock price, the trade can be executed ?

    Is it like a real life sales example: someone is selling a product at a very high price, but I am willing to pay that, so we have a deal. The product's price in the current market doesn't interfere with our deal.
     
  8. 2rosy

    2rosy

    it is real life:p
     
  9. Here's how you normally see a quote from an exchange:

    time interval 0
    bid: 1
    offer: 1.10

    If you want to buy, you pay the offer. If you want to sell, you collect the bid.

    If you submit a market order to buy, you are taking the offer that exists at the time your order is received (there is a queue that exists as well). And vice versa to sell.

    Using the above example, say you wish to buy at the midpoint between 1 - 1.10, which is 1.05. If you place your order for 1.05 then for you to be filled you would either need 1) the market (bids and offers) to move in your favor or 2) a market maker must hit your bid. There is a queue here too.

    A continuous double auction just means people are submitting bids and offers simultaneously (double) and the trade occurs where price converges (best bid at best offer). Walrasian means orders are batched before a price is determined.

    If we go back to the quote and add size:
    total best bid bid 1 x 100
    total best offer 1.10 x 500

    And someone submits an order to buy 1000, then you know that the price will be worse than 1.10.
     
    Eikfe likes this.