Markets: A Rigorous Course

15.3 Playbook 3: an intraday opening-range breakout on a stock in play (TCS, 28 August 2026)

Core about 25 min

15.3.1Prerequisites and what this playbook teaches#

Read first (essential) M05 · 5.8 (the opening-range breakout and "stocks in play"), 5.9 (cost drag, Proposition 5.7) and 5.10 (base rates of retail intraday trading), M01 · 1.2 (the session and the auctions), M04A · 4A.11.2 and M03 · 3.1.1.

For depth: M05 · 5.3–5.4 (adverse selection: who is on the other side of an opening-range breakout).

The playbook teaches intraday rules that a script can apply to 5-minute bars, the slippage and cost arithmetic that decides whether such rules can work in India, and how many ways free intraday data can mislead you.

15.3.2The setup as testable rules#

  1. Universe: the 50 stocks.
  2. Stock in play on day dd: the absolute gap between the official open and the previous close is at least 1%, and the volume of the first 15 minutes (09:15–09:30) is at least three times its average over the previous ten sessions.
  3. Opening range (OR): the high and low of the three 5-minute bars starting 09:15, 09:20 and 09:25.
  4. Signal: the first 5-minute bar from 09:30 that closes above the OR high (long) or below the OR low (short). No new entries after the bar starting 14:00.
  5. Entry: the open of the next bar, with 3 bp of adverse slippage.
  6. Stop: the other side of the OR, as a stop-market order (fill at the stop less 3 bp, or at the bar's open if it opens beyond the stop).
  7. Exit: the stop, or the close of the bar starting 15:10 (about 15:15), whichever comes first, with 3 bp slippage. Intraday positions must be closed before the broker's automatic square-off; an intraday short that is not covered becomes a short delivery (M14 · 14.17).
  8. Size: 1% risk, Q=⌊10,000/∣Pe−Ps∣⌋Q = \lfloor 10{,}000/|P_e - P_s| \rfloor, with notional capped at five times capital (an assumption about the intraday margin your broker allows; it never bound in this sample).

This is M05's opening-range breakout with a 15-minute range, applied only to stocks with news-like gaps and volume, in the spirit of Zarattini, Barbon and Aziz (2024). Their paper used a 5-minute range on US stocks; the 15-minute range here is a choice, and one of the many parameters a backtest could search over.

15.3.3The scan and the episode#

Data Yahoo 5-minute bars for the 50 stocks, which yfinance serves for about the last 60 calendar days: the files fetched on 6 Nov 2026 start at 09:15 on 12 Aug 2026. Ten sessions of history are needed for rule 2, so the first scannable day is 26 Aug 2026; the last used is 5 Nov 2026 (6 Nov was the day of the download). Daily bars and the NSE cash bhavcopy supply the official open and previous close.

Three data problems, found while building the scan

  • Zero volume on the first bar. Yahoo reports zero volume for the 09:15 bar on 98% of stock-days. The OR volume in rule 2 is therefore, in practice, the volume of the 09:20 and 09:25 bars. That is consistent across days, so the ratio in rule 2 still means something, but the absolute numbers are not the exchange's.
  • The first bar's open is not the official open. The first version of the scan took the gap from the open of the 09:15 bar. On 27 Aug 2026 that gave Bajaj Finance a gap of +1.27% (open ₹1,098.80 against a previous close of ₹1,085.00). The NSE cash bhavcopy for 27 Aug gives the official open, the pre-open auction price, as ₹1,090.00: a gap of 0.46%, which fails rule 2. The first run had picked a stock that did not qualify. Rule 2 now uses the official open, and the episode below comes from the corrected scan. (The rest of the scan's statistics are also from the corrected version.)
  • The last bars are unusable. The 15:15 bar is nearly empty, there is no 15:20 bar, and the 15:25 bar carries the closing price. Since 3 Aug 2026 the official close of F&O stocks comes from a closing auction (M01 · 1.2). Rule 7 therefore exits on the 15:10 bar. Even so, the close of that bar often equals the official close, which suggests the auction price is stamped into it; a real exit in the continuous session at about 15:15 could differ by a few rupees.

The episode The corrected scan's first stock in play is Tata Consultancy Services (TCS) on Friday 28 Aug 2026, the only stock that qualified that day:

Field Value
Previous close (27 Aug) ₹2,248.40
Official open (NSE cash bhavcopy) ₹2,272.00, a gap of +1.05%
First-15-minute volume 4.05 lakh shares against a 10-session average of 1.29 lakh: 3.14 times
Opening range ₹2,272.10 to ₹2,319.90 (₹47.80, 2.1% of the price)
Nifty that day 24,090.85 to 24,175.65 (+0.35%)

I did not find the reason for the gap and did not need one: rule 2 uses only prices and volumes.

15.3.4The plan before entry#

Thesis. A large-cap that gaps on heavy volume has information arriving; the first break of its opening range tends to continue for the rest of the day (the US evidence of M05 · 5.8; not established for India).

Trigger and entry. The 09:30 bar closed at ₹2,328.50, above the OR high of ₹2,319.90: a long signal. Buy at the 09:35 bar's open, ₹2,328.50, plus 3 bp: Pe=₹2,329.20P_e = \text{₹}2{,}329.20.

Stop. The OR low, ₹2,272.10. Risk per share ₹57.10, 2.45% of the price: a wide stop for an intraday trade, because most of the day's move had already happened inside the range.

Size. Q=⌊10,000/57.10⌋=175Q = \lfloor 10{,}000/57.10 \rfloor = 175 shares, 1R=₹9,992.501R = \text{₹}9{,}992.50, notional ₹4,07,610.

Costs (intraday rates; 15.3.6 has the lines): ₹192.43, 4.72 bp of notional, 0.019R0.019R. Slippage of 3 bp each side: ₹245, 0.025R0.025R. The trade needs about ₹2.50 a share (0.11%) to break even.

Cost drag (M05 Proposition 5.7). TCS's daily close-to-close volatility over the previous 60 sessions was 2.00%. A hold from 09:35 to 15:15 is 5 h 40 m of a 6 h 15 m session, so σt≈2.00%×5.67/6.25=1.91%\sigma_t \approx 2.00\% \times \sqrt{5.67/6.25} = 1.91\%. The per-trade Sharpe ratio needed to break even is c/σt=(4.72+6)/190.8=0.056c/\sigma_t = (4.72 + 6)/190.8 = 0.056; at 250 trades a year the Sharpe drag is 250×0.056=0.89\sqrt{250} \times 0.056 = 0.89. On a stock with a ₹57 stop the costs are small in R; the drag comes from paying them 250 times.

Expected R. The literature's backtests are on US data and are not verified here. The only number available before the trade is the hurdle: the setup must earn more than 0.044R0.044R per trade gross of costs and slippage to break even.

15.3.5Intraday log#

R is (price−2,329.20)/57.10(\text{price} - 2{,}329.20)/57.10 before costs.

Time (bar start) Open High Low Close R Note
09:15 2,272.10 2,299.40 2,272.10 2,292.30 OR bar 1 (volume reported as 0)
09:20 2,293.40 2,315.50 2,293.40 2,310.30 OR bar 2
09:25 2,310.00 2,319.90 2,307.50 2,319.10 OR bar 3: OR = 2,272.10–2,319.90
09:30 2,319.10 2,329.00 2,318.50 2,328.50 Close above 2,319.90: signal
09:35 2,328.50 2,335.00 2,324.50 2,332.20 +0.05 Bought 175 at 2,329.20. Stop-market sell at 2,272.10.
10:00 2,328.70 2,332.10 2,324.50 2,325.40 −0.07
11:00 2,326.50 2,334.50 2,326.00 2,334.00 +0.08 Day's low after entry, 2,321.00, comes at 11:40 (−0.14R)
12:00 2,330.70 2,332.00 2,330.00 2,331.70 +0.04
13:00 2,338.90 2,340.00 2,337.30 2,338.00 +0.15 Day's high after entry, 2,348.30, at 13:10 (+0.33R)
14:00 2,334.90 2,335.60 2,333.20 2,334.00 +0.08 No action: the rules have no target and no trail
15:00 2,337.60 2,340.00 2,335.60 2,339.80 +0.19
15:10 2,339.80 2,348.00 2,339.80 2,342.00 +0.22 Sold 175 at 2,341.30 (2,342.00 less 3 bp)

The NSE cash bhavcopy gives the day as open 2,272.00, high 2,348.50, low 2,263.30, close 2,342.00. The exchange's day low, 2,263.30, appears nowhere in the 5-minute bars, whose lowest low is 2,272.10: the bars miss at least one print, most likely in the first minute. An OR low taken from the exchange's own prints could have been up to ₹8.80 lower, with a smaller position.

15.3.6Exit and result#

Item ₹
Gross P&L: (2,341.30−2,329.20)×175(2{,}341.30 - 2{,}329.20) \times 175 2,117.50
Brokerage (₹20 cap on each order) 40.00
STT (0.025% of sell value) 102.43
NSE transaction charges 25.09
SEBI fee 0.82
Stamp duty (0.003% of buy value) 12.23
GST 11.86
Total costs 192.43
Net P&L 1,925.07
Result in R +0.193R

Tax (M01 · 1.8, M00 · 0.7). Intraday equity is speculative business income, taxed at the slab rate: at 30%, ₹577.52, leaving ₹1,347.55. STT is deductible as a business expense here (it already is, in the net figure). A speculative loss could be set off only against speculative income, and carried forward four years.

15.3.7Post-mortem#

Execution. No rule was broken. The trade made 0.19R, which is small: TCS had already moved from ₹2,272 to ₹2,320 inside the opening range, the signal came at the high of the first 20 minutes, and the stock then went sideways for five hours. The stop was 2.45% away, so the day's remaining 0.5% was only 0.2R. A 5-minute range would have given an earlier entry and a tighter stop; that is a different rule, and choosing it now would be fitting to one day.

Data, again. The episode survived three data defects only because the scan was checked against the exchange's files. Every intraday backtest on free data should reconcile its opens, closes and volumes with the NSE bhavcopy before trusting a single number.

What the statistics say. The corrected rules find 75 stock-days in play on 27 days between 26 Aug and 5 Nov 2026; 56 of them produced a trade.

Slippage per side Mean R (net) s.d. tt Win rate
0 bp +0.200 0.776 1.92 55.4%
3 bp (base case) +0.165 0.760 1.63 53.6%
10 bp +0.090 0.725 0.92 51.8%
18 bp +0.010 0.691 0.11 50.0%
20 bp −0.009 0.683 −0.10 44.6%

Four cautions before reading this as an edge. (i) Twelve weeks, one regime, and a strong rally at the end (the Nifty rose from 22,600 on 23 Oct to 24,536.60 on 5 Nov). (ii) Trades on the same day share the market's move and are not independent; 56 trades on 27 days is closer to 27 observations than to 56. (iii) The rule is one of many variants (range length, gap and volume thresholds, exit time), and M04 · 4.6 applies. (iv) The result is fragile in slippage: it vanishes at about 19 bp per side, and in a fast opening on a stock with news, 19 bp is not extreme.

M03 Corollary 3.1.2 with E=0.165RE = 0.165R and s=0.76Rs = 0.76R needs 85 trades for t=2t = 2 in expectation and 171 for 80% power: about 37 weeks at this scan's rate. That is fast by the standards of 15.1 (M05 · 5.9: intraday edges are quicker to verify), but free 5-minute data covers only 60 days, so you must store bars yourself as you go. Set the result beside the base rates of M05 · 5.10: SEBI's FY23 study found 71% of individual intraday traders in the cash segment lost money, and in Taiwan fewer than 1% of day traders earned predictable net returns. A prior of a few per cent that a given intraday rule is real is reasonable, and a tt of 1.6 moves it very little (Problem 15.6).

15.3.8Do it in the simulator#

Open Simulator → New order on a trading day, before 09:30.

  1. At 09:30, list the Nifty 50 stocks whose official open is at least 1% from the previous close (the exchange's pre-open result, not a chart's first bar), and whose first 15 minutes traded at least three times their usual volume. Write the list down with the time.
  2. For the first stock on the list (RELIANCE.NS if the list is empty, as practice only), enter a paper stop order one tick above the OR high (or below the OR low), with the stop-loss at the other side and QQ from (3.23). Enter a time exit at 15:15.
  3. Log the fill price against the trigger: that difference is your slippage. After 20 trades, compare your average slippage with the 3 bp assumed here and recompute the table above with your number.

See it live: a market news feed such as https://oicharts.com/news shows why a stock may be in play before 09:30; whether it qualifies is still decided by the exchange's pre-open result and the volume rule.

Data lab

Replay: TCS opening-range breakout, 28 August 2026 (daily context)

Replay of Playbook 15.3. The data API serves daily bars, so this replay shows the trade on the daily chart; the intraday path is in the 5-minute log of 15.3.5 (entry 09:35, low after entry 2,321.00 at 11:40, high 2,348.30 at 13:10, exit 15:15). Entry and exit fall on the same daily bar.

Questions

  1. On the daily bar, how much of the day's range (2,263.30 to 2,348.50 on the NSE bhavcopy) was available to the trade after 09:35? Express it in R.
  2. Recompute the trade with a 5-minute opening range (09:15 bar only: 2,272.10 to 2,299.40). When does the signal come, where is the stop, and what is the R-multiple at 15:15? Why is choosing this version after seeing the result not allowed?
  3. Using 15.3.7's table, what slippage per side would turn the 56-trade sample's mean to zero, and how would you measure your own slippage?

Create a free account

Reading is open to everyone. An account keeps your progress, answers, notes and code drafts, and gives you the study plan, the journals and the simulator. Running code needs an account approved for it.