The scan is a reasonable one and it is the first thing most people build. On a five-minute chart, flag any bar whose volume exceeds three times the average of the previous twenty bars. Run it for a fortnight and a pattern appears that has nothing to do with the stocks: it fires in a burst between 9.15 and 9.30, goes quiet through the middle of the day, and fires again after three o’clock. The first instinct is that Indian markets are busy at the ends of the day, which is true and is taught in this track as the [[Volume smile]]. The second and more useful thought is that the filter cannot possibly be measuring what it was built to measure, because a filter that fires at the same times every day is measuring the clock.
Stand on a suburban platform at 9.10 in the morning and count the crowd, then compare it with the count from twenty minutes earlier. It is far bigger, every single day, and it means nothing at all. To know whether today is genuinely unusual you compare this morning’s 9.10 with the last twenty mornings’ 9.10 — and then a strike, a festival or a diverted line shows up immediately.
An intraday volume bar has the same property. Its neighbours on the chart are not its peers; the same slot on other days is. Compare a bar with the twenty bars beside it and you rediscover the timetable. Compare it with the same five minutes across twenty sessions and you find the news.
What the rolling window is actually holding
Follow the denominator literally. At 9.20 this morning, the twenty five-minute bars immediately before the current one are not from this morning at all — twenty bars of five minutes is a hundred minutes, and the session had only just opened. They are yesterday’s bars from about 1.50 in the afternoon to the close. That window contains the quiet middle of yesterday and then yesterday’s closing rush, in whatever proportion the clock happened to produce.
Volume relative to a baseline is the right idea throughout. The question this lesson adds is which baseline, once the bars are shorter than a session.
Building the right denominator
- 1Take twenty sessions of intraday bars for the stock
The same bar size you actually trade. Twenty is a reasonable [[Sample size]] for a stable profile and short enough that it still describes the stock as it is now.
- 2Group by the slot, not by the date
All the 9.15 – 9.20 bars together, all the 9.20 – 9.25 bars together, and so on. On a five-minute chart that is 75 groups of twenty observations each.
- 3Take the median of each group, not the mean
One results day or one block deal will drag a mean badly, and the profile is supposed to describe an ordinary day. The median is the cheap and correct choice here.
- 4Divide today’s bar by its own slot’s median
That ratio is the number your filter should be reading. It is comparable across the day and across stocks, which is the entire point of a relative measure.
- 5Rebuild it periodically, and after anything structural
A stock’s profile changes when it enters or leaves an index, when derivatives are listed on it, or when its free float changes materially. A profile from last year is not a description of this stock.
Why this survives so well
- It is genuinely harmless on daily bars. One session resembles another closely enough that the twenty sessions before this one are a fair comparison for this one. The construction is correct where most people learn it, which is exactly why it gets carried down to five-minute bars unchanged.
- The filter looks like it is working. It fires, it produces a list, and the list is full of stocks that really did trade heavily. Nothing errors and nothing is empty. A filter that returns plausible results every morning is very hard to doubt.
- The false positives are self-confirming. Opening bars are volatile, so some of the stocks the morning burst throws up do move afterwards — not because the filter selected them, but because it is the open. That is enough to keep anybody using it.
- It quietly converts a strategy into a different strategy. A system whose entry filter fires disproportionately in the first fifteen minutes is, whatever its author believes, mostly a strategy about the open. It will be evaluated against breakout logic and it will actually be tracking the [[Volume smile]].
- And it wastes the [[Sample size]] you thought you had. If four-fifths of the signals in a two-year intraday backtest came from the same two slots of the day, the effective sample is far smaller than the trade count suggests, and it is concentrated in the part of the session with the widest spreads.
The scan returns forty names at 9.20 and six names at 14.05
You have been running the twenty-bar relative-volume filter on five-minute bars for a month. The morning list is long and mostly familiar; the afternoon list is short and often contains a name you have not seen before.
Chai ki dukaan pe subah 120 cup bikte hain aur do baje 13. Do baje waale 13 ko subah ke 120 se taulo toh har roz ek hi jawab aayega: dopahar mein kuch nahi ho raha. Sach jaanna ho toh aaj ke do baje ko pichhle bees din ke do baje se taulo. Chart pe bhi yahi hai. Ek midcap ka aam 9.15–9.20 bar 84,000 share ka hai aur aam 1.00–1.05 bar 9,000 ka — nau guna farq, un dinon bhi jab kuch nahi hota. Aaj subah 1,50,000 hue aur do baje ke aas-paas 31,000. Purana tareeka — pichhle bees bar ka average — 9.20 pe denominator kal dopahar se uthata hai (bees paanch-minute bar matlab sau minute), toh 1,50,000 ÷ 18,000 = 8.3 guna, aur 1.05 pe 31,000 ÷ 9,500 = 3.3 guna. Slot waala tareeka: 1,50,000 ÷ 84,000 = 1.8 guna, aur 31,000 ÷ 9,000 = 3.4 guna. Ranking hi palat gayi — subah aam din tha, dopahar mein koi aaya tha. Threshold mat chhedo, denominator badlo: har slot ka apna median, pichhle bees session ka.
- On an intraday chart, the twenty bars beside this one are not its peers — the same slot on other days is.
- At 9.20 a twenty-bar rolling average of five-minute volume is an average of yesterday afternoon.
- Building a median profile per slot across twenty sessions reverses the ranking of events, and reverses it in the direction a human observer would agree with.
- The same reasoning applies to bar ranges, so a short trailing window and a fixed threshold do different work at different hours.
- The construction is sound on daily bars, which is exactly why it gets carried down to intraday bars without anyone questioning it.
Mark it done to track your progress through the curriculum.