Stock prices determined by orders

You see stock prices change a lot in an unexpected way. They surge despite the bad news or drops even with the good news. What determines the stock price? In this post, I am going to explain about this.

Basic concepts of orders

There are two important entities exchange/brokers. An exchange is where the stock trading transaction actually happens. Brokers submit the orders on your behalf. For ex. NYSE is stock exchange and Robin Hood, eTrade, TastyTrade are brokers. Think about stock traders in Nasdaq 100 years ago. There were many people calling the stock price. Nowadays, almost all the transactions are done electronically.

Now, when people want to make a transaction on the stock trading, there are basically two types of order you can make – buy/sell. With buy/sell, you can categorize with market buy/sell or limit buy/sell.

Market buy/sell means you want to buy/sell the stack based on the market price. You don’t specify any target price. You just make the transaction based on the current market price.

Limit buy/sell means you want to specify the actual price you want to buy/sell. It means you may have to wait until the other order (if you submits buy, then the other order is sell) meets your price range.

How is market price determined?

It is determined based on the orders. Buy orders are called bids. It means buyers are bidding for the money to buy the stock, showing their willingness to pay. Sell orders are called asks. It means sellers are asking for a specific target price for their stock. Naturally, asks will always be higher than bids because buyers always want to buy cheap and sells always want to sell expensive. The difference between bid/ask is called spread.

There is L2 order book that maintains all the orders. For now, I will say there are two tables, bids and asks, respectively. Bids table has all the buying orders. Asks table has all the selling orders. How are those table maintained? First come first served? No. For bids table, the highest price is always served first because it is obvious that sells will always want to sell the stock to buyers who pay the highest price. If the price is same, then first come first served. This is same for the asks table except the lowest target price is always served first in asks table.

There is also L1 order book that maintains the best bid/ask price for the stock. This is an abbreviated version. There is also Time of Sales table which maintains all the stock transactions – how many stocks are traded at which price at what time.

Example

Let’s go through with some examples. Here is an example AAPL order book. Bids table has the highest stock price at the top of the table meaning it will be the first one to be executed. Likewise, Asks table has the lowest stock price at the top of the table.

With this order book, assuming this is the only orders, the market price of AAPL is bid: $224.95, ask: $225.05. This means you have to pay $225.05 to buy the stock and you will receive $224.95 when selling the stock. In this case, there will not be any executions.

Now, let’s assume someone wants to sell the stock (2000 shares) at $224.90. It will first look at the highest bidding price which is $224.95 which is higher than seller’s ask price. There will be an execution of 800 shares and the top row will be removed. $224.90 with 600 shares become the next top row (L1 best bid). Then seller still has 1,200 shares to sell and look at the next top row. Because it still satisfies the condition, execution will be made at $224.90, 600 shares. Seller still has 200 more shares to sell but there won’t be any execution because he doesn’t want to sell lower than $224.90. Thus, $224.90 with 600 shares will now be placed in asks table (top row) and L1 best bid/ask will be updated accordingly.

This is the result order book.

Basically, stock prices are determined by supply & demand, not the news or anything else. If there is more demands in bids, prices will increase. If there is more supply in asks, prices will decrease.

Leave a Reply

Your email address will not be published. Required fields are marked *