zlacker

[return to "Ask HN: What scientific phenomenon do you wish someone would explain better?"]
1. robert+XO[view] [source] 2020-04-27 02:51:18
>>qqqqqu+(OP)
If I buy a stock, does the price at which I agreed to buy it become the new share price on the stock exchange?

Every article on "Where do stock prices come from?" seems to just talk at a high level about supply and demand.

But where does the price come from at a nitty-gritty level? Is it an average of all existing offers or something?

Do different exchanges and stock-ticker websites have different formula for calculating share price?

If a very low-volume stock is listed at $4, and then I offer to buy a share for $100, does the NYSE suddenly start listing its price at $100?

◧◩
2. jinct+LT[view] [source] 2020-04-27 03:53:46
>>robert+XO
To understand this, you should start by understanding the limit order book, which will give you a concrete model with which you can visualize the supply and demand.

In simple terms, when you want to buy 100 shares of a stock at no more than $4, you place a limit order into the exchange’s order book for that stock. Other buyers do the same, as do sellers. The order book is a sorted structure with the orders and their sizes on each side. It may look like this:

Sell 100 @ $7

Sell 300 @ $6

Sell 300 @ $5

Buy 100 @ $4 (your order)

Buy 200 @ $3

Buy 100 @ $2

Notice the gap between the highest buy (“bid”) and the lowest sell (“offer“ or “ask”). This is called the ”bid/ask spread.” Whether we’re talking stocks or eBay or a local outdoor market, buyers always want to pay less, sellers always want to earn more, and there is always a bid/ask spread.

If instead of sticking to your $4 limit, you said “forget it, I just want the stock” you would enter a market order instead of a limit order. In doing so you’d “cross the spread” and pay $5 per share. For a trade to happen, someone has to cross the spread.

If you entered a buy order with a limit of $100 in this example, you’d still buy at $5. If you ordered 400 shares at $100, you’d buy 300 at $5 and 100 at $6. The $5 offer would come out of the order book and the $6 offer would be reduced in size.

When you think of the market as all of this upward and downward price pressure focusing around a spread, you can see that the price the market values the stock at is conceptually the midpoint between the highest bid and the lowest offer, also known as the “mid.”

As prices change, the spread’s price level moves up and down, it narrows and widens, but the price you see always at least indirectly reflects that midpoint of price interest between all buyers and all sellers. There will always be intricacies in price reporting (based on the price feed, the price you see is the last trade made, the mid, or something more complex), but if you understand the order book, you’ll have the basic idea and can build from there.

If you’re really interested, you can google how and when the various exchanges calculate and report their prices, who they make them available to directly, what vendors provide raw and aggregate views of those prices, and more. There are many flavors varying from real-time tick-by-tick reporting to end of day feeds and more.

All of them ultimately begin with what you can now visualize as an order book.

[go to top]