Not all trades execute on the actual stock market. Let me repeat that – not all trades execute on the actual stock market. So where do they execute? At your broker, or your broker’s broker (a market maker).
As I discussed previously, a market has an order book which lists the prices folks are willing to buy and sell at. Your broker also has an order book, and since it costs them money to execute an order on the actual exchanges, they may try to fill it from their order book, not the market’s. This is the part that blew my mind – I didn’t know that this was possible – I figured that all trades went through the exchanges. After all, how do you know what market price is if everything’s not traded in a centralized place? The professor wasn’t completely clear on this, but I think that when a broker fills an order locally, they have to notify the exchange. Investopedia confirms that the broker has to notify the exchange (principal trading).
So, the brokerage pockets the savings from not executing the trade on the actual exchange, and may have pocketed the difference in the buy-ask spread as well. Although, since they have to report the trade, the markets stay sort of in-sync – another place computerized trading can take advantage.
I have no illusions that I would ever be able to take advantage of these small inefficiencies and timings, but I find it fascinating to read and learn about them.
Disclaimer: I’m writing these posts as a way to solidify my understanding of class materials, they may not be completely correct – and I welcome any corrections.