Markets: A Rigorous Course

4A.1 Bars, candles and timeframes

Foundation about 20 min

Motivation

Every chart a trader looks at is a compression: thousands of trades in a session reduced to four prices and a volume. Knowing exactly what the compression keeps and what it throws away tells you which "patterns" can carry information and which are artefacts of the drawing.

4A.1.1Bars and aggregation#

Definition 4A.1bar

A bar over the interval (t−Δ,t](t-\Delta, t] is the 5-tuple (O,H,L,C,V)(O,H,L,C,V): the first trade price, the maximum and minimum trade prices, the last trade price, and the total quantity traded. On NSE the daily open is the pre-open call-auction price and, since 3 Aug 2026 for F&O stocks, the daily close is a closing-auction price (M01 · 1.2). A daily bar therefore mixes three mechanisms: an opening auction, a continuous book and a closing auction.

Aggregation If bars 1,…,k1,\dots,k tile a longer interval, the aggregate bar is

O=O1,H=max⁡iHi,L=min⁡iLi,C=Ck,V=∑iVi.(4A.1)O=O_1,\quad H=\max_i H_i,\quad L=\min_i L_i,\quad C=C_k,\quad V=\sum_i V_i. \tag{4A.1}

This is exact: a weekly bar computed from daily bars equals the weekly bar computed from trades. The converse fails: the daily bars cannot be recovered from the weekly one. Any quantity that is not a function of (4A.1), for example "the second day of the week closed above the first day's high", lives on one timeframe only.

4A.1.2Candle shapes on noise#

Definition 4A.2candle anatomy

A candlestick draws the same bar as a body from OO to CC (filled when C<OC<O) and *wicks* (shadows) to HH and LL. With range R=H−L>0R=H-L>0:

body=∣C−O∣,upper wick=H−max⁡(O,C),lower wick=min⁡(O,C)−L,\text{body}=|C-O|,\qquad \text{upper wick}=H-\max(O,C),\qquad \text{lower wick}=\min(O,C)-L,

and the three add to RR. Every named single-candle pattern is a region in the 2-simplex of (body, upper, lower)/RR plus the sign of C−OC-O, sometimes conditioned on the preceding trend. Common working definitions: a doji has body ≤0.1R\le 0.1R; a marubozu has body ≥0.9R\ge 0.9R; a hammer has lower wick ≥2×\ge 2\times body and upper wick ≤0.1R\le 0.1R, after a decline. Multi-candle patterns (engulfing, morning star, three white soldiers) are regions in the product of two or three such simplices.

Proposition 4A.1candle shapes are timeframe-free under a random walk

Let the log price within a bar of length Δ\Delta be x0+σWsx_0+\sigma W_s, s∈[0,Δ]s\in[0,\Delta], with WW standard Brownian motion. Then the joint law of

(bodyR,upper wickR,lower wickR,sign⁡(C−O))\Big(\frac{\text{body}}{R},\frac{\text{upper wick}}{R},\frac{\text{lower wick}}{R},\operatorname{sign}(C-O)\Big)

(computed on log prices) does not depend on σ\sigma or Δ\Delta.

Proof

By Brownian scaling, (WuΔ)u∈[0,1]=d(Δ Wu)u∈[0,1](W_{u\Delta})_{u\in[0,1]}\overset{d}{=}(\sqrt\Delta\,W_u)_{u\in[0,1]}. Each of O,H,L,CO,H,L,C is a functional of the path that is equivariant under multiplication by a positive constant: replacing the path by c⋅c\cdotpath multiplies body, wicks and range by cc. The ratios are invariant and the sign is unchanged. Hence the law for (σ,Δ)(\sigma,\Delta) equals the law for (1,1)(1,1).∎

Simulating 40,000 Brownian bars on a 2,000-step grid gives, for every timeframe at once: doji 9.8%, marubozu 4.6%, hammer shape (ignoring the prior-trend condition) 2.9%; mean body/range 0.47. So a chart of driftless noise shows a doji on about one bar in ten and a hammer shape about once a month of daily bars. A pattern carries information only if, conditioned on it, the forward return distribution differs from the unconditional one by more than this noise allows (M04 Definition 4.2).

4A.1.3Evidence on candle patterns#

What the tests say Candlestick charting is old (it is traced to Japanese rice markets and was popularised in the West by Steve Nison's Japanese Candlestick Charting Techniques, 1991). The careful tests are mostly negative:

  • Marshall, Young and Rose, "Candlestick technical trading strategies: Can they create value for investors?", Journal of Banking & Finance 30(8), 2006, 2303–2323, test bullish and bearish single- and multiple-candle patterns on large US stocks against bootstrap nulls in the style of Brock, Lakonishok and LeBaron (M04 · 4.7.3). Their conclusion, consistent with the authors' follow-up work, is that candlestick strategies do not create value for investors.
  • Lu, Chen and Hsu (Journal of Banking & Finance 61, 2015, 172–183) revisit the question and report that the patterns are not profitable under the Marshall–Young–Rose holding strategy. Their emphasis on how the holding rule is chosen is itself a multiple-testing warning: the same pattern can look good or bad depending on an exit rule chosen after the fact.
  • Positive results exist (for example Caginalp and Laurent, "The predictive power of price patterns", Applied Mathematical Finance, 1998, on S&P 500 stocks in the 1990s; cited from memory, not re-verified for this module), but they are sample-specific and none has the out-of-sample record a trader would need.

(The full texts of these papers are paywalled; the descriptions above rest on their abstracts and published summaries.)

The honest summary: named candle patterns are a vocabulary for describing bars, not a set of validated signals. The most defensible use is as a compact description of where in the bar's range the close sits, which is information about the balance of order flow late in the session. That quantity can be tested directly (Problem 4A.1 computes it), and it is the same one M09's Rogers–Satchell estimator uses.

4A.1.4Reading several timeframes#

Timeframes and multi-timeframe consistency Traders look at weekly, daily and intraday charts and want them to "agree". In the notation of M04 Proposition 4.1, a trend signal on timeframe kk (say, price above its 20-bar average) is a positively weighted sum of past returns with weights spread over 20k20k base periods. "The weekly and daily trends agree" is then the event that two different linear filters of the same return series have the same sign. That is a well-defined signal, and it can be tested like any other. Three facts about it follow from what you already know:

  1. Range scales like time\sqrt{\text{time}}. From M09 Proposition 9.1, E[H−L]≈22/π σΔ S=1.596 σΔ S\mathbb E[H-L]\approx 2\sqrt{2/\pi}\,\sigma\sqrt\Delta\,S=1.596\,\sigma\sqrt\Delta\,S. A weekly bar is about 5≈2.24\sqrt5\approx2.24 times as tall as a daily bar, not five times. A stop placed "below the weekly low" is roughly twice as far as one below the daily low.
  2. Signals at different horizons are positively correlated by construction, because their filters overlap. Agreement is therefore common under the null. If the daily and weekly filters each have a 50% chance of being positive under a random walk, agreement occurs with probability above 50%.
  3. Noise falls with aggregation only relative to drift. Over Δ\Delta periods the drift grows like μΔ\mu\Delta and the noise like σΔ\sigma\sqrt\Delta, so the signal-to-noise ratio of a bar grows like Δ\sqrt\Delta. This is the real reason longer timeframes "work better" for trend reading: not because the market respects weekly charts, but because the drift is easier to see over longer intervals.

Practitioner notes

  • Read bars on adjusted prices for anything that spans a corporate action (M01 · 1.10), and on unadjusted prices for anything that refers to an actual traded level (a round number, a prior day's high used as a stop). Mixing the two is a classic bug.
  • A daily NSE bar's open and close are auction prices (M01 · 1.3). On illiquid stocks the open can be set by a handful of orders, so "gap" and "opening range" statistics for small caps carry more noise than the same statistics for Nifty constituents.
  • Intraday bars for Nifty should be built from the index's own ticks or from the futures. Indices are computed from constituent last prices, so a 1-minute index bar near the open partly reflects stale constituent prices.

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.