Transaction costs for most stock investors and traders can be broken down into two categories: commissions and slippage. Commissions are fees that brokers charge to implement trades; slippage is the difference between the price as listed and the price you actually pay. Slippage, in turn, can be broken down into three categories: spread costs, market impact costs, and volatility costs. In this article I’ll skip over commissions (which I will deal with in another article) and advise you how to quantify and minimize your slippage.

**Spread Costs**

At any moment during a trading day, there will be two prices listed for a stock: a low price, the “bid,” which is the highest price a market maker will pay for the stock, and a slightly higher price, the “ask,” which is the lowest price a market maker will accept for the stock. If you place a market order to buy the stock, it will be filled at the current ask price, assuming there are sufficient shares to fill it at that price; if you place a market order to sell the stock, it will be filled at the current bid price, assuming there is sufficient demand at that price. (If there aren’t enough shares or demand available, some of your order will probably get filled at a worse price.) For stocks priced $1.00 or higher, the minimum bid-ask spread is $0.01; for stocks priced less than $1.00, the minimum bid-ask spread is $0.0001.

There is a very simple way to avoid the bid-ask spread altogether, and that is to use limit orders. A limit order tells the market maker that you won’t pay more than a certain amount for a stock, or that you won’t sell a stock for less than a certain amount. You’re effectively setting your own bid or ask; if you place a limit order between the bid and the ask, you’ll immediately see that the bid has risen or the ask has fallen to take your order into account. You’ve become a market maker yourself. But the drawback to using limit orders is that they might not get filled, or may only get partially filled (sometimes incurring a full commission on a sale of only one share), and the wider the bid-ask spread is, the less likely that a limit order placed far from the market order fill price (the ask if you’re buying, the bid if you’re selling) will be filled. A market order, though it pays the spread, is guaranteed to be executed unless there simply isn’t enough availability or demand to fill it at any price.

While limit orders will effectively eliminate the bid-ask spread, the actual price at which a limit order is executed will be much more in your favor with a low spread than with a high one. Let’s say you want to buy two stocks, both of which have closing prices of $5.00 a share. Stock A has an average closing spread of $0.02 and stock B has an average closing spread of $0.20. Now let’s say you place pre-open limit buy orders for both stocks at $4.98. The chance that Stock A will get filled at that price at some point during the day is probably about 50%; the chance of a fill at that price for Stock B is far lower.

How much of the bid-ask spread are you actually paying? One could say that a *fair *price for a stock is halfway between the bid and the ask. Given that assumption, you’re paying at least half of the bid-ask spread with a market order.

Spread costs vary widely during any given trading period, and are usually significantly higher for low-liquidity stocks. I estimate that if you use only limit orders and use them wisely, adjusting them in order to get a fill, you’ll end up effectively paying about one-quarter of the bid-ask spread per transaction. Some of your limit orders will get filled at a much better price and others will run away from you and you’ll end up paying more than you would have if you’d placed a market order. If you never adjust your limit orders, you’ll avoid paying the bid-ask spread altogether, but you also won’t get a lot of fills. If, on the other hand, you use only market orders, you’ll occasionally pay more than half the bid-ask spread if you get some partial fills at the bid or ask and then go beyond that for a complete fill, and you’ll never pay less than half the spread. Some brokers, particularly Interactive Brokers, offer other types of orders that may decrease what you’re paying or will be more aggressive about getting a quick execution. I personally have found them less effective than placing limit orders and adjusting them through the day, but that’s based on a very small sample of trades.

It’s important when trading to have an idea of the average bid-ask spread as a percentage of the stock’s price. There aren’t many sources for this information. You can easily find the current, up-to-the-minute bid-ask spread on Yahoo Finance or from most brokers. You can very roughly estimate the average bid-ask spread using information about open, close, high, and low prices; price volatility; and volume. But only Portfolio123 and my Seeking Alpha Marketplace subscription service will give you the average or median closing bid-ask spread of a stock over the past month. Getting the average spread over the past few weeks may influence your decision as to whether or not to buy the stock. If the average bid-ask spread is, say, 4% of the stock’s price, that means that you’re likely to give up 1% of the stock’s price when buying it and another 1% when selling it if you use limit orders; and if you use market orders, the cost will be at least double that. Because of this cost, you might want to eliminate from consideration stocks with high *average* or *median *bid-ask spreads, even if the *current* spread is very small.

**Market Impact Costs**

Placing a relatively large order will almost inevitably move the price away from you. This is called market impact. There are dozens of complicated mathematical formulas, all empirically tested and published in academic papers, for estimating market impact. The one I like best is a simple one: take the square root of the ratio of the amount you buy to the median daily dollar volume, and that’s the market impact in terms of the percentage of your transaction. So if you’re buying 25% of the median daily dollar volume, you take the square root of 25% and get 50%, so your market impact will cost you about 50 basis points; if you’re buying 4% of the median daily dollar volume, the square root of 4% is 20%, so your market impact will be about 20 basis points. This is, of course, only a very rough estimate; some people multiply this cost by the relative volatility of the stock, but I fail to be convinced that price volatility correlates with market impact.

Some people spread out their orders over several days to avoid market impact, but as this formula makes plain, that’s not a wise move. Buying 4% of the daily dollar volume per day over six consecutive trading days will cost you 20 basis points per day, which is more than twice as much as buying 24% of the daily dollar volume in one day, which will cost you 49 basis points. I’ve seen this play out in real time. Placing moderate sell orders every day for a week is going to drive the stock price farther down than placing one very large sell order on one day.

If you place an order greater than the median daily dollar volume of a stock, it probably won’t get completely filled, and you’ll end up paying about 1%, according to the above formula. You’ll then have to fill it the next day, and pay an additional market impact cost.

**Volatility Costs**

This is not a cost that most people take into consideration as it’s very difficult to estimate. Essentially, it’s the cost incurred by the stock’s price movement between the time you place the order and the time it’s executed. If you place orders before the market opens, this cost can be very high, but it can also work in your favor. For example, let’s say a stock closes at $4.60 and you place a limit order to buy it at $4.57 the next day. If you don’t get the order filled and the price goes up to $4.65, you’re incurring a $0.05 volatility cost. On the other hand, if the market open ask price is $4.55, you’ve saved a nickel per share.

It’s very important to realize that you cannot take advantage of a stock’s volatility by using wisely placed limit orders. You might think that you could come up with an algorithm that will get a better fill, on average, than you would have gotten if you’d just been filled at some random point in the day. Indeed, that’s what I myself have thought for years.

Here’s the flaw in the logic. Let’s say you invent an algorithm that, on average, gets better fills than a fill at some random point during the day. It shouldn’t be too hard, you reason.

The next step, then, would be to *pair *trade. You’d have two different accounts. One would buy a particular stock (one with a very low bid-ask spread) on one day and sell it on the next, and the other would sell the stock on one day and buy it the next. Because your fills will be better, on average, than random, you’ll be able to buy low and sell high almost every day. If you get a sell fill at price *s *and a buy fill at price *b*, every day you’ll be making, on average, √(*s/b*) - 1. If you average just 10 basis points a day, you’ll walk away with 28.6% a year, and if you make 50 basis points a day, you’ll make 251% a year.

It seems almost crazily easy. *Of course* your algorithm will, on average, get higher fills for sells than it will for buys. Why wouldn’t it?

Because of history. In the entire history of the stock market, nobody has actually been able to do this. And it’s highly unlikely that nobody has actually tried it.

An unfilled buy order just sits there until you adjust it. And you may have to keep adjusting it upward and upward until it gets filled. An unfilled sell order just sits there until you adjust it. And you may have to keep adjusting it downward and downward until it gets filled. If a buy order gets filled close to market open, the stock may keep plunging downward for hours. If a sell order gets filled close to market open, the stock may continue to increase in price for hours.

Even if your algorithm works 70% of the time—even if 70% of the time your sell fill is higher than your buy fill—you’re not going to be able to predict the day’s high and low prices, and the money you lose on the other 30% will always be approximately equal to the money you make on your 70%.

Volatility costs may be significant, and may be either positive or negative (costs or benefits). But they’re going to always average out, in the long run, to zero, simply because of the unpredictability of price movements.

**Estimating Slippage Costs**

Here are the formulae I use. Let’s take the bid-ask spread divided by the closing price every day over the last six weeks. Let’s call *b *the median of those percentage spreads. Let’s call *d *the median daily dollar volume of the stock over the last six weeks. And let’s call *a *the amount of money you’re going to buy or sell in the stock.

For limit orders, your slippage cost will be approximately *b/*4 + 0.01 * √(*a/d*). For market orders, it will be approximately *b/*2 + 0.01 * √(*a/d*). For the round-trip cost of buying and selling the stock, double that.

If your order is larger than the median daily dollar volume, you’re going to have to execute it over several days, which will cost you much more in terms of market impact. In that case, you’d want to remove the square root sign from the above formulae, since the "*a/d*" in the formula will become approximately 1 on each day, and the number of days will be calculated by dividing *a* by *d*.

Here are the slippage costs calculated for twenty randomly chosen tickers (using data from Portfolio123).

**How to Minimize Slippage Costs**

The easiest way to avoid paying the bid-ask spread is to use limit orders.

One extremely simple way to avoid slippage altogether is to set a limit order for a stock at the price you’re willing to pay for it (or the price you’re willing to sell it for), make it good until cancelled, and simply walk away. Sometimes you’ll get filled, sometimes you won’t.

If I’ve decided to buy or sell a stock, I want to do so within a day or two. A good-until-cancelled limit order isn’t fast enough or enough of a sure thing for me. So I place limit orders before the open and adjust them over the course of the day in order to get a fill. If the price moves away from me too much, I might abandon the order or wait until the next day.

Many traders use technical analysis to find a point at which to buy or sell. They might watch a stock’s chart and decide on the right time, or they might use an algorithm to adjust order placement based on a stock’s price movement. In any case, wise traders will use limit orders rather than market orders for this purpose.

But using limit orders isn’t the only way to minimize slippage costs. The other way is to avoid placing large orders of stocks with high spreads and low volume. By factoring your slippage costs into your strategy, you can save yourself a lot of money.

Here’s how I go about doing this. When I design a system for buying and selling stocks, I calculate the average transaction slippage. I then use Portfolio123 to simulate that system, backtesting it, and input that average slippage into that simulation. If I modify the strategy, sometimes the average slippage cost will go down, and sometimes the number of transactions involved will go down. I can see, through backtesting, the impact of the modification, and can proceed accordingly.

I also limit the universe of stocks that I buy to those whose transaction costs are under a certain limit. And then when I actually buy a stock, I’ll adjust the amount I buy according to its slippage cost, investing less of my money in stocks with high slippage.

**Don’t ignore slippage **

Beginning investors often pay no attention to slippage costs, using market orders for quick fills, buying low-volume stocks without paying attention to spread and market impact costs, trading more frequently than necessary, and/or believing that they can outsmart the market by getting better fills with technical analysis or clever algorithms. I have fallen into all these traps myself, and still do on occasion. Slippage costs will dramatically affect your overall rate of return if you’re not careful. It pays to consider them in every step of your investing process.

CAGR since 1/1/2016: 39%.

My top ten holdings right now: PCOM, TGA, ARC, GSB, DLHC, NATR, AVID, KMDA, PCMI, PERI.