. Note that there were norectangle bottoms detected for CTX during this period, so for completenesswe substituted a rectangle bottom for CDO stock that occurred during thesame period.In each of these graphs, the solid lines are the raw prices, the dashed lines^ h , the circles indicate the local extrema, and theare the kernel estimators mvertical line marks date tl 1, the day that the ®nal extremum occurs tocomplete the pattern.Casual inspection by several professional technical analysts seems tocon®rm the ability of our automated procedure to match human judgementin identifying the ®ve pairs of patterns in section 2.3.1. Of course, this ismerely anecdotal evidence and not meant to be conclusive ± we provide these®gures simply to illustrate the output of a technical pattern-recognitionalgorithm based on kernel regression.
Advanced Trading RulesHead-and-Shoulders CTX 92±96 Days 342±379363534
Price
3332313029280
15
10
5
20Day
25
30
35
40
(a) Head-and-shouldersInverse HS CTX 92±96 Days 748±7852524.52423.523Price
58
22.52221.521
0
5
10
15
20Day
25
30
35
(b) Inverse head-and-shouldersFigure 2.3 Head-and-shoulders and inverse head-and-shoulders
40
Foundations of technical analysisBroadening Top CTX 92±96 Days 22±5955
54
Price
53
52
51
50
490
5
10
15
20Day
25
30
35
40
35
40
(a) Broadening topBroadening Bottom CTX 92±96 Days 865±9023231.53029.5
Price
2928.52827.52726.50
5
10
15
20Day
25
30
(b) Broadening bottomFigure 2.4 Broadening tops and bottoms
59
60
Advanced Trading RulesTriangle Top CTX 92±96 Days 262±29934.53433.533
Price
32.53231.53130.53029.50
5
10
15
20Day
25
30
35
40
35
40
(a) Triangle topTriangle Bottom CTX 92±96 Days 478±515
43
42
41
Price
40
39
38
37
360
5
10
15
20Day
25
30
(b) Triangle bottomFigure 2.5 Triangle tops and bottoms
Foundations of technical analysisRectangle Top CTX 92±96 Days 479±51643
42
41
Price
40
39
38
37
360
5
10
15
20Day
25
30
35
40
35
40
(a) Rectangle topRectangle Bottom CDO 92±96 Days 390±42715.5
Price
15
14.5
140
5
10
15
20Day
25
30
(b) Rectangle bottomFigure 2.6 Rectangle tops and bottoms
61
62
Advanced Trading RulesDouble Top CTX 92±96 Days 307±34432.53231.531
Price
30.53039.52938.52827.50
5
10
15
20Day
25
30
35
40
35
40
(a) Double topDouble Bottom CTX 92±96 Days 86±123
46
45
44
Price
43
42
41
40
390
5
10
15
20Day
25
(b) Double bottomFigure 2.7 Double tops and bottoms
30
Foundations of technical analysis
63
2.4 IS TECHNICAL ANALYSIS INFORMATIVE?Although there have been many tests of technical analysis over the years,most of these tests have focused on the pro®tability of technical tradingrules. 9 Although some of these studies do ®nd that technical indicators cangenerate statistically signi®cant trading pro®ts, they beg the question ofwhether or not such pro®ts are merely the equilibrium rents that accrue toinvestors willing to bear the risks associated with such strategies. Withoutspecifying a fully articulated dynamic general equilibrium asset-pricingmodel, it is impossible to determine the economic source of trading pro®ts.Instead, we propose a more fundamental test in this section, one thatattempts to gauge the information content in the technical patterns of section2.3.1 by comparing the unconditional empirical distribution of returns withthe corresponding conditional empirical distribution, conditioned on theoccurrence of a technical pattern. If technical patterns are informative,conditioning on them should alter the empirical distribution of returns; ifthe information contained in such patterns has already been incorporatedinto returns, the conditional and unconditional distribution of returns shouldbe close. Although this is a weaker test of the eectiveness of technicalanalysis ± informativeness does not guarantee a pro®table trading strategy ± itis, nevertheless, a natural ®rst step in a quantitative assessment of technicalanalysis.To measure the distance between the two distributions, we propose twogoodness-of-®t measures in section 2.4.1. We apply these diagnostics to thedaily returns of individual stocks from 1962 to 1996 using a proceduredescribed in sections 2.4.2±2.4.4, and the results are reported in sections2.4.5 and 2.4.6.
2.4.1 Goodness-of-fit testsA simple diagnostic to test the informativeness of the ten technical patterns isto compare the quantiles of the conditional returns with their unconditionalcounterparts. If conditioning on these technical patterns provides no incremental information, the quantiles of the conditional returns should be similarto those of unconditional returns. In particular, we compute the deciles ofunconditional returns and tabulate the relative frequency ^j of conditionalreturns falling into decile j of the unconditional returns, j  1; . . . ; 10:Number of conditional returns in decile j^j Total number of conditional returns
2:15
64
Advanced Trading Rules
Under the null hypothesis that the returns are independently and identicallydistributed (IID) and the conditional and unconditional distributions areidentical, the asymptotic distributions of ^j and the corresponding goodnessof-®t test statistic Q are given by:pn ^jQ
a N 0 ; 0:10 1 0:10 0:10 
10Xnjj1
2:16
0:10n2 a 2 90:10n
2:17
where nj is the number of observations that fall in decile j and n is the totalnumber of observations (see, e.g. DeGroot, 1986).Another comparison of the conditional and unconditional distributions of1returns is provided by the Kolmogorov±Smirnov test. Denote by fZ1t gnt1andn2fZ2t gt1 two samples that are each IID with cumulative distribution functionsF1 z and F2 z, respectively. The Kolmogorov±Smirnov statistic is designedto test the null hypothesis that F1  F2 , and is based on the empiricalcumulative distribution functions F^i of both samples:n
F^i z 
i1X1 Zik  zni k1
i  1; 2
2:18
where 1  is the indicator function. The statistic is given by the expression:n1 n2 1=2sup jF^1 z F^2 zj2:19n1 ;n2 n1  n21<z<1Under the null hypothesis F1  F2 , the statistic n1 ;n2 should be small.Moreover, Smirnov (1939a,b) derives the limiting distribution of the statisticto be:lim
min n1 ;n2 !1
Prob

n1 ;n2  x

1X
k 1
1k exp
2k2 x2 
x>0
2:20
An approximate -level test of the null hypothesis can be performed bycomputing the statistic and rejecting the null if it exceeds the upper 100 thpercentile for the null distribution given by Equation (2.20) (see Hollanderand Wolfe, 1973, Table A.23; CsaÂki, 1984; and Press et al., 1986, Chapter13.5).Note that the sampling distributions of both the goodness-of-®t andKolmogorov±Smirnov statistics are derived under the assumption thatreturns are IID, which is not plausible for ®nancial data. We attempt toaddress this problem by normalizing the returns of each security, i.e., bysubtracting its mean and dividing by its standard deviation (see section 2.4.3),
Foundations of technical analysis
65
but this does not eliminate the dependence or heterogeneity. We hope toextend our analysis to the more general non-IID case in future research.
2.4.2 The data and sampling procedureWe apply the goodness-of-®t and Kolmogorov±Smirnov tests to the dailyreturns of individual NYSE/AMEX and Nasdaq stocks from 1962 to 1996using data from the Center for Research in Securities Prices (CRSP). Toameliorate the eects of non-stationarities induced by changing marketstructure and institutions, we split the data into NYSE/AMEX stocks andNasdaq stocks and into seven ®ve-year periods: 1962 to 1966, 1967 to 1971,and so on. To obtain a broad cross-section of securities, in each ®ve-yearsubperiod, we randomly select ten stocks from each of ®ve market-capitalization quintiles (using mean market-capitalization over the subperiod), with thefurther restriction that at least 75 per cent of the price observations must benon-missing during the subperiod. 10 This procedure yields a sample of 50stocks for each subperiod across seven subperiods (note that we sample withreplacement; hence there may be names in common across subperiods).As a check on the robustness of our inferences, we perform this samplingprocedure twice to construct two samples, and apply our empirical analysis toboth. Although we report results only from the ®rst sample to conserve space,the results of the second sample are qualitatively consistent with the ®rst andare available upon request.
2.4.3 Computing conditional returnsFor each stock in each subperiod, we apply the procedure outlined in section2.3 to identify all occurrences of the ten patterns de®ned in section 2.3.1. Foreach pattern detected, we compute the one-day continuously compoundedreturn d days after the pattern has completed. Speci®cally, consider a windowof prices fPt g from t to tld 1, and suppose that the identi®ed pattern pis completed at tl 1. Then we take the conditional return Rp aslog 1  Rtld1 . Therefore, for each stock, we have ten sets of suchconditional returns, each conditioned on one of the ten patterns of section2.3.1.For each stock, we construct a sample of unconditional continuouslycompounded returns using non-overlapping intervals of length , and wecompare the empirical distribution function of these returns with those ofthe conditional returns. To facilitate such comparisons, we standardize all
66
Advanced Trading Rules
returns ± both conditional and unconditional ± by subtracting means anddividing by standard deviations, hence:Xit 
Rit
MeanRit SDRit 
2:21
where the means and standard deviations are computed for each individualstock within each subperiod. Therefore, by construction, each normalizedreturn series has zero mean and unit variance.Finally, to increase the power of our goodness-of-®t tests, we combine thenormalized returns of all 50 stocks within each subperiod; hence for eachsubperiod we have two samples ± unconditional and conditional returns ±and from these we compute two empirical distribution functions that wecompare using our diagnostic test statistics.
2.4.4 Conditioning on volumeGiven the prominent role that volume plays in technical analysis, we alsoconstruct returns conditioned on increasing or decreasing volume. Speci®cally, for each stock in each subperiod, we compute its average share turnoverduring the ®rst and second halves of each subperiod, 1 and 2 , respectively. If1 > 1:2  2 , we categorize this as a `decreasing volume' event; if2 > 1:2  1 , we categorize this as an `increasing volume' event. If neitherof these conditions holds, then neither event is considered to have occurred.Using these events, we can construct conditional returns conditioned ontwo pieces of information: the occurrence of a technical pattern and theoccurrence of increasing or decreasing volume. Therefore, we shall comparethe empirical distribution of unconditional returns with three conditionalreturn distributions: the distribution of returns conditioned on technicalpatterns, the distribution conditioned on technical patterns and increasingvolume, and the distribution conditioned on technical patterns and decreasing volume.Of course, other conditioning variables can easily be incorporated into thisprocedure, though the `curse of dimensionality' imposes certain practicallimits on the ability to estimate multivariate conditional distributionsnonparametrically.
2.4.5 Summary statisticsIn Tables 2.1 and 2.2, we report frequency counts for the number of patternsdetected over the entire 1962 to 1996 sample, and within each subperiodand each market-capitalization quintile, for the ten patterns de®ned in
Table 2.1 Frequency counts for ten technical indicators detected among NYSE/AMEX stocks from 1962 to 1996, in ®ve-year subperiods, in size quintiles, and in asample of simulated geometric Brownian motion. In each ®ve-year subperiod, ten stocks per quintile are selected at random among stocks with at least 80 per centnon-missing prices, and each stock's price history is scanned for any occurrence of the following ten technical indicators within the subperiod: head-and-shoulders(HS), inverted head-and-shoulders (IHS), broadening top (BTOP), broadening bottom (BBOT), triangle top (TTOP), triangle bottom (TBOT), rectangle top(RTOP), rectangle bottom (RBOT), double top (DTOP), and double bottom (DBOT). The `Sample' column indicates whether the frequency counts areconditioned on decreasing volume trend ` D0 , increasing volume trend ` B0 , unconditional (`Entire'), or for a sample of simulated geometric Brownianmotion with parameters calibrated to match the data (`Sim. GBM')
Sample
Raw
HS
IHS
BTOP
BBOT
TTOP
TBOT
RTOP
RBOT
DTOP
DBOT
1611577655553
1654578593614
7251227143409
7481028220337
12941049666300
11931176710222
1482122582523
1616113637552
2076535691776
2075574974533
Smallest quintile, 1962 to 1996Entire84 363182Sim. GBM84 36382 DÐ90 BÐ58
181998176
782791351
972564237
20326912241
15929511922
2651811399
32016131120
26112978124
27112716164
2nd quintile, 1962 to 1996Entire83 986Sim. GBM83 986 DÐ BÐ
309108133112
321105126126
1462912590
1502514863
25526113555
22827814739
29920130104
32217149110
372106113153
420126211107
3rd quintile, 1962 to 1996Entire84 420Sim. GBM84 420 DÐ BÐ
361122152125
388120131146
1452682083
1612224966
29121215167
24724914944
33424130121
39931160142
458115154179
All stocks, 1962 to 1996Entire423 556Sim. GBM423 556 DÐ BÐ
443125215106(continued)
Table 2.1 (continued)
Sample
Raw
HS
IHS
BTOP
BBOT
TTOP
TBOT
RTOP
RBOT
DTOP
DBOT
332143131110
317127115126
17624936103
1732104289
26218313856
25521014555
2593585102
264249796
424116144147
420122184118
Largest quintile, 1962 to 1996Entire86 007427Sim. GBM86 007122 DÐ149 BÐ148
447127140140
1801404982
167893982
28312412081
30414415062
3252512497
3112510084
56169202173
52174203138
All stocks, 1962 to 1966Entire55 254Sim. GBM55 254 DÐ BÐ
2765610496
2785888112
851442644
1031262939
1791299337
16513910925
3169130130
35416141122
35660113137
3526818888
All stocks, 1967 to 1971Entire60 299Sim. GBM60 299 DÐ BÐ
179926871
175706469
1121671668
1341484557
22715012647
17218011129
115194241
117163941
239848087
2587714353
All stocks, 1972 to 1976Entire59 915Sim. GBM59 915 DÐ BÐ
152756454
162855562
821831642
931542350
1651568832
1361787821
171166061
182106467
218705380
223719759
4th quintile, 1962 to 1996Entire84 780Sim. GBM84 780 DÐ BÐ
All stocks, 1977 to 1981Entire62 133Sim. GBM62 133 DÐ BÐ
2238311456
206886193
1342452478
1102003944
18818810035
1672109736
146185453
182126071
2749082113
29011514076
All stocks, 1982 to 1986Entire61 984Sim. GBM61 984 DÐ BÐ
24211510189
25612010494
1061882851
1081443062
1821529346
19016910440
182317073
207239568
31399109116
2998712485
All stocks, 1987 to 1991Entire61 780Sim. GBM61 780 DÐ BÐ
240689581
241798979
1041681668
981323043
1801318653
16915010136
2601110373
2591010287
28776105100
2856813768
All stocks, 1992 to 1996Entire62 191Sim. GBM62 191 DÐ BÐ
29988109106
33678132105
1021321758
1021242442
1731438050
19415011035
2921812392
3152613696
38956149143
36888145104
Table 2.2 Frequency counts for ten technical indicators detected among Nasdaq stocks from 1962 to 1996, in ®ve-year subperiods, in size quintiles, and in a sampleof simulated geometric Brownian motion. In each 5-year subperiod, ten stocks per quintile are selected at random among stocks with at least 80 per cent non-missingprices, and each stock's price history is scanned for any occurrence of the following ten technical indicators within the subperiod: head-and-shoulders (HS), invertedhead-and-shoulders (IHS), broadening top (BTOP), broadening bottom (BBOT), triangle top (TTOP), triangle bottom (TBOT), rectangle top (RTOP),rectangle bottom (RBOT), double top (DTOP), and double bottom (DBOT). The `Sample' column indicates whether the frequency counts are conditioned ondecreasing volume trend (` D'), increasing volume trend (` B'), unconditional (`Entire'), or for a sample of simulated geometric Brownian motion withparameters calibrated to match the data (`Sim. GBM')
Sample
Raw
HS
IHS
BTOP
BBOT
TTOP
TBOT
RTOP
RBOT
DTOP
DBOT
919434408284
817447268325
414129769234
5081139133209
8501169429185
7891309460125
113496488391
132091550461
1208567339474
1147579580229
Smallest quintile, 1962 to 1996Entire81 75484Sim. GBM81 75485 DÐ36 BÐ31
64842523
41341631
732892030
1113345624
933675915
165117759
2181210285
1131403146
1251258117
2nd quintile, 1962 to 1996Entire81 336Sim. GBM81 336 DÐ BÐ
191679466
138845157
682431146
882252838
1612198645
14822910922
2422411185
30512131120
219996990
17612410142
3rd quintile, 1962 to 1996Entire81 772Sim. GBM81 772 DÐ BÐ
2246910871
186866679
1052272356
1212103549
1832148739
1552399129
235159084
244148486
27910578122
26710014558
All stocks, 1962 to 1996Entire411 010Sim. GBM411 010 DÐ BÐ
4th quintile, 1962 to 1996Entire82 727Sim. GBM82 727 DÐ BÐ
2121048862
214926883
922421257
1162192656
18720910134
17925510122
29623127104
3032614193
28911577118
2979714366
Largest quintile, 1962 to 1996Entire83 421208Sim. GBM83 421109 DÐ82 BÐ54
2151015883
1082441744
1101962436
2081939943
21421910037
196238359
250279277
3081088498
28213311046
All stocks, 1962 to 1966Entire55 969Sim. GBM55 969 DÐ BÐ
2746912983
2686399103
721631048
991232351
18213710437
1441499823
28824115101
32922136116
3267796144
3429021064
All stocks, 1967 to 1971Entire60 563Sim. GBM60 563 DÐ BÐ
115586124
120612957
1041941571
1231844051
22718112745
17118812319
6592625
8383916
196904986
2008313717
All stocks, 1972 to 1976Entire51 446Sim. GBM51 446 DÐ BÐ
343258
303747
1411501
3011342
2910752
2811070
515125
556812
554638
584683
All stocks, 1977 to 1981Entire61 972Sim. GBM61 972 DÐ BÐ
569076
538476
4123615
3616521
5217644
7321280
5719125
6519128
8911077
969896(continued)
Table 2.2 (continued)
Sample
Raw
HS
IHS
BTOP
BBOT
TTOP
TBOT
RTOP
RBOT
DTOP
DBOT
All stocks, 1982 to 1986Entire61 110Sim. GBM61 110 DÐ BÐ
71863721
6