1. What you will learn
By the end of this lesson you will be able to read an order book correctly, compute the cost of crossing a spread and express it as a percentage and as a daily total, explain queue priority and why a resting limit order fills at the least convenient moments, and say precisely why a backtest that assumes fills at the mid-price overstates a short-horizon strategy. This is education about market microstructure and is not advice to trade or an encouragement to trade intraday.
2. The idea explained
An order book is a list of intentions. On one side sit buy orders, ranked from the highest price downwards; on the other sit sell orders, ranked from the lowest price upwards. The highest displayed buy price is the bid and the lowest displayed sell price is the ask, and the gap between them is the spread.
That spread is a real cost, and it is paid twice. A trader who wants to buy immediately must take the ask; to sell immediately, they must hit the bid. Doing both at unchanged quotes returns them to where they started minus the spread on every unit, before any brokerage or statutory charge.
Limit orders avoid crossing the spread, but they buy that saving with two other problems. The first is queue priority: your order sits behind everyone who placed the same price earlier, and it fills only after they do. The second, and more serious, is adverse selection. A resting buy order at the bid gets filled when someone is determined to sell, which is disproportionately often just before the price falls further.
Several other features of a real book distort simple thinking. Displayed size is not all the size, because some orders are hidden or are being worked in slices. A large marketable order walks up the book, taking progressively worse prices, so the average fill is worse than the touch. Quotes move faster than a human can act, so the price you saw and the price you get differ by an amount that depends on your latency and the venue's queue.
All of which explains the single most common error in short-horizon research. A backtest that assumes every fill happens at the mid-price between bid and ask is assuming the spread does not exist, and therefore assuming a cost that is often the largest single item in the strategy's budget is zero. It also silently assumes that size was available at that instant, which for anything but the smallest order is usually untrue.
Finally, a statement that belongs in this lesson rather than a later one. Studies of individual intraday traders consistently find that the large majority lose money, and the fraction that does so grows with trading frequency, because frictions compound with every round trip.
3. The market, the regulator and the rulebook
Indian equity and derivative markets are regulated by the Securities and Exchange Board of India, the statutory securities regulator constituted by an Act of Parliament, which supervises the exchanges, brokers and clearing members and sets the framework for order handling, algorithmic trading and client protection.
The exchanges publish the market's operating rules: trading hours and session structure, order types permitted, price and time priority in matching, tick sizes, price bands and the circumstances in which trading is halted. They also publish the market-wide and client-level position limits that apply to derivatives. The clearing corporations publish margin frameworks, which for intraday positions determine how much capital a position ties up.
Costs come from several sources: brokerage from the broker's own tariff, exchange transaction charges from the exchange, and statutory levies from government notifications. All of them change. Never state a brokerage rate, a transaction charge, a tax rate, a tick size or a price band from memory; compute with an assumed figure, label the assumption, and name where the live one is published.
Worked example
4. Worked example
All figures are invented. A fictional share shows a bid of one hundred rupees and an ask of one hundred rupees and ten paise.
A trader buys one thousand units at the ask and immediately sells them at the bid, with the quotes unchanged. He pays one lakh and ten paise times a thousand, which is one lakh and one hundred rupees, and receives one lakh. The loss is one hundred rupees before any brokerage or statutory charge, purely from crossing the spread twice.
Express that as a proportion. The mid-price is one hundred rupees and five paise, so the spread of ten paise is about zero point one per cent of the price. A round trip therefore costs about zero point one per cent of notional value.
Now scale it. Suppose the strategy makes twenty round trips in a session on this size. The spread cost alone is twenty multiplied by one hundred rupees, which is two thousand rupees, against a notional turnover of about twenty lakh rupees. For the day to break even before brokerage and statutory charges, the strategy's gross edge must exceed two thousand rupees. Adding assumed charges of, say, another one thousand rupees raises the hurdle to three thousand.
Now the backtest error. A simulation that fills every trade at the mid-price of one hundred rupees and five paise records no spread cost at all, so it reports the day as two thousand rupees better than it could have been. Across two hundred and fifty trading days, on these assumptions, that is five lakh rupees of profit that never existed. This is why an apparently excellent short-horizon backtest so often fails in practice, and the failure is arithmetic rather than bad luck.
5. Common mistakes and how to fix them
The first mistake is quoting a spread in paise without a percentage. Divide by the mid-price, because a ten-paise spread means something very different on a hundred-rupee share and a two-thousand-rupee share.
The second is counting the spread once. A round trip crosses it twice, so budget both.
The third is assuming a limit order is free. It avoids crossing but introduces queue risk and adverse selection, and the fills you receive are biased against you.
The fourth is treating displayed depth as available depth. Assume a large order walks the book and estimate the average fill, not the touch.
The fifth is testing at the mid-price. Simulate at the touch or worse, include assumed charges, and if the strategy only works at mid, it does not work. Most active intraday traders lose money, the proportion rises with trading frequency, leverage magnifies losses as much as gains, past performance does not indicate future results, and a SEBI-registered investment adviser is the person to consult about an individual's own money.
Key takeaways
6. Board summary
The bid is the highest displayed buy price, the ask the lowest displayed sell price, and the gap between them is a cost paid on every crossing. A round trip crosses the spread twice, so express spread cost as a percentage of the mid-price and double it. Limit orders avoid crossing but incur queue risk and adverse selection, so fills arrive at the least convenient times. Displayed size is not available size, and a large order walks the book to a worse average price. A backtest filled at the mid-price has assumed away the largest cost in a short-horizon strategy.
Check your understanding
7. Practice and self-check
One. Bid is fifty rupees and ask fifty rupees and twenty paise. What is the spread? Twenty paise.
Two. As a percentage of the mid-price? About zero point four per cent.
Three. Buying and immediately selling two thousand units at unchanged quotes. Loss? Four hundred rupees before charges.
Four. Ten such round trips in a session. Spread cost? Four thousand rupees.
Five. What gross edge must the day produce merely to cover that? More than four thousand rupees, before brokerage and statutory charges.
Six. A backtest fills everything at fifty rupees and ten paise. By how much does it overstate the session? By four thousand rupees.
Seven. Why does a resting limit buy order fill at inconvenient times? Because it is taken by sellers who are motivated, which is disproportionately often before a further fall.
Eight. Displayed size at the ask is five hundred but you want three thousand. What happens? The order walks up the book and the average fill is worse than the ask.
Nine. Where do you find the current tick size and price bands? The exchange's own rules and circulars, cited with the date read.