I remember the first time that I really sat down and thought about it. Why exactly does a stock price change? Shrinking the economy and the number of shares helped. Examples starting with 10 oranges together with supply and demand arguments sparked good ideas. But, expanding a simple scenario into a full blown economy with high volumes and different order types never made any sense.
The story is not complete without considering the information contained in a limit order book. It’s the absolute best source for highlighting buying and selling power in a market in real time. The information within the data often results in more desirable entry and exits points.
A simple example of a limit order book
Suppose that each block represents one share of stock on both the bid and ask side of the market frozen in time. The volume of shares in the above plot are limit orders waiting for execution or cancellation.
Say that Frank comes along and wants to buy 5 shares using a market order. In that case, his order will be filled immediately.
Remarkably, the current quote displayed of $20,26 is not where Frank can trade- there are no shares available at that price. The quoting convention reflects the spread rather than tradeable prices.

The 5 empty colored squares on the right represents the 5 shares that Frank bought with his market order
The order is filled by sellers in a first in, first out (FIFO) process. Those who waited the longest in the order book receive the first execution.
Frank’s market order for 5 shares receives execution at two different prices. The first 2 shares fill at $20.27. The depth of market at that price is only 2 shares, forcing him to sweep the $20.27 price and move on to the next available price at $20.28.
4 total shares are available at $20.28. Because Frank only needs an extra 3 shares, he completes his total order at this level.
The best offer displayed when Frank placed the trade was $20.27, but his average fill is $27.276 (2 * $20.27 + 3 * $20.28). The slightly worse price doesn’t have anything do with slimy brokers. Slippage is the natural result of buying more shares than there are shares available.
Try making Frank a more aggressive buyer. Say he wants nine shares. Large orders receive worse fills because they suck up most of the liquidity on one side of the market.
Why A Spread Exists
Before answering this question, it is first worth understanding the difference between a quote driven and an order driven market.
Order driven market:
• Displays all of the current bids and asks across the market
• Has complete transparency
Quote driven market:
• Displays bid and ask prices from market makers, dealers, or specialists.This is the norm among retail forex brokers
• Often provides a guarantee that an order is filled
A quote driven market has more moving parts and will likely be involved in any market you wish to trade in. Therefore, it is a good idea to think about the existence of a spread in this setting.
When you post an order in a quote driven market, the dealer will either fill it with their own inventory or match you with another market participant. For this reason, part of your transaction cost goes to the dealer who has done this work for you.
In a simple model, the bid ask spread is the price that aggressive traders must pay to have their order immediately filled– think buying and selling the same security at almost the same instant. The spread is the compensation to a dealer for offering that immediacy.
A good way to think about the size of the spread is to consider a market with several competing dealers. In this case, there are two primary scenarios:
1. If the spread is too high, more dealers will enter the market to gain profit from the large bid/ask spread
2. If the spread is too low, dealers will lose money, and exit the market
These two factors ensure that the liquid market dealers make normal profits, and that spreads are of reasonable size.
Supply and Demand
The existence of a spread is quite natural and leads back to the simplicity of supply and demand. Start the argument small and work your way up! I found a great example in an article by Glenn Curtis on August 19 with the following story.
Suppose that a one-of-a-kind diamond is found in the remote countryside of Africa by a miner. An investor hears about the find, phones the miner and offers to buy the diamond for $1 million. The miner says she wants a day or two to think about it. In the interim, newspapers and other investors come forward and show their interest. With other investors apparently interested in the diamond, the miner holds out for $1.1 million and rejects the $1 mil- lion offer. Now suppose two more potential buyers make themselves known and submit bids for $1.2 million and $1.3 million dollars, respectively. The new asking price of that diamond is going to go up. The following day, a miner in Asia uncovers 10 more diamonds exactly like the one found by the miner in Africa. As a result, both the price and demand for the African diamond will drop precipitously because of the sudden abundance of the once- rare diamond.
Imagine the diamond becomes more popular. More buyers want it. More mines open, and more sellers emerge. In a rational setting, this creates a quote driven a bid ask spread. Add enough volume, and before long, you are back to the first example.