Most systematic investors backtest on clean, frictionless assumptions: market orders fill at the mid-price, your signal executes instantly, and the universe resets for the next trade. Reality is messier. Your market order executes against a live order book where the last traded price might be 50 paise away from where you execute. Your systematic rebalance happens during pre-open, where market orders don't exist. Your position size exceeds 5% of average daily volume, meaning impact cost eats your alpha before your signal does anything.
This module walks through the plumbing of the NSE, from order matching to settlement, so that when you build systematic strategies, you build for the market that actually exists, not the theoretical one in your backtest.
The order book: price-time priority
The NSE NEAT (National Exchange for Automated Trading) system is built on one core principle: price-time priority. At any moment, the exchange maintains an order book with bids (buy orders) and asks (sell orders) stacked by price level. At each price, orders are matched in the sequence they arrived.
Price priority means the highest bid and lowest ask always execute first. Time priority means among orders at the same price, the oldest order executes first. This is legally simple and computationally fast | the exchange doesn't need to know order size, profitability, or strategy. It just matches top-of-book to oldest order at that level.
Consider Reliance on the NSE at any given moment:
- Bid: ₹2,450.05 (best buyer willing to pay)
- Ask: ₹2,450.10 (best seller willing to accept)
- Bid-ask spread: ₹0.05 | the friction cost of immediacy
If you place a market buy order, you execute at ₹2,450.10 (the ask). If you place a limit buy order at ₹2,450.05, you join the queue of buyers at that price and wait for sellers to come down. If a seller arrives and agrees to ₹2,450.05, you execute | assuming you arrived before other buyers at ₹2,450.05.
Market depth is how many orders sit at each price level. Retail traders see only the 5 best bid and ask levels on platforms like NSE website or broker terminal (Level 1 data). Systematic investors subscribe to Level 3 market data to see the full order book depth. The more depth visible, the better you can estimate the true supply and demand pressure for an order.
Market orders vs limit orders represent a fundamental choice for systematic investors:
Tick sizes and lot sizes | the grid your strategy operates on
The NSE doesn't allow arbitrary pricing. Prices must move in fixed increments called tick sizes. For equity stocks, the tick size is ₹0.05 | your limit order on Reliance must specify prices like ₹2,450.05, ₹2,450.10, ₹2,450.15, etc. You cannot place an order at ₹2,450.073.
The NSE reviews tick size policy quarterly (NSE circular CMTR67133 documents the framework). Most stocks trade with the ₹0.05 tick. Very high-priced stocks may have ₹0.50 or ₹1 ticks. Very low-priced stocks may have ₹0.01 ticks. The idea: the tick should be small enough to allow price discovery but large enough to be economically meaningful.
Lot size is the minimum unit you can trade. For equity stocks, the lot size is 1 share | you can buy or sell 1 share at a time. But for derivatives (F&O), lot sizes exist to maintain contract sizes above SEBI's minimum contract value of ₹15L.
- Nifty futures: Lot size 25 (revised from 75 in Nov 2024) | so a Nifty position is always in multiples of 25
- Bank Nifty futures: Lot size 30 (revised from 15 in Nov 2024)
- SENSEX futures: Lot size 10
These lot size revisions matter for retail systematic investors. If you built a strategy that sizes positions based on expected volatility, and the Nifty lot size changed from 75 to 25, your position sizing calculations become stale | you might now trade positions 3x larger than your model predicted.
- Tick size
- Minimum price increment on the exchange. For NSE equities, ₹0.05. Prices must move in multiples of the tick size.
- Lot size
- Minimum trading unit. For equities, 1 share. For F&O, determined by SEBI minimum contract value (₹15L), affecting how many contracts you must trade.
- Contract value
- Underlying price × lot size. SEBI mandates minimum ₹15L contract value to maintain market efficiency. Lot sizes adjust as underlying prices change.
- Market depth
- Number of orders available at each price level. Level 1 shows 5 best levels; Level 3 shows complete book. Greater depth indicates tighter spreads and better execution conditions.
The trading day: pre-open, continuous, and closing sessions
The NSE trading day isn't continuous from 9:15 AM to 3:30 PM. It's actually three distinct sessions, each with different order types and matching logic:
Continuous (9:15 to 15:30): Price-time priority matching. Market orders allowed. Standard session for systematic traders.
Close Auction (15:40 to 16:00): Call auction to set official closing price. Used for portfolio rebalancing at close.
Pre-open session (9:00 to 9:15): You enter orders from 9:00 to 9:08. The exchange collects all bids and asks without matching them. At 9:08, the exchange runs a call auction algorithm: it finds the price that clears the maximum volume. All orders execute at that single price. Then there's a 3-minute buffer (9:12 to 9:15) before continuous trading starts.
Why no market orders in pre-open? In a call auction, all orders execute at a single price. There's no "best ask" to execute against, so market orders have nowhere to go. You must use limit orders in pre-open.
Continuous session (9:15 to 15:30): Standard price-time priority matching. Your market orders execute against the best ask/bid. Your limit orders join the queue. This is the session most systematic strategies operate in.
Closing session (15:40 to 16:00): Another call auction. Used for portfolio rebalancing at close | you want to know the exact closing price for mark-to-market. Many systematic rebalancing models use close prices, so this session is important for accurate backtest simulation.
Circuit limits: the safety nets
Exchanges impose circuit limits (also called circuit breakers) | automatic trading halts when price moves exceed defined thresholds. These exist to prevent panic cascades and give humans time to reassess during extreme volatility.
- Stock-level circuits: Trading halts for 10 minutes if a stock moves ±2%, ±5%, ±10%, or ±20% from the previous day's close. The exchange sets these thresholds. A ±20% move triggers the maximum halt.
- Market-wide circuit breaker at 10%: If Nifty drops 10% from the reference price (usually the previous close), trading halts for 45 minutes market-wide.
- Market-wide at 15%: A second Nifty drop of 5% more (to 15% total) triggers a 1 hour 45 minute halt.
- Market-wide at 20%: A third drop of 5% more (to 20% total) halts trading for the entire day.
Real example: On March 23, 2020, during the COVID-19 market crash, the Nifty hit the lower circuit limit twice in the same week. On that day, the 10% circuit breaker triggered at market open, followed by a 45-minute halt. When trading resumed, selling pressure continued, triggering the 15% circuit breaker | a 1 hour 45 minute halt. Only the 20% breaker kept it from being a complete trading halt.
For systematic rebalancing, circuit limits mean your orders may not fill. If you have a rebalance signal on a day the market hits circuit limits, you need contingency logic: do you execute a partial rebalance on the open side (sell if you need to buy)? Do you carry over the order to the next day? Do you skip rebalancing entirely if volatility is too high?
T+1 settlement: what happens after you trade
When you execute a trade at 10:15 AM, the settlement doesn't happen instantly. It happens on T+1 | the next business day.
- T+0 (same-day settlement): Available for 25 eligible stocks on BSE (optional, not mandatory). Instant settlement means your shares credit to your demat account by evening. Margin implications: you can use the same capital twice in one day. Rarely used by retail investors due to margin requirements and settlement bank participation. Nifty is not T+0 eligible | only on BSE's specified list.
- T+1 (next-day settlement): The standard since January 2023 for all equity stocks on NSE and BSE. Mandatory. Shares credit to your demat account the next business day by 10 AM. Cash credits from the buyer's account are in the clearing bank.
The settlement chain for T+1 works like this: Trading (execution) → Clearing (NSCCL verifies both sides) → Settlement (NSDL/CDSL credit shares to demat, clearing banks move cash) → Demat credit (share appears in your demat account next morning).
For systematic strategies, T+1 matters because:
- Early pay-in: You can settle earlier (pay in before T+1 for same-day or next-morning settlement) if you have margin availability. This is used by high-frequency strategies.
- Margin implications: You can't use the same capital twice in T+1 (unlike stocks like US equities which are T+2). If you sell ₹10L of stock on Monday, that ₹10L isn't available in your cash account until Tuesday 10 AM. If your strategy rebalances daily, you need sufficient capital buffer or margin facility to cover unsettled proceeds.
Impact cost: the hidden price of size
The NSE publishes impact cost data quarterly for Nifty 50 stocks. Impact cost is: how much worse than the ideal price does an order of size X fill?
Example calculation: Imagine you want to buy ₹10L of HCL Technologies. The current mid-price (average of best bid and ask) is ₹3,200. The ideal execution would be ₹3,200. But your ₹10L order is large relative to the order book. When you execute, you exhaust the ₹100 asking at ₹3,200, then have to buy ₹50 more at ₹3,200.05, then ₹50 more at ₹3,200.10. Your average fill price is ₹3,200.06, not ₹3,200. The impact cost is ₹0.06 | which seems tiny until you realize it's a 0.02% cost on a ₹10L order.
But consider a mid-cap stock with thinner liquidity. A ₹10L order might consume the first 5 price levels. Your average fill might be ₹3,201.50 instead of ₹3,200. Now your impact cost is ₹1.50 | 0.05% | noticeably larger.
NSE publishes impact cost for a ₹1L order on each Nifty 50 stock. For systematic investors managing portfolios larger than ₹50L, you need to extrapolate this to your order size. As a rule of thumb:
Rule of thumb: If your order is >5% of average daily volume, impact cost will substantially eat your alpha. At >10% of average daily volume, impact cost alone may exceed your expected alpha. Optimize by splitting orders across multiple auctions, using limit orders with time buffers, or avoiding trading entirely if execution friction is too high.
RupeeCase factors impact cost into backtest simulations for larger position sizes | showing you what your strategy actually returns after accounting for the microsecond-by-microsecond effect of impact costs.
Why I wrote this module
Sources & further reading
Quick check, Module 10.1
Slippage Impact Cost
Rough impact-cost estimate using square-root liquidity model. Inputs in INR. Calibrated to NSE liquidity bands.