Sub topic 8
Order Types and Execution Quality
This chapter assumes you know what stocks and ETFs are, what a bid and an ask price are, and that your broker sends your orders to a market. It covers the order types you will use, how your broker fills them, and how to judge the quality of those fills. US rules are used as the example. Other countries differ in the details.
What an order is
An order is an instruction to your broker to buy or sell a security. It has four parts:
- The security, such as a ticker symbol.
- The side: buy or sell.
- The quantity, in shares or in dollars if the broker supports fractional shares.
- The conditions: the price you will accept and how long the order stays active.
The order type sets the price condition. Choosing a type is a trade-off between certainty that the order fills and certainty about the price you pay.
The quote: bid, ask and spread
Every listed security has a bid, the highest price a buyer will pay now. It also has an ask, the lowest price a seller will accept now. The difference is the spread.
| Quote | Price |
|---|---|
| Bid | $49.98 |
| Ask | $50.02 |
| Spread | $0.04 |
If you buy right away, you pay the ask. If you sell right away, you receive the bid. The spread is a cost you pay each time you trade, even at a broker that charges no commission. Widely traded ETFs often have spreads of one cent. Thinly traded stocks can have spreads of several percent.
The core order types
Market order
A market order says "fill this now at the best available price." It almost always fills, but you do not control the price. In a liquid stock the price will be close to the quote you saw. In a thin stock, or when prices move fast, it can be far from that quote. Market orders also carry the most risk outside regular trading hours.
Limit order
A limit order sets the worst price you will accept. A buy limit at $50.00 fills at $50.00 or lower. A sell limit at $50.00 fills at $50.00 or higher. You control the price, but the order may never fill if the market does not reach your limit. It may also fill only in part.
A limit price that crosses the quote fills immediately. For example, a buy limit at $50.10 when the ask is $50.02 fills at $50.02 or better. The limit is a ceiling, not a target price.
Stop order
A stop order, also called a stop-loss, is dormant until the price reaches a trigger called the stop price. Then it becomes a market order. A sell stop at $45 is meant to limit a loss on a stock you own.
The risk is that a stop becomes a market order. If the stock gaps down overnight from $47 to $40, the stop triggers at the open and fills near $40, not $45. A stop sets when the order starts, not what price you get.
Stop-limit order
A stop-limit has two prices. The stop price triggers the order. Then it becomes a limit order at the limit price you set. This prevents a bad fill, but the order may not fill at all. In the gap example, a sell stop-limit with a $45 stop and $44 limit would trigger at the open but never fill if the stock opens at $40. You would still own the shares as they keep falling.
Trailing stop
A trailing stop sets the stop price at a fixed amount or percentage below the highest price reached since you placed it. For a 10% trailing stop, if the stock rises from $50 to $60, the stop moves from $45 to $54. It never moves down. When triggered, it behaves like a stop order. Some brokers also offer trailing stop-limit orders.
Summary
| Order type | You control | You give up | Best used when |
|---|---|---|---|
| Market | Speed of fill | Price | The security is liquid and you need to trade now |
| Limit | Price | Certainty of a fill | You care about price, or the spread is wide |
| Stop | Trigger point | Fill price | You want an exit plan and accept slippage |
| Stop-limit | Trigger and price | Certainty of a fill | You would rather not sell than sell below a floor |
| Trailing stop | A moving trigger | Fill price | You want the exit to follow a rising price |
Time in force
Time in force says how long the order stays active.
- Day: the order expires at the close of the trading day. This is the usual default.
- Good till canceled (GTC): the order stays active until it fills or you cancel it. Brokers set a maximum, often 60 to 90 days.
- Immediate or cancel (IOC): fill what is possible now and cancel the rest.
- Fill or kill (FOK): fill the whole order now or cancel it.
GTC orders can surprise you. A forgotten GTC limit order can fill weeks later, at a time when you no longer want that trade.
Extended hours
Many brokers allow trading before the open and after the close. Liquidity is thin in these sessions. Spreads are wider and prices can jump on little volume. Brokers usually accept only limit orders then. Treat extended hours as a place for limit orders only.
Fractional shares and dollar-based orders
Some brokers let you buy a dollar amount, such as $100 of an ETF, instead of a whole number of shares. These orders are often market orders executed in batches at set times, so you may not be able to pick a limit price or exact time. Check your broker's rules before you assume you can.
Execution quality
Execution quality is how well your broker fills your orders. Three measures matter.
- Price improvement: you get a better price than the quote. For example, you buy at $50.01 when the ask was $50.02.
- Effective spread: twice the gap between your fill price and the midpoint of the bid and ask at the time of the order. It measures what you actually paid, not what the quote showed.
- Speed and fill rate: how fast the order fills, and how often it fills in full.
Slippage is the difference between the price you expected and the price you got. It is larger for market orders in fast or thin markets.
Where your order goes
Your broker does not necessarily send your order to a stock exchange. It chooses a route.
Many US retail brokers send orders to wholesale market makers, which are firms that trade against customer orders. Some brokers receive payment for order flow (PFOF) from these firms. PFOF is a payment from a market maker to a broker for routing orders to it. It creates a conflict of interest, because the broker could pick the buyer that pays it most and not the one that gives you the best price. In the US, brokers must seek best execution, meaning the most favorable terms reasonably available. Some brokers do not accept PFOF. Rules differ elsewhere, and PFOF is restricted or banned in some jurisdictions.
PFOF does not prove poor execution. Market makers often give price improvement. The useful question is the outcome you measure, not the payment model.
How to check your broker
- Read the broker's SEC Rule 605 reports. US market centers publish statistics on fill speed and price improvement.
- Read the broker's Rule 606 report. It shows where the broker routes orders and what payments it gets.
- Compare your own fills with the quote at the time of the trade. Your trade confirmation shows the fill price and time.
For a long-term investor who trades a few times a year in liquid ETFs, execution differences are usually small compared with fund fees and taxes. They matter more if you trade often, trade large sizes, or trade thinly traded securities.
Worked example: measuring a fill
The code below computes slippage and effective spread for a buy order. It compares your fill with the midpoint of the quote at the time of the order.
def execution_report(bid, ask, fill_price, shares, side="buy"):
"""Measure price improvement and effective spread for one fill."""
midpoint = (bid + ask) / 2
quoted_price = ask if side == "buy" else bid
if side == "buy":
improvement_per_share = quoted_price - fill_price
effective_spread = 2 * (fill_price - midpoint)
else:
improvement_per_share = fill_price - quoted_price
effective_spread = 2 * (midpoint - fill_price)
return {
"midpoint": round(midpoint, 4),
"price_improvement_total": round(improvement_per_share * shares, 2),
"effective_spread_per_share": round(effective_spread, 4),
"quoted_spread_per_share": round(ask - bid, 4),
}
# Bid 49.98, ask 50.02. You buy 200 shares and fill at 50.01.
print(execution_report(49.98, 50.02, 50.01, 200))The midpoint is $50.00. You paid $0.01 less than the ask on each of 200 shares, so price improvement totals $2.00. Your effective spread is $0.02 per share, half the quoted spread of $0.04.
Common errors
- Using a market order on a thin stock. The fill can be far from the last price. Use a limit order.
- Assuming a stop guarantees an exit price. It does not. Gaps and fast markets cause fills below the stop.
- Setting a stop too close to the price. Normal daily movement can trigger it, and you sell at a loss before a recovery.
- Placing market orders at the open. The first minutes can have wide spreads and large moves.
- Forgetting GTC orders. Review open orders before you place new ones.
- Mistyping quantity or side. Confirm buy versus sell and the share count on the review screen.
Exercises
Exercise
You own a stock at $60. You place a sell stop-limit with a stop price of $55 and a limit price of $54. Overnight, bad news pushes the stock to open at $50. What happens to your order, and what would have happened with a plain sell stop at $55?
Show answer
The stop-limit triggers at the open because $50 is below $55, and it becomes a sell limit at $54. The stock trades at $50, below your minimum of $54, so the order does not fill and you keep the shares. A plain sell stop at $55 would trigger and become a market order, which would fill near $50. You would sell, but at a price well below $55.
Exercise
A stock has a bid of $20.00 and an ask of $20.10. You buy 500 shares at a fill price of $20.07 with a market order. What is the midpoint, the total price improvement versus the ask, and the effective spread per share?
Show answer
The midpoint is $20.05. Price improvement is ($20.10 - $20.07) x 500 = $15.00. The effective spread is 2 x ($20.07 - $20.05) = $0.04 per share. The quoted spread was $0.10.
Exercise
Your broker advertises zero commissions and receives payment for order flow. Name two ways you could check whether your execution quality is still good.
Show answer
Read the broker's Rule 605 and Rule 606 reports to see fill speed, price improvement and routing payments, and compare your own trade confirmations with the bid, ask and midpoint at the time of each trade to see your effective spread.