Hacker News new | past | comments | ask | show | jobs | submit login
An Introduction to Limit Order Books (machow.ski)
42 points by is0tope 5 days ago | hide | past | favorite | 15 comments

What happens when a buy limit @10 order meets a sell limit @10.5 order?

I hope I understand your question, but it should not be possible for them to "meet" or to trade. If two such orders were submitted, and there were no other orders in the book, then these orders would be both passive.

IE. They would both sit there with the best bid at 10 and the best ask at 10.5.

If these orders were the other way around (buy at 10.5 and sell at 10) then what would happen would depend on which order was submitted first.

If the buy was submitted first, then the sell order would be aggressive. This would result in a trade at a price of 10.5 (the price of the passive order) which would be a better price for the sell order.

If the sell order was first, then the trade would happen at 10 which would be a better price for the sell order.

I'm sorry that I got the prices reversed. Your explanation makes total sense to me and thank you.

No problem. I can't seem to edit it now, but in the last example it's the buy order that gets the better price, not the sell order.

Is market order slippage risk still practical? In the case of stock trading liquidity appears to be abundant for most stocks.

Why would you ever do a market order anyway? Just put your limit order in at a price that factors in the maximum slippage you want. All exchanges should be performing best execution.

I think you and OP are talking about two mostly different things. “Market order” is an overloaded term. One definition is a specific order type that instructs the exchange at whatever price is immediately available. The other is an order that’s priced to immediately execute without resting in the book.

By definition all of the former are contained in the latter category. But not vice versa, with the set difference being “marketable limit orders”. That is orders with instructions to not trade beyond a set price, but where that price is set wide enough that we expect the order to cross the market and fill at arrival.

I think what you’re saying is why use a pure market order instead of a marketable limit. And there I mostly agree with you. There’s not much argument besides convenience of not having to fill in the limit price.

But in terms of market impact, marketable limits are no different than market orders. In fact to everyone else, they look identical in the data feed.

This post is correct. Also in addition, there is a factor I did not really cover which is the round trip time between you and the exchange. During that time the best bid/ask can move away from you, and even though you sent a marketable/aggressive order, it may now not be aggressive. The examples here are in a perfect world, but in reality it's a bit more complicated!

I used to do limit orders - try to save some money by buying a stock when it's at lowest during the day.

Then I read a book by Fischer called "Common Stocks, Uncommon Profits"which suggested that when you have a long investment horizon, say 5-10 years, and you have done the research to have the confidence, a limit order gives you no real benefit.

Say a stock is $100 today. In 5-7 years you expect it to be $500, the benefits of doing a limit order are less significant.

There are also costs associated with placing non-marketable limit orders[1], and nasdaq has found that after factoring in the costs/benefits into account, the overall cost is pretty much the same. In that case you might as well place a market order and save yourself the time.

>the “benefits” of waiting increase roughly in line with the risks of not getting a fill. That seems to indicate the market is especially efficient at pricing liquidity.

[1] see: "chart 4" https://www.nasdaq.com/articles/an-interns-guide-to-trading-...

For someone buying ETF's monthly or something similar this is mostly correct. Your 100 share order is unlikely to move the market, and the time you spent trying to passively set up the order, and then babysit it is unlikely to be worth the time investment.

In crypto markets the difference between maker and taker fees can sometimes make it worth waiting, but you need to keep in mind that every minute you spend not having made the trade, is price risk that you are exposed to. And saving 5bps on fees might lead to you losing 50bps in price movement.

For retail traders? No. In all likelihood your order never even hits the lit exchanges. Instead it’ll be internalized by a wholesaler.

For even medium sized institutional funds? Absolutely. Think of it this way. If market impact didn’t exist for anybody, then we’d expect prices to never move.

It really depends on the stock and the liquidity available. I'm certain if you fire a large sized market order into some penny stock you will slip for sure. For the big liquid stocks I agree, it is not as important, especially for small orders.

Off-topic, but would love to know what tool the author used to build that site/page. Is it some sort of platform/tool, or something they wrote up themselves? I really liked the side bar table of contents, along with the general format.

I wish I was that good at design :).

The tool I used to make the page is a static site generator called Hugo. The theme I used is called Cactus (https://github.com/monkeyWzr/hugo-theme-cactus). I made some minor modifications, but I really liked the style when I saw it. That reminds me that I need to put a link at the bottom to the author.

EDIT: I also highly reccomend using a static site generator for a blog. I used to use wordpress and I found it to be very cumbersome.

Applications are open for YC Winter 2022

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact