A twenty-day moving average crossed on a Wednesday in late October and you took the signal. Looking back at it in December you notice something that had never occurred to you: the twenty bars feeding that average spanned thirty calendar days, because the festival cluster had put two holidays inside the window, while the twenty bars feeding the same average in July had spanned twenty-six. The indicator was not misbehaving. The horizontal axis of a chart is not a calendar. It is an index of sessions, drawn with no gaps for the days on which nothing happened.
Somebody keeps a diary but tears out every page on which they wrote nothing, then binds what is left. Read it and the entries run continuously, one after another, with no sign that a fortnight in the middle is missing. Every entry is true. Counting pages will tell you nothing about how much time passed.
A daily chart is that diary. Each bar is a session in which trading happened, printed immediately after the previous one. There is no gap for the weekend, none for Holi, none for the four-day break. Everything you count in bars — a lookback, an average, a channel, a rate of change — is counted in pages, and time is doing something else entirely.
What a bar is, and what it is not
- A daily bar is one [[Trading session]]. It opens with the day’s auction and closes with the day’s closing procedure. It is not a day, and there is no bar at all for a day on which the segment was shut.
- The exchange publishes the [[Trading holiday]] list for the year in advance. So the number of sessions in a year is not an estimate — it is a count you can look up, and it changes from year to year.
- Segments do not share a calendar. Equity, currency and commodity segments have overlapping but different holiday lists, and the commodity evening session runs on some days the equity market does not trade at all.
- A share that did not trade at all still needs a bar. Different data providers handle this differently — carry the previous close forward, or omit the day — and each choice puts something false into a twenty-bar average of an illiquid name.
The bar that was built from about an hour
Once a year the exchanges hold a special session on Diwali — Muhurat trading — lasting roughly an hour, whose timings are announced each year. It is a real session: orders match, trades settle, and it produces a complete daily bar with an open, a high, a low, a close and a volume figure. It is also, in every respect that matters to an indicator, unlike every other bar in the series.
| What the bar has | What that does downstream |
|---|---|
| Roughly a sixth of a normal session’s trading time | Volume is a small fraction of normal, so any volume-relative test — a spike filter, a volume-confirmed breakout, an on-balance-volume step — registers the day as extraordinarily quiet when nothing about participation was unusual. |
| A range compressed into that hour | True range for the day is small, so an ATR that includes it is dragged down, and every stop sized off that ATR for the next fourteen sessions is slightly tighter than intended. |
| A genuine open and a genuine close | Close-based signals treat it as a full observation. A moving-average crossover can occur on a bar made of an hour’s trading, and nothing in the chart marks it. |
| A date that has in some years fallen on a weekend day | The weekly bar containing it can include a session held on a Saturday or a Sunday, which breaks the tidy assumption that a weekly bar is Monday to Friday. |
Two series, two calendars
The intermarket work in this track asks you to look at what the rupee, crude and bond yields are doing alongside the equity chart. The moment you stop looking and start computing — a correlation, a beta, a ratio series — the different holiday calendars stop being a curiosity and become an arithmetic problem.
- 1Establish which days each series actually traded
Not which days it has a row in your file. A data file frequently carries a row for a day on which the segment was shut, filled with the previous values.
- 2Compute on the intersection of the two calendars
Keep only the dates on which both instruments genuinely traded, and compute returns across consecutive kept dates. You lose a handful of observations a year and every remaining pair is real.
- 3Understand what forward-filling does before you use it
Carrying a price forward across a day the market was shut creates a return of exactly zero on that day, paired with a real move on the other side. Adding pairs in which one side cannot move drags the measured relationship towards zero — you will conclude the two are less related than they are.
- 4Say which convention you used, in the same place you keep your settings
Two people can compute the correlation between the same index and the same commodity for the same year and get materially different numbers, entirely from this choice. Neither is wrong; the undocumented one is unreproducible.
You want the correlation between a domestic equity index and a commodity that trades on some days the equity market is shut. What is the sound way to compute it?
Coaching ne kaha "bees class ka batch". Aap sochte ho ek mahina. Par beech mein do chhutti pad gayin, toh wahi bees class chhabbis din ki jagah tees din mein khatam hui — aur attendance register mein dono ek jaise dikhte hain, bees-bees. Chart ki neeche waali line bhi yahi register hai: woh session ginti hai, din nahi. Shanivaar-ravivaar ke liye koi khaali jagah nahi chhodti. Isiliye ek raat ka break lagbhag saadhe sattrah ghante ka hota hai, weekend ka chhiyaasath ghante ka, aur lambe weekend ka nabbe ghante ka — teenon chart pe bilkul ek jaise dikhte hain, jabki khulne pe hilne ki gunjaish teenon mein alag hai. Aur saal mein ek candle aisi hai jo bani hi lagbhag ek ghante ke Muhurat session se hai — aapka bees-din ka average usse baaki dinon jaisa hi ginta hai.
- The horizontal axis indexes sessions, not days, and it draws no gap for the days the market was shut.
- Twenty bars span twenty-six calendar days in a clean stretch and thirty around two holidays, with nothing on the chart to distinguish them.
- An overnight break is about seventeen and a half hours, a weekend about sixty-six and a long weekend about ninety — so gap statistics pool three different populations unless you condition on the break.
- The Muhurat session produces a full daily bar out of roughly an hour of trading, and every bar-count average treats it as an ordinary day.
- Two instruments on different holiday calendars must be aligned on the intersection; forward-filling biases the measured relationship towards zero.
Mark it done to track your progress through the curriculum.
Common questions
Short, direct answers to what people ask about this topic.
- is 20 bars on a daily chart the same as 20 days
- No — twenty bars is twenty trading sessions, and how much calendar time they cover depends on where the weekends and holidays fell. A clean stretch of twenty sessions spans about twenty-six calendar days; put two mid-week holidays inside the window and the same twenty bars reach back roughly thirty days. The indicator reports “twenty-period” in both cases, and nothing on the chart tells the two apart.
- the special one hour session held on diwali is called
- Muhurat trading. The exchanges hold this short ceremonial session on Diwali each year, with the timings announced beforehand, and it is a genuine session — orders match and trades settle normally. It also prints a full daily bar with an open, high, low, close and volume built from roughly an hour of trading, which then sits inside every moving average and range calculation for weeks afterwards.
- how many hours is the gap between friday close and monday open
- About sixty-six hours, against roughly seventeen and a half hours for an ordinary overnight break in the NSE cash market, which closes at 3:30 pm and reopens at 9:15 am. A Monday holiday stretches that to about ninety hours. On the usual square-root-of-time reasoning, a break four times as long carries roughly twice the expected opening move — yet the chart draws all three joins identically.
- how do I correlate an indian equity chart with a commodity that has different holidays
- Compute on the intersection of the two calendars — keep only the dates on which both instruments genuinely traded, and take returns across consecutive kept dates. Forward-filling a price across a day one market was shut manufactures a zero return paired with a real move on the other side, which drags the measured relationship towards zero. Whichever convention you use, record it alongside your settings, because two people can get materially different correlations for the same pair and the same year from this choice alone.
- why is 252 used for annualising volatility
- It is the conventional count of trading sessions in a year, so daily volatility is scaled by the square root of 252 to put it on an annual footing. India’s actual session count sits near that figure but moves each year with the holiday list, so the convention is a rule of thumb rather than an exact count. It stays harmless until you compare numbers — a ratio computed on one session count is not strictly comparable with one computed on another unless both are stated.