Skip to main content

Quant Analytics: from scratch to pro · Indicators, honestly measured · Advanced

Chart patterns: definitions, base rates and how to test them

Head and shoulders, double bottoms and triangles are described in words, and words leave room. To test a pattern it has to be turned into an exact rule, counted, and compared with what follows any other day. Lo, Mamaysky and Wang (2000) showed one way to do this.

4 min read Reviewed Revision 1

In this lesson

  • Turn a verbal chart pattern into an exact, testable rule
  • Explain how smoothing choices decide which wiggles count as a pattern
  • Count how many variants a definition produces and what that does to false positives
  • Work out how many pattern occurrences a test needs

Read first: Does an indicator carry information? Measuring it honestly, Reading a price chart

Worked numbers

Each result is recomputed from the formula shown.

WhatFormulaResult
number of definition variants3 * 3 * 327
chance that one of 27 independent noise variants passes1 - 0.95**variants75.0%
kernel weight one step away, bandwidth 1exp(-0.5)0.607
kernel-smoothed value of 104, 100, 103(104 * w1 + 100 + 103 * w1) / (1 + 2 * w1)101.92
plain average of 104, 100, 103(104 + 100 + 103) / 3102.33
standard error with 40 occurrences0.04 / sqrt(40)0.63%
t-statistic of a 0.5% excess0.005 / se400.79
occurrences needed for t = 1.96(1.96 * 0.04 / 0.005)**2246
years needed at 2 occurrences a yearn_need / 2123

Check yourself

A double-bottom definition has 3 choices for the tolerance between lows, 3 for minimum separation and 3 for the minimum rise between them. How many variants is that, and what is the chance that at least one noise variant passes a 5% test?

3 x 3 x 3 = 27 variants. If independent, 1 - 0.95^27 = 75.0%. The variants overlap, so the true figure is lower, but not close to 5%.

A pattern appears 40 times in 20 years. After it, the 10-day return averages 0.5% more than usual, with a standard deviation of 4%. How significant is that?

SE = 4% / sqrt(40) = 0.63%, so t = 0.79. Not significant.

How many occurrences would a 0.5% excess need to reach a t-statistic of 1.96?

n = (1.96 x 4% / 0.5%)^2 = about 246 independent occurrences.

Why is a pattern drawn on a chart after the move a poor test?

The eye picks the pattern with hindsight, so every drawn example is a success by construction. A test needs a rule that fixes the pattern before the outcome is seen, and that counts every occurrence, including the ones that fail.

Key terms

Base rateBollinger BandsMoving averageAverage True Range

Checked facts

Every figure below carries how it was checked: Primary checked (read in the cited primary, official, academic or data source), Two sources agree, or Approximate (an order of magnitude only).

Sources

Informational content. Not investment advice.