statistical testing of demark technical indicators on ... · statistical testing of demark...

25
*

Upload: nguyenbao

Post on 19-May-2018

253 views

Category:

Documents


12 download

TRANSCRIPT

Page 1: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

Statistical Testing of DeMark Technical Indicators on Commodity Futures

Marco Lissandrin1,∗, Donnacha Daly, Didier Sornette

Chair of Entrepreneurial Risks, ETH Zürich, Scheuchzerstrasse 7, SEC F 7, CH - 8092 Zürich, Switzerland

Abstract

We examine the performance of three DeMark indicators (Sequential, Combo and Setup Trend), whichconstitute speci�c implementations of Technical Analysis often used by practitioners, over 21 commodityfutures markets and 10 years of data. Our backtests characterise the predictive power of these indicators.Market entry signals are tested by comparing conditional returns (i.e. conditioned on the entry signals) tounconditional returns. For the analysis of trades, which also comprise market-exit signals, randomizationtests have been performed for benchmarking. We generate the distributions of three performance metrics(mean return, pro�t factor and risk-return ratio) over di�erent trade holding horizons and compare them withtheir randomized versions. We have further checked the impact of the rolling strategy of future contracts onthe performance of the DeMark indicators. For the period from Jan. 2004 to Jan. 2014, our results suggeststatistically signi�cant predictive power on a wide range of commodity futures.

Keywords: Technical Analysis, Back-Testing, Permutation Test, Financial Markets, Commodity Futures,Contract Roll-OverJEL: C12, G14, G17

1. Introduction

In �nancial markets, Technical Analysis (TA)refers to a set of methods that examine past andpresent market activity such as price, volume andopen interest to identify patterns that can predictfuture price movements. Recent books and litera-ture surveys (Irwin, 2007; Menkho� and Taylor, 2007;Pardo, 2008; Chan, 2013) tend to conclude that thereis some value and predictive power in it, which con-

∗Corresponding authorEmail addresses: [email protected] (Marco

Lissandrin), [email protected] (Donnacha Daly),[email protected] (Didier Sornette)

1The ideas presented in this work originate from Marco Lis-sandrin's Master Thesis in ful�llment of his Master of ScienceDegree at ETH Zürich. Please �nd the full version at thefollowing url: http://www.er.ethz.ch/media/publications/

phd-and-master-theses.html

trasts with earlier more skeptical perceptions fromacademic researchers.

In TA, prices have always been the primary ref-erence of past market activity with which so-called�technicians� could attempt to predict future marketsentiment. A belief of TA is that, like physical ob-jects, prices have inertia and, when at rest, they oftenstay approximately at rest. On the other hand, whenin motion, they often stay in motion (Widner, 1998).This is exempli�ed for instance in the probabilisticmechanical view of market movements proposed byAndersen et al. (2000). In this setup, technical indi-cators can be seen as combinations of measurementsof price velocities and price accelerations. Price lev-els and price ratio relationships between highs andlows give price-based forecasting techniques that tryto identify conditions in which prices are in motionalong the trend. A very general example is given by

Preprint submitted to the International Journal of Forecasting November 18, 2015

Page 2: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

support and resistance levels. Prices tend to bounceon these levels (Garzarelli et al., 2014). On the otherhand, the crossing of these levels is interpreted asprices being in motion and are likely to continue alongthe trend (Kosar, 1991). There is also another ap-proach to predicting future market movements andthis is time-based forecasting (Coles, 2011; Miner,1991). This class of methods tries to identify pat-terns in time series that should repeat over time.The statistical problems of insigni�cant evidence

and data snooping were both known since early TAstudies (James, 1968; Jensen, 1967). Major method-ological innovations came in much later in parallelwith increased and more accessible computationalpower. In statistical testing, the replacement of pre-de�ned returns distributions with simulated distribu-tions goes back to the bootstrap approach (Brocket al., 1992). Data snooping used to be checked onout-of-sample data until White (2000) developed anin-sample �reality� check. In this procedure, the bestperforming trading signal is tested against the simu-lated performance distribution of the full universe ofcomparable trading signals. All these technical im-provements make the study of TA's predictive powermore rigorous, but we should keep in mind that thedetermination of the predictability in �nancial mar-kets is far from being 100% accurate (Zhou et al.,2012).In fact, there is an economic upper bound to TA's

predictive power, which is based on a risk-return prin-ciple (Ross, 2005; Zhou, 2010). The E�cient MarketHypothesis (EMH) has been for a long time the build-ing block of �nance theory, and it contradicts the util-ity of TA. In an e�cient market, prices are alwaysa good estimate of the underlying product because ahuge number of competing rational pro�t-maximizerselaborate all available information independently ofeach other and will immediately act on it when pricedivergences appear (Fama, 1995).Nevertheless, recent empirical studies suggest the

existence of speculative bubbles in several commod-ity markets (Sornette et al., 2009; Gilbert, 2010;Phillips and Yu, 2010; Sornette and Cauwels, 2014,2015a). Market participants cannot always enter po-sitions when a price correction is yet to come (Gromband Vayanos, 2010). For example, market exposures

in trading books are limited by capital constraints(Shleifer and Vishny, 1997) and by internal risk limits.In addition, even well-informed commodity tradersmust formulate price expectations based on partialor uncertain data (Gorton et al., 2007; Khan, 2009)and this stimulates the use of rational herding be-haviours, which have been described by Devenow andWelch (1996), Bikhchandani and Sharma (2001), Hir-shleifer and Teoh (2003). Herding behaviour can alsobe irrational. Noise traders keep or adjust their po-sitions independently of any changes in commodityfundamentals, based on judgemental biases (Ariely,2010; Grinblatt and Han, 2005; Penteado, 2013), onpositive-feedback mechanisms (Sornette and Cauwels,2015b), on simple TA rules which can be easily un-derstood also by traders with no fundamental under-standing (Gehrig and Menkho�, 2006), and on cross-asset strategies (Tang and Xiong, 2010). All theseaspects deviate commodity prices from fundamentalvalues for periods long enough to disturb the nor-mal decision making processes (UNCTAD, 2011; Fil-imonov et al., 2014) and may justify the use of TA. Infact, TA has always had a signi�cant and consistentuser cohort, also among commodity traders (Smidt(1964); Lukac et al. (1988); Billingsley and Chance(1996); Menkho� and Taylor (2007)).New TA techniques have always relied on visual in-

tuition for their development (as readily found in allTA magazines), but this aspect is usually neglectedduring statistical tests. With the goal of keeping ourapproach visual, we examine one corner of this vasttopic by studying the performance of DeMark chartindicators on commodity markets. In particular, wepresent a Monte-Carlo based backtesting framework(Aronson, 2007; Masters, 2010) to determine whetherthree of these individual indicators have statisticallysigni�cant predictive power. This family of indica-tors is, commercially speaking, one of the most pop-ular and it is also possible to make use of it as anupgrade in leading �nancial market terminals suchas Bloomberg Professional® and Thomson Reuters®

which, combined, cover roughly 60% of the marketshare (Sta�ord, 2015). Despite this, no previousstudy has analysed its e�ectiveness, although thereare other studies available on simpler chart patterns,e.g. Lo et al. (2000). We focus our study on the

2

Page 3: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

testing of predictive power on a limited number ofindicators knowing that one good market entry in-dicator is not su�cient for a trader to generate sys-tematic pro�ts. This person will know when to enterpositions by combining multiple indicators and con-siderable market intuition but, most importantly, hisexposures will be managed by thorough risk manage-ment rules (OriginalTurtles.org, 2003; Covel, 2009).The �rst known backtesting of trading signals us-

ing historical data belongs to a professional astrologerfrom Antwerp, who in 1540 tried to distinguish him-self by testing his astrological system, which he saidcould foretell local commodity prices (Ehrenberg,1928; Lo and Hasanhodzic, 2010). The main ideawas to use stars as a way to generate random pat-terns. In the same spirit, we have constructed signalbacktesting on a total of 21 commodity futures whichcan be categorized as grains, softs, energy, industrialmetals and precious metals.Commodities as an asset class refers to those raw

materials that serve as a starting point for our soci-ety to create valuable products and services. Whilethis set of raw materials keeps evolving in parallelwith society, physical commodity trading has beenbased on the exploitation of geographical and timing-based market opportunities since ancient times. Thistranslates into using market and logistical knowledgeto buy commodities at a discount from producers tothen sell them to customers at a premium.Starting from the 18th century (Hamori et al.,

2001), these markets drastically evolved with the in-troduction of �nancial contracts (i.e. commodity fu-tures contracts), which enabled producers and con-sumers to hedge their market risks and to adoptmore transparent price formulae. Financial investorsare part of the picture because they are willing tocarry those exposures that physical participants donot want to have. Nowadays, futures contracts arethe basic type of exchange traded �nancial instru-ment for commodities, right at the intersection ofphysical and �nancial trading.However, there are still relatively few academic

studies of technical analysis on commodity futuresmarkets (Lukac et al., 1988; Lukac and Brorsen, 1990;Roberts, 2003). A possible explanation is that theconstruction of a continuous price series using futures

data is not straightforward. Once a speci�c contractis used to determine the price for a given tradingday, there are multiple ways on when (Carchano andPardo, 2009; Ma et al., 1992) and how (Masteikaand Rutkauskas, 2012; Masteika et al., 2012; NAS-DAQ, 2013; Pelletier, 2011) to roll-over to the nextcontract. In addition, contract rolls should also takeinto account mark-to-market and cash managementprinciples. Commodity markets are much broaderthan futures contracts. Compared to the total vol-ume of tradable commodities, liquid exchange basedfutures contracts cover a very small share of raw mate-rials, but there are also hundreds of exchange clearedcommodity swaps that cover a huge variety of morespeci�c products. Additionally, their market expo-sure is the same as for futures, except for the monthon which they are pricing. Technically speaking, theproblem of dealing with discontinuous time series onforward contracts (either futures or swaps) is crucialfor all traders who have exposures on a broad rangeof traded commodities and it should be addressed inany backtesting method, like here.The paper is organized as follows. Section 2 de-

scribes the DeMark indicators used to generate entryand trading signals. Section 3 enters more into de-tails regarding commodity futures and explains theproblem of rolling commodity futures contracts. Inaddition, it suggests a method to create continuousdaily returns starting from separate futures contracts.In section 4, di�erent ways for evaluating the per-formance of entry/trading signals are discussed witha focus on Monte-Carlo permutation tests. Usinga two-dimensional framework based on our Monte-Carlo permutation tests, the main results from De-Mark backtests on rolled commodity futures are thenpresented. Section 5 concludes.

2. De�nition of DeMark Indicators to be

tested

This is a family of indicators developed over timeby Tom DeMark (DeMark, 1997; Perl, 2008). Itcollects many revised versions of traditional price-based indicators such as moving averages, trendlines,price ratios and Elliot waves, but it also includesother indicators, among which, Sequential is arguably

3

Page 4: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

Algorithm 1 Entry Signals

1: for each (new) t-th price bar:2: procedureDeMark(Pc,Ph,Pl,n,m,q,p,k,options)3: update Setup's counter (s = s+ 1) ◃ eq. 14: if s = m then

5: compute Setup's range & R ◃ eq. 2, 36: update Support/Resistance levels7: end if

8: if indicator = ST then

9: if no open positions then10: if Pc(t) > res(t) then11: open new long position at t+ 112: else if Pc(t) < sup(t) then13: open new short position at t+ 114: end if

15: end if

16: else if indicator = Sequential then17: if s = m then

18: if no active Countdown phase then19: activate new Countdown phase20: reset Coutdown's counter (c = 0)21: end if

22: end if

23: if active Countdown phase then24: check recycle and ending conditions25: if Combo then26: update c ◃ eq. 727: else (normal Countdown)28: update c ◃ eq. 5, 629: end if

30: if c = p then31: open new position ◃ eq. 832: end if

33: end if

34: end if

35: end procedure

the most renowned. Sequential, Combo (Sequential'smain variation) and Setup Trend (ST) all generatelong and short entry signals based on Algorithm 1.This pseudocode uses the following inputs: historicalclosing, high and low prices (Pc, Ph, Pl), a set of pa-rameters given by DeMark (n, m, q, p, k) and the op-tion to choose among slightly di�erent versions. Our

description focuses only on long entry signals. Shortentry signals can be derived by applying symmetricalconditions.

In row 3 of Algorithm 1, whenever a new price baris available at time t, a counter will be updated. Itsvalue s, which is initially set to zero, is increased byone (s = s+1) each time the following long conditionis ful�lled:

∀ (new) t, Pc (t) < Pc (t− n) , (1)

with n = 4 according to DeMark. The counter in-creases only if there are consecutive closing pricessatisfying eq. 1, otherwise it is set back to zero. Aparallel counter is running based on a symmetricalshort condition. If the long counter increases, thenthe short counter must be reset to zero, and vice versa.DeMark setsm = 9 and whenever s = m then a Setupis complete. However, this will not reset the counterback to zero. A Setup ends only when the number ofconsecutive closes cannot be increased. Fig. 1 showsan example of a long Setup. Each time that s = m,

Figure 1: Setup on the Light Crude Oil Futures contract, alsoknown as the West Texas Intermediate (WTI) contract.

the price bars related to the newly completed Setupare used in row 5 to determine the Setup's range:[

mins=1,..,m

(Pl)s ; maxs=1,..,m

(Ph)s

], (2)

4

Page 5: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

and the Setup's width:

Rw△= max

s=1,..,m(Ph)s − min

s=1,..,m(Pl)s . (3)

The same price bars also update support (sup) andresistance (res) levels:

∀ Setup,

(long) res (t) = max

s=1,..,m(Ph)s ,

(short) sup (t) = mins=1,..,m

(Pl)s .

(4a)

(4b)

New long Setups update resistance levels (see �g. 2),whereas short Setups update support levels.

Rows 8-15 of Algorithm 1 describe long and shortentry strategies for ST. For example, a new long po-sition will be entered on the next traded day (t+ 1),at Pc(t+1), as soon as the latest closing price breaksits resistance level (Pc(t) > res(t)), like in �g. 3.

Figure 2: Each completed Setup updates WTI's resistancelevel.

Starting from row 16, the pseudocode explains howSequential can generate entry signals. At each newcompleted Setup (s = m), a new Countdown phasestarts unless one is already active (rows 17-22). Likethe Setup phase, also the Countdown can be long orshort and has its counter that is set to zero as soonas a new Countdown begins (c = 0). For each newt-th price bar, counter c will increase by one on a long

Figure 3: In June 2013, WTI's Pc breaks its resistance level(Pc(t) > res(t)). Therefore, ST (Setup Trend) generates a newlong entry signal.

Countdown only if the following conditions are met(rows 27-28):

Given t,

{(standard) Pc (t) ≤ Pl (t− u) ,

(aggressive) Pl (t) ≤ Pl (t− u) ,

(5a)

(5b)

and u = 2, as suggested by DeMark. Only one of thetwo variants in eq. 5 should be used. We opt for theaggressive version in our backtests. These conditionsare very similar to eq. 1: Pl replaces Pc, u replaces nand here the equality condition is also accepted. Inaddition, for both cases, the p-th bar completes theCountdown if, given the k-th price bar,

Pl (p) ≤ Pc (k) . (6)

DeMark suggests to set p = 13 and k = 8. If eq. 6 isnot veri�ed immediately, then the completion of thisphase is postponed until this condition is met in oneof the later bars. Unlike the Setup, what matters forthe Countdown to be completed is the total numberp of bars ful�lling eq. 5, not the consecutive number,as in �g. 4. Counter c increases based on conditionsthat are independent of the Setup, although, duringthe Countdown (or its alternative, the Combo), thereare additional checks based on the Setup that can

5

Page 6: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

Figure 4: A completed Countdown on Light Crude Oil.

restart ("recycle") the phase or, in the worst case,end it before its completion (i.e. row 24):

1. New opposite Setups: A completed Setup in theopposite direction will restart the existing Count-down. For example, a short Setup is completedwhile a long Countdown is still building up. Thelong Countdown will end immediately, replacedby a short Countdown with c = 0;

2. Crossed support and resistance levels: For ex-ample, in case of a buy, if Pl(t) > res(t), thenthe Countdown is stopped and cancelled. Thiscondition is similar to the one that generates en-try signals using ST, but here closing prices arereplaced by high and low prices;

3. New Setups: if there is a new completed Setupin the same direction as the old one, then theCountdown is reset (c = 0) only if Rw

new >Rw

old. Nevertheless, if the new Setup has a Pc

within the range of the old Setup, then the cur-rent Countdown is kept going.

Instead of using eq. 5-6, it is possible to increasecounter c by one if all the following Combo conditions

are ful�lled (rows 25-26):

Given t,

Pc (t) ≤ Pl (t− u) (= Eq. 5) ,

Pl (t) ≤ Pl (t− 1) ,

Pc (t) < Pc (previous Combo bar) ,

Pc (t) < Pc (t− 1) .

(7a)

(7b)

(7c)

(7d)

A major di�erence with the normal Countdown isthat the bar check in eq. 7 starts from the �rst barof the Setup instead of the last (�g. 5).

Figure 5: A completed Combo on Light Crude Oil.

Once the Countdown (or Combo) is complete attime t, an entry strategy determines when to start along entry signal (row 31). The aggressive strategyenters a long position on the next traded day (t+1),at Pc(t + 1). On the other hand, the conservative

strategy enters at Pc(t+ 1) as soon as,

Pc (t) > Pc (t− n) . (8)

Eq. 8 is similar to the Setup check (eq. 1), but witha reversed test direction. We chose the conservativestrategy in our backtests. Anyhow, the choice of theentry strategy does not seem to be the key factor forthe performance of the indicator because the turn-ing point has already been identi�ed by a completedCountdown. The entry strategy tries to optimize thetiming by delaying an entry signal only for a few price

6

Page 7: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

bars (�g. 5).Sequential (in its traditional Countdown or its al-

ternative Combo version) is a time-based indicator,which tries to identify areas of trend exhaustion thatwill lead to price reversals. It is made of up to twosequential phases: the �rst one is the Setup, whichtries to capture price momentum, and it is followedby the Countdown that looks for momentum exhaus-tion. ST (Setup Trend) is a price-based indicator thatuses the Setup to determine support and resistancelevels. When these are crossed, then prices are in mo-tion and should continue along the trend. The Setupphase (rows 3-7) is a common starting point for bothSequential and ST entry signals.To generate a long entry signal with Sequential,

the Setup has �rst to identify a bearish momentumin the market. To do so, closing prices (or settlementprices for derivatives) are compared to the close n

bars earlier (eq. 1). The idea of using n-days mo-menta to avoid noise is not unique and can be foundalso in Chan and Lin (2004). A long Setup is com-pleted when there are m consecutive closes, each oneless than the corresponding close n bars earlier. Herethe goal is to identify a continuous negative price ve-locity, i.e. a negative trend. There can still be priceoscillations, but a n-days momentum guarantees thatthe amplitude is small enough and the period is shortenough so that there is no interruption of the Setup.According to DeMark, a negative price velocity ismeasured over four time periods (n = 4) and it has tobe maintained for nine consecutive periods (m = 9)in order to identify a trend. We think that the choiceof a 4-days momentum is in line with the behaviourof many traders who are not interested in daily pricemoves as much as they are for price moves over a fewtrading days. As no surprise, risk management re-ports built for traders are often sent out on a weeklybasis to limit noisy information and to be in line withthe trader's way of thinking. If m ≤ 5, then we aresure that the closing price of the last Setup bar islower compared to the �rst bar so that a negativeprice velocity has actually moved the price down.Setting m to 9 means adding additional trend

checks to all the �rst 5 bars: the closing price willtrend down with continuity and the price from the�rst to the last bar will have gone further down be-

cause Pc(9) < Pc(5) while Pc(5) < Pc(1). Accordingto this interpretation, m depends on n, while the lat-ter is given a value in line with the traders' way oflooking at price moves, all this makes the Setup a verygeneral method to identify incipient trends. Largeroscillations are tolerated during the Countdown be-cause the market price is still trending (with a neg-ative price velocity), but it is decelerating. Deceler-ation is by no means constant, and this translatesinto an alternation of negative and positive price ve-locities. Eq. 5 deterministically suggests that, afterp = 13 negative velocities, the trend is �nished andis ready to revert as soon as the current price level ofbar p is below or approximately the same as it wason bar k = 8 (eq. 6). Therefore, prices can continueto be bearish or they can go sideways while in themeanwhile the trend exhaustion pattern is buildingup. Since larger oscillations are tolerated, price veloc-ities have to be measured over a shorter time frameto capture velocity oscillations. This might be thereason why the Countdown's and Combo's u = 2 issmaller than the Setup's n = 4. On the other hand,the �xed number of p negative moves before pricesstart to recover might be dependent on speci�c mar-kets within a de�ned asset class. It is reasonable tothink that DeMark did not focus his studies on com-modity markets, but rather on stock markets, giventhe systematic use of closing prices instead of settle-ment prices, which are a common term for commodityfutures and swaps.Note that long Setup Trend signals are based on

bearish momenta. There is an acceleration from azero price velocity to a sustained negative velocityeach time a long Setup is complete. Despite a mar-ket force pulling the price down, if the current pricehas the strength to push itself above the resistancelevel (the highest price level within the latest com-pleted long Setup), then the price is supposed to haveenough inertia to continue its motion along the up-ward trend. When there is an ongoing long openposition, we could also use a long completed Setup(i.e. a bearish market force that sets a new resistancelevel) to exit the position. This is visible in �g. 3:when the price returns into the shaded area, the cur-rent long position should be closed. Unfortunately,for Sequential there is no exit signal, therefore we

7

Page 8: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

will backtest all of our indicators only on their entrysignals.Lastly, a symmetrical algorithm generates a short

entry signal for both Sequential and ST. In reality,there is no symmetry between uptrends and down-trends in the markets (Benyamini, 2009). In fact,selling pressure can take long pauses, but when pricesdrop they tend do it at a high and constant veloc-ity. On the other hand, buying pressure is relativelyeven and generates slower and longer uptrends. Incommodities, bottoms have larger price oscillationsthan tops. Given these di�erences, Sequential seemsmore suited for long entry positions just after fastprice drops have occurred. In case of long-lasting self-sustaining uptrends, the risk for Sequential is to re-peatedly suggest short entry positions while the trendis still ongoing.

3. Commodity Futures Markets

3.1. Description

A commodity market is a market that tradesraw materials. The market is physical when theproduct is delivered to the buyer, otherwise it ispurely �nancial, for hedging, exchange for physical(EFP), investment or speculative purposes. Physicaltraders place themselves in between producers andconsumers. They have the logistical and physical in-frastructure that, combined with a knowledge of themarket and its participants, enables them to buy com-modities with a discount from producers and deliverthem to customers with a premium. In parallel, �-nancial instruments are used as a reference for pric-ing formulas and as a support for hedging and forEFP-based deals.Contrary to physical trading, �nancial investments

need exposure to market prices to unlock pro�t op-portunities. Besides an opposite approach to marketrisk, �nancial instruments are at the intersection ofphysical and �nancial trading. If it was not possibleto hedge physical exposures on �nancial markets (thisstill applies to some mature, but speci�c commod-ity markets), then every physical purchase should becovered by a corresponding physical sale to eliminatemarket risk. Investors are willing to accept exposures

to forward price movements that physical producers,traders (to a certain extent) and buyers do not wantto have and their participation in �nancially basedcommodity markets increases the liquidity of the re-lated �nancial instruments. On the physical side, thismakes �nancial hedging more reliable and, regardingdeals, a liquid �nancial contract builds trust on mar-ket players, therefore they will be more willing to useprice formulae based on such �nancial contracts.Futures contracts on commodities constitute the

basic type of exchange traded �nancial instrument.Currently, the most popular contracts cover soft agri-culturals, grains, energy products, industrial and pre-cious metals. A commodity futures contract is anagreement to buy or sell a standardized quantity andquality of raw material through an exchange at a fu-ture date and at a price agreed upon entering thecontract. These instruments can start being tradedat least one year before their expiry, but there is norule for it. Commodity markets are much broaderthan futures contracts, but these instruments stillplay a crucial role. Compared to the total volumeof tradable commodities, liquid exchange based fu-tures contracts cover a very small share. Gasoil, forexample, is traded as a future on the European ICEexchange and covers the physical market for Low Sul-phur Gasoil (Diesel 10 ppm) delivered in barges inthe Amsterdam, Rotterdam, Antwerp (ARA) region.According to the contract, the density is 0.845kg/litrein vacuum. A similar product with a di�erent level ofsulphur, or a more speci�c application, or a di�erentdensity, or a di�erent type of delivery, or a di�er-ent geographical scope (e.g. the Mediterranean) willnot have a dedicated futures contract. Despite thesedi�erences, a physical trade would probably use theGasoil ICE futures contracts both as a reference forpricing and as an instrument for hedging. It is stillpossible to get �nancial exposures to more speci�cproducts by entering exchange-cleared swaps. Thereare hundreds of these products covered by the ICEand NYMEX exchange. Exposures of such instru-ments are identical to futures contracts except forthe month of expiry when, di�erently from futures,market exposure decreases linearly along the monthuntil there is no exposure left. This means that themethodology described in this paper is very general

8

Page 9: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

because it can potentially cover most of the �nan-cially traded commodities.

Table 1 provides a visual interpretation of the twodimensions of futures contracts: the term structure orforward curve (horizontal) and �at price (vertical).The latter captures day-to-day price moves withinindividual contracts, while forward curves show, on aspeci�c date, market prices for future contracts sortedby nearest expiry date.

Table 1: The two dimensional nature of futures contracts onNYMEX Light Crude Oil on d = 07/02/2014. Each columncontains a separate contract: the front contract M (Mar 2014,�rst to expire) and the following ones M+1 (Apr 2014), M+2(May 2014) and M+n (n=3, Jun 2014). Row d-1 and d-2 show�at prices ($/bbl) for the prior days.

M M+1 M+2 M+n · · ·...

......

......

d-2 97.38 96.76 96.02 95.22 · · ·d-1 97.84 97.32 96.66 95.94 · · ·d 99.88 99.35 98.62 97.84 · · ·

The front part of the curve is the most sensitive tospot price changes. Volatility is higher compared tothe end part of the curve and correlations betweennearby contracts on the front is lower compared tocorrelation of nearby contracts at the end of the curve.The most straightforward way for investors to be ex-posed to commodity market prices is with outrightexposure. This means that the forward market struc-ture is ignored and long or short positions are en-tered just on one column of prices in Table 1, for ex-ample on the front contracts to maximize volatility.This trading style is the most common for technicaltraders. Blue curves in �g. 6 represent continuous�at prices while forward curves are in red.

Despite the product type, the delivery period isa additional dimension in commodity trading. Thesame product delivered in two di�erent months canbe considered as a di�erent asset. A market is in con-

tango when a contract that follows the current oneis trading at a higher price on the red curve. Other-wise, when a following contract is trading at a lowerprice, the market is backwardated. Given a physicalstorage, there is a lower time pressure to sell when

the forward curve is in contango because, after eachmonth, the evaluation of the product is being rolledto a higher price.

01−94 01−97 01−00 01−03 01−06 01−09 01−12 01−150

50

100

150Light Crude Oil

time [mm-yy]pri

ce/unit

[USD

/B

arr

els

[bbl]]

PC (rolling #3) (unadjusted)

FC (2y curves) (3 months steps)

(a)

01−94 01−97 01−00 01−03 01−06 01−09 01−12 01−150

0.5

1

1.5

2

2.5

3

3.5

4

4.5Heating Oil

time [mm-yy]

pri

ce/unit

[USD

/U

SG

allon

[US

gal]]

PC (rolling #3) (unadjusted)

FC (2y curves) (3 months steps)

(b)

Figure 6: Price evolution for (a) Light Crude Oil and (b) Heat-ing Oil. The blue curve represents continuous closing �at prices(PC). It has been constructed by rolling the front contract Mto the next M+1 in the last month before expiring as soon asthe open interest of M+1 is higher than that of M. Red linesare forward curves, plotted every three months.

For �nancial outright exposures, the forward curveis not predictive, in fact contract rolls do not gen-erate any PnL from a mark-to-market perspective.Nevertheless, changes on the forward curve mighte�ect �at prices and vice versa. Typical commod-

9

Page 10: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

ity traders speculate mostly without outright, whichmeans that their daily pro�ts do not depend (to someextent) on continuous �at price moves. Physical trad-ing of raw materials needs an understanding of howmarkets behave when di�erent type of shocks occur(demand/supply, geopolitical, macroeconomic, regu-latory, legal and natural disasters). This knowledgehelps to understand the behaviour of forward curves,so as to enter physical or speculative time-spreads bybetting on relative movements of the curve.

If spreads involve di�erent curves (e.g. long M+1Heating Oil and short M+1 Light Crude), then thereis an additional inter-product risk. In general, out-right, time and inter-product exposures can be com-bined at the same time depending on the traded com-modity.

In this paper, we limit our analysis to outrightrisk. DeMark indicators are being tested over 21commodity futures markets and 10 years of data(Jan 2004 - Jan 2014). Table 2 lists all futures con-tracts chosen for the backtesting. Some contracts hadto be excluded. DeMark indicators are demandingand require complete price bars, but these were notavailable for the London Metal Exchange contracts.CBOT Soybean Oil, Soybean Meal and NYMEXGasoline US could not cover the whole tested period.

3.2. Rolling Futures Contracts

A continuous price series of a traded futures musthave one contract selected for each trading day.Prices belong to the front part of the curve (M, M+1,M+2) to capture spot price movements. This partof the curve is also the backbone of physical trad-ing because it is used to evaluate and hedge unsoldmaterial. It is not possible to stick to one contractfor the whole backtested period because futures con-tracts can be traded only for a few years and cannotcover the whole backtest. When a contract starts be-ing traded, it represents the most long-term futureprice expectation with a weak dependency on frontprice changes, a lower volatility compared to the frontcontract and a lower liquidity. The simplest way tobuild a continuous �at price curve is to roll followingthe last traded day of the latest expired contract. Amore sophisticated method should anticipate the roll

Table 2: List of commodity futures used for backtesting.

Name Type Exchange

1: Wheat Grain CBOT2: Corn Grain CBOT3: Oats Grain CBOT4: Soybean Meal Grain DM.5: Cocoa Soft ICE US6: Co�ee C Soft ICE US7: Sugar #11 Soft ICE US8: Cotton #2 Soft ICE US9: Light Crude Energy NYMEX10: Nat. Gas Energy NYMEX11: Heating Oil Energy NYMEX12: Brent Crude Energy ICE EU13: Nat. Gas Energy ICE EU14: Gasoil Energy ICE EU15: Aluminium Ind. metal SHFE16: Copper Ind. metal COMEX17: Copper Ind. metal SHFE18: Gold Prec. metal COMEX19: Silver Prec. metal COMEX20: Platinum Prec. metal NYMEX21: Palladium Prec. metal NYMEX

because contracts in their last weeks of life show ab-normal volatility (Samuelson, 1965). Carchano andPardo (2009); Ma et al. (1992) suggest to roll the frontcontract 1-2 weeks before maturity, or on the �rst dayof the expiring month, or, as an alternative, to stayon the most liquid contract, for example by rollingfrom M+n to M+n+1 as soon as the open intereston M+n+1 is higher than on M+n. Data providerssuggest similar solutions (Reuters, 2010) with the ad-dition of rolling methods that roll from M to M+1based on weighted values. In this paper, the follow-ing rolling strategies have been considered:

1. from M to M+1, following M's expiry;

2. from M to M+1, 10 days before M's expiry;

3. from M to M+1, when OI(M) < OI(M + 1);

4. always on the contract with maximum OI.

It is not allowed for any strategy to roll back to theprevious contract, i.e. from M+1 to M.

10

Page 11: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

Results presented in this paper are based on rolling#3. While rolling #3 seems a reasonable choice forour backtests (see section 4.2 where we study the im-pact of the di�erent rolling methods on the tests),there is still room to further investigate the impactof rolling strategies.

+13$

+15$

(unadjusted)

(trading adjustm.)

roll roll

Adjustments on the Continuous Flat Price Curve

Trading Days

Price

[$

/unit

]

−40 −20 0340

360

380

400

Figure 7: The black (unadjusted) curve is a generic continu-ous �at price curve, generated by one of the rolling strategiesdescribed in the text. Given the price level and the market'scontango, it could also represent a very steep front contangomarket on ICE Gasoil after a �at price crash. Trading day 0is the most recent trading day of the time period and the plotgoes backwards in time, from right to left. The black curveshows price discontinuities on the rolling day. The blue curve,which is obtained as explained in the text to be neutral tocontract jumps, is used to generate signals and to test theirperformance.

This is an additional issue that we have to addressbefore presenting the extensive results of our tests.When each trading day has a contract linked to it,then continuous settlement prices still show mislead-ing price discontinuities on the rolling day, like on theblack curve in �g. 7. DeMark indicators use daily �atprice movements to generate entry signals and a pricemovement in the wrong direction could stop a signalbefore its completion. Therefore, any DeMark indica-tor should not consider price discontinuities comingfrom contract rolls as price moves that can generatepro�ts.

A simple way to remove discontinuities would beto use local adjustments by weighting price valuesacross multiple trading days. Nevertheless, thereare more computationally intensive adjustment tech-niques which �t better with our backtests. The blackunadjusted curve in �g. 7 shows a steep front con-tango market, in fact the front contract M is rolledtwice to a higher valued M+1 contract. Assuming

that the black curve is related to a long position thatwe want to keep, we should sell a lower valued con-tract and buy the next contract that always tradesat a higher price (+13$ and +15$). From a mark-to-market perspective, changing the contract creates noPro�t & Loss (PnL) if we exclude transaction costs.For this reason, entry signals are being generated onthe blue trading curve, which is neutral to disconti-nuities coming from the rolling process.

There are multiple ways to adjust discontinuitieson continuous �at price time series (Masteika andRutkauskas, 2012; Masteika et al., 2012; NASDAQ,2013; Pelletier, 2011). There is general consensusthat prices in the old contract should be adjusted toprices in the new contract. In this way, continuousprices that are later in time should be less a�ectedby adjustments. On the other hand, this backward-adjustment is more computationally intensive thana forward-adjustment because a change on a singleroll-over requires additional changes on all previoustrading days.

Fig. 7 uses backward-adjustments using a discretetranslation of the price by the adjustment ∆ on theday of the roll such that:

∆ = Pod − Pcd−1. (9)

The blue curve, which is neutral to rolling, is obtainedby adding the adjustment ∆ to all prices (Pc, Po, Ph,Pl) prior to the rolling day.

Another method is the proportionally adjustedmethod. Instead of adding a �x quantity ∆, the pro-portionally adjusted method multiplies all the pricesprior to the rolling day by the quantity ρ:

ρ = Pod/Pcd−1. (10)

Using such ratios has the advantage that negativeprices are not possible by construction. On the otherhand, they may create large reconstructed price �uc-tuations. This unwanted features lead practitionersto favour the use of the ∆ approach over the ρ ap-proach.

In this paper, continuous �at price curves havebeen backward-adjusted using ∆ quantities. Thismethod generates negative prices on the trading se-

11

Page 12: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

ries (in blue) for Soybean Meal, Copper COMEX andCopper SHFE. In other cases, adjusted time seriesare close to the null price. This is not a problem fortrading time series because DeMark indicators onlyuse relative prices to build up entry signals. However,this is a problem when evaluating the performance ofstrategies in comparison with that of the commodity,de�ned by its daily market returns at day d:

rd =Pcd − Pcd−1

Pcd−1. (11)

The blue curve in Fig. 7 cannot be used directlyto compute daily returns because settlement prices(Pc) can be negative or close to zero values and thiswould distort daily returns. A simple solution is touse the blue curve to compute the nominator in eq.11 while the denominator uses settlement prices fromthe black unadjusted continuous �at price curve. Infact, the blue curve shows correct changes in relativeprices, while the black curve refers to the market'sabsolute price levels.Finally, cash management plays a role on the PnL:

rolling to a contract with a higher value means thatinitial margin requirements will be higher whetherthe position is long or short. Without consideringany portfolio e�ect, higher collaterals may force trad-ing businesses to borrow more money for which ad-ditional interest rates should be paid. In this paper,performance is measured on the blue trading curve(i.e. daily market returns), while transaction and �-nancing costs are not included.

4. Market performance of DeMark indicators

4.1. Methodology

A positive trade record requires pro�t generation,but trades should also beat the markets on a risk ad-justed basis in order to be attractive for investors. Ifindicators generate signals that outperform the mar-ket, then those indicators are informative, in otherwords, they have predictive power.In this paper, we study the predictive power of

each separate indicator. This is not su�cient to guar-antee the pro�tability of an indicator, but it is al-ready a �rst step towards it. Pro�tability requires

a much broader discussion that we do not addresshere. In fact, traders use their intuition and theirresearch skills to enter new positions (e.g. by com-bining several trusted fundamental and technical in-dicators), but pro�table traders are also excellent ex-posure managers. They handle multiple diversi�edstrategies while keeping their portfolio volatility al-ways under control and they know when it is the bestmoment to cut losses and to lock-in pro�ts.Predictive power can be studied on a single indica-

tor by comparing conditional distributions of returns(conditioned on entry signals) with unconditional dis-tributions of returns representing the market's perfor-mance (Lo et al., 2000). A further step in the analy-sis could be to substitute conditional returns with aconditional return-to-risk ratio, for example the Risk-Return-Ratio (RRR) (Johnsson, 2010). The condi-tional versus unconditional returns approach cannotcombine longs and shorts on the same graph, but itis easy to implement and it o�ers graphical intuition.For example, �g. 8 suggests that long Sequentialentry signals might over-perform the Cocoa futuresmarket when holding days are �xed to 13-14 days.

50%

25%

75%

95%

5%

Cocoa //TD Sequential //Long only

pos/year=1.7

# holding days

rc[%]

1 2 4 6 8 10 12 14

−10

−5

0

5

10

Figure 8: The conditional distribution of returns on Cocoa forlong Sequential entry signals represented as 25%, 50% and 75%quantiles (blue curves) is compared to the market's uncondi-tional returns distribution (in grey).

Unfortunately, with a p-value of 0.64 in theKolmogorov-Smirnov test, the conditional distribu-tion does not seem signi�cantly di�erent from theunconditional distribution when the number of hold-ing days is set to 14. A limit of this test is that itonly tests the maximum gap between the two cumula-tive distributions without considering that each con-ditional quantile is overperforming its correspondingmarket quantile. In addition, the test assumes In-

12

Page 13: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

dependent and Identically Distributed (IID) returns,which is not plausible for �nancial data (Lo et al.,2000). So the failure of the Kolmogorov-Smirnov testto reject the null hypothesis, that the long Sequentialentry signals do not over-perform the Cocoa futuresmarket, may just be a result of its lack of power.As no surprise, Monte-Carlo permutation tests

(Aronson, 2007; Masters, 2010) in �gures 9, 10, 11provide a di�erent conclusion, much more in line withthe previous graphical intuition. According to thenull hypothesis H0 the signal's long, short and neu-tral positions are paired randomly with daily marketreturns. The alternative hypothesis HA supports theidea that the current pairing improves performancebeyond what could be expected from randomness,which also means that the indicator is intelligent andhas predictive power over the market. The value ofsuch random strategies that have the same charac-teristics as the prediction system to test, except forthe timing, is also explained by Daniel et al. (2009)in the context of avoiding selection biases, survivalbiases and look-ahead biases during backtests.Randomized signals have several constraints. All

possible permutations, including the candidate sig-nal, must have both equal chances of appearing inreal life and in the randomization process. For exam-ple, the total number of trades and the total numberof trading days has always to be the same. An addi-tional constraint in our study is that each trade mustbe held for the same �xed number of days becausewe examine the predictive power of entry signals bysweeping the number of holding days. This meansthat, by design, the candidate signal contains tradeswith a �xed number of holding days. Moreover, toavoid possible interactions, trades should not overlapin time. Lastly, each daily return needs to be pairedwith a long, short or neutral market position.On the one hand, compared to the bootstrap

method, permutation tests have more requirementsto ful�l. On the other hand, these tests overcomemany bootstrap weaknesses. There is no assumptionon the null-hypothesis distribution used for the test,while in bootstrap tests the empirical distributionof the obtained sample is assumed to be represen-tative of the whole population. Furthermore, boot-strap tests re-sample returns with replacement while

the trading signal is kept unchanged. This is howthe null hypothesis distribution is generated. Instead,during permutation tests, daily returns are kept ontheir historical positions while the trading signal ispermuted (without replacement). In this way, the in-telligent part of the returns is left untouched togetherwith its behavioural and statistical dependencies (e.g.autocorrelations).

The total number of signal permutations growsvery quickly given the number of trading days, giventhe number of entered trades and given the numberof holding days for each trade. Let us assume thatthere are a total of 30 trading days and that the sig-nal can only be long or out of the market. If, withall the mentioned constraints, there is only one tradethat lasts 3 holding days, then there are only 28 pos-sible permutations. If instead there are 5 trades withthe same duration, then the number of signal permu-tations goes quickly up to ∼ 104.2. In this paper, 400randomized trading signals are simulated from eachcandidate signal, on each test. It is a trade-o� be-tween quantile smoothness, size of con�dence inter-vals and computational power. Permuted distribu-tions are approximated, therefore observed quantilesneed to be adjusted according to con�dence intervalsbefore being used for hypothesis testing. Let q andq̂ be respectively the true and the observed quantile.These transformations use a normally approximatedbinomial method in accordance with Conover (1999).A limitation of this method is that it requires largesamples, but this is not a problem for our permuta-tion tests. Its strength is that it can be applied toany quantile. Given the number of randomized sig-nals n0, the observed quantile q̂, the con�dence levelα and Zα as the Z-statistic (e.g., Z1−α ∼ 1.65 whenα=95%), then the true quantile q has the followingcon�dence interval q̂ − ε ≤ q ≤ q̂ + ε with:

ε =Z1−α ·

√n0 · q̂ · (1− q̂)

n0. (12)

With n0 = 400, α=95% and q̂=95% then 93.2% ≤q ≤ 96.8%. When a p-value refers to a theoreti-cal q = 95% quantile, we will conservatively pick aq̂=97% measured quantile from the empirical distri-bution. To avoid approximation, it is generally rec-

13

Page 14: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

ommended to use the �exact� Clopper-Pearson (1934)con�dence interval, which is well described by Agrestiand Coull (1998). Both methods provide the samerounded results for ε. All the quantile adjustmentsadopted in the permutation tests are listed in tab. 3.

Table 3: Quantile transformations in the Monte-Carlo permu-tation test. Null-hypothesis distributions are approximated,therefore observed quantiles need to be conservatively adjustedaccording to con�dence intervals. q and q̂ are respectively thetrue and the observed quantile.

Left Tail

q = 2.5% → q̂ = 1%q = 5% → q̂ = 3%q = 10% → q̂ = 7%Right Tail

q = 90% → q̂ = 93%q = 95% → q̂ = 97%q = 97.5% → q̂ = 99%

Table 4: Measured quantiles for long Sequential on Cocoa.

Pro�ttrade Pf RRRtrade

13 holding days: 95% 95% 87%14 holding days: 95% 92% 90%

Each trading signal uses an aggregate measure todetermine its performance. In our case, those mea-sures can be mean values over single positions likemean returns and mean RRRs (called respectivelyPro�ttrade and RRRtrade), but also measures that arecomputed only over multiple positions, like the Pro�tFactor. This is a pro�t-to-loss ratio which is de�nedas

Pf△=

∑Pro�ts∑Losses

. (13)

Assuming that all trades have the same money allo-cation, Pf can be rewritten as the sum of all returnsfrom winning trades divided by the sum of returnsfrom losing trades:

Pf =

∑r+∑r−

=N+ · r+

N− · r−, (14)

where N+ and r+ are respectively the number of win-

50%

25%

75%

100%

0%

97%

99%

3%

1%

Cocoa //TD Sequential //Long only

pos/year=1.7

# holding days

Profttrade[%]

1 2 4 6 8 10 12 14

−5

−4

−3

−2

−1

0

1

2

3

4

5

Figure 9: Pro�ttrade permutation tests for long Sequential onCocoa.

50%

25%

75%

100%

0%

97%

99%

3%

1%

Cocoa //TD Sequential //Long only

pos/year=1.7

# holding days

Pf=PW/PL

1 2 4 6 8 10 12 140.2

0.5

1

2

3

4

5

6

789

10

Figure 10: Pf permutation tests for long Sequential on Cocoa.

50%

25%

75%

100%

0%

93%97%

Cocoa //TD Sequential //Long only

pos/year=1.7

# holding days

RRRtrade

1 2 4 6 8 10 12 14−5

0

5

10

15

20

25

30

Figure 11: RRRtrade permutation tests for long Sequential onCocoa.

14

Page 15: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

ning trades and their mean return. On the otherhand, N− and r− are the number of loosing tradesand their mean return. A trade is considered a win-ner when its gross return is strictly positive. Next,given the de�nitions of Payo� Ratio and Win Ratio

as:

Pr =r+

r−and W =

N+

N+ +N− , (15)

the pro�t factor can be then written to obtain

Pf =W

1−W· Pr. (16)

A trading signal generates pro�ts when Pf > 1 and,by de�nition the break-even is reached when Pf = 1.The desired condition is often Pf > 2 (Harris, 2009).Eq. 16 highlights how signals with low Pr must havea high W to generate pro�ts, like for intra-day trad-ing. On the other hand, high Pr values coupled witha low win ratio (i.e. W < 50%) can still be prof-itable. Pro�ttrade, Pf and RRRtrade are computed foreach candidate and randomized signal. Performancemeasures such as Pro�ttrade and Pf use double-sidedtests. When the observed Pro�t Factor is below thebreak-even (Pf = 1) and the random distribution isperforming signi�cantly better, then this conditionis informative and it might suggest to �ip the direc-tion of the trades. RRRtrade uses a single-sided testinstead. RRR's de�nition uses the maximum draw-down at the denominator. As a consequence, it is notpossible to assign to this measure a symmetrical in-terpretation when returns per trade are, for example,all negative.

Results for long Sequential tests on Cocoa areshown in �gures 9, 10 and 11. In the current back-testing, a p-value of 10% translates into a possibly

signi�cant rejection of H0 and a value of 5% into astatistically signi�cant rejection. The light shadedarea represents statistical signi�cance and the darkshaded area represents high statistical signi�cance atthe 99% level, both of them use conservatively ad-justed quantiles by taking into consideration con�-dence intervals. Looking at possible signi�cance, theunadjusted quantiles on single-sided tests (q = 90%)and double-sided tests (q1 = 5%, q2 = 95%) havebeen adjusted to q̂=93%, q̂1=97% and q̂2=97%. This

means that the candidate indicators (in �gures 9, 10and 11, and in table 4) is never statistically signi�cantbecause the use of conservative quantile transforma-tions on all performance measures is always decisiveto downgrade possibly signi�cant results to non sig-ni�cant when each position is being held for 13 or 14days. However, the indicators are clearly possibly sig-ni�cant, i.e. above the 90% con�dence level, exceptfor RRRtrade for 13 holding days.

4.2. Impact of the rolling method on performance re-

sults

Fig. 12 examines the impact of di�erent rollingstrategies for long ST (Setup Trend) on SoybeanMeal, short Sequential on Cocoa and long & shortSequential on Natural Gas ICE. When the roll isdone on the expiry day, then the number of statis-tically signi�cant holding days decreases comparedto rolling #3 and in two examples there is even nostatistical signi�cance left. In practice, the rollingstrategy plays a key role in evaluating the statisticalperformance of a trading indicator similar to DeMarkon commodity futures markets. Rolling #1 is moreconservative: it tends to accept (rigorously speaking,it tends not to reject) the null hypothesis more eas-ily compared to the other rolling strategies. Thisalso means that a basic backtesting on commodityprices series using rolled prices based on rolling #1might underestimate the predictive power of an indi-cator. Furthermore, rolling #1 always has the low-est Pro�ttrade values (in magnitude) among the fourrolling strategies. Rolling #2 and #3 have a sim-ilar number of trades, similar Pro�ttrade, althoughthe stability of predictive power across the numberof holding days may vary. Rolling #4 always picksthe most liquid contract, but the impact strongly de-pends on the futures market. Rolling #3 on Cocoais very similar to #4. The reason is that the frontcontract is the most liquid until 20-30 days before itsexpiry, therefore the two strategies roll very near intime. In contrast, rolling #3 and #4 show very dif-ferent behaviours for Natural Gas ICE. This can beexplained by the strong seasonality of Natural Gascontracts. The roll is discontinuous: some contractsare more important and can be used for long periods

15

Page 16: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

Figure 12: Impact of rolling strategies on the indicator's Pro�ttrade performance and statistical signi�cance.

Long ST (Setup Trend) onSoybean Meal

Short Sequential on Cocoa Short Sequential on Nat. Gas

Rolling #1:

Rolling #2:

Rolling #3:

Rolling #4:

16

Page 17: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

in the continuous �at price curve, while others canbe completely ignored.

4.3. Synthesis of the performance tests

Three DeMark indicators have been tested to gener-ate long and short outright entry signals on commod-ity futures, which, as mentioned before, are the basictype of exchange based �nancial instrument withintraded commodities. The number of holding days isswept and this allows to study trade performancesduring the days that follow entry signals, just like in�g. 9, 10 and 11.Given a �xed number of holding days, as before,

we consider the following performance metrics intro-duced in section 4.1: (i) mean return: Pro�ttrade; (ii)Pro�t Factor Pf de�ned in equation (13) and (iii)Risk-Return-Ratio RRRtrade. If such a performancemetric is measured to go beyond what can be ex-pected by randomness by having a value within theshaded area of previous �gures, then the indicatoris predictive. Ideally, measured performance shouldbe within the dark shaded quantiles for each holdingday. In this way, positions can be entered with a de-lay while still being on the correct side of the tradeand they can be closed whenever the trader feels morecomfortable.Let us assume instead that there is a limited range

of holding days for which the indicator has predictivepower and that we want to replicate the encouragingresults by trading with it. As soon as the entry sig-nal is given, a position will be taken. This might notbe possible if limits on margin requirements or mar-ket exposures have been reached already. Regardingwhen to exit the position, we might face an uncom-fortable situation in which a choice has to be madebetween taking pro�t or waiting till the end of theideal holding period. None of these problems wouldarise if the indicator would provide statistically signif-icant entry signals regardless of the holding period.By design, Monte-Carlo permutation tests de-

scribed in section 4 use the performance metrics totest the indicator's predictive power over the holdingdays. To quantify the information contained in such�gures as �g. 9, 10 and 11, we introduce the stabilityσ of an indicator's predictive power over a speci�cmarket, which is de�ned as the percentage of holding

days following entry signals that show statisticallysigni�cant performance, with 100% representing theoptimal case. Nevertheless, the most suited indicatorfor a given market should jointly maximize σ, this isthe priority, and the performance measure, also calledpro�t potential. The latter is computed as the aver-age of Pro�ttrade values that belong to statisticallysigni�cant holding days, if there are any. It seemsa simple but e�ective way to limit the data mininge�ect that would occur if the maximum Pro�ttradevalue within the 14 holding days would be chosen torepresent the pro�t potential of an indicator.This two-dimensional evaluation framework with σ

(% of signi�cant holding days) on the horizontal axisand pro�t potential on the vertical axis (i.e averagePro�ttrade) has been applied to the DeMark indica-tors over the 21 commodity futures markets listed intable 2. In �g. 13(a), indicators are evaluated onlyfor their long entry signals, in 13(b) only for shortentry signals and in 13(c) for both longs and shorts.The most interesting indicator-market combinationsare represented in the shaded areas of �g. 13. De-Mark indicators have sparse entry signals. Across allcommodities, each indicator enters the markets withthe frequencies shown in table 5.

Table 5: Across all commodities, each indicator enters the mar-kets with the following frequencies (total positions/ 10 years):

pos./year Sequential Combo ST

minimum: 3.0 1.2 3.4mean: 3.9 1.7 4.5maximum: 4.6 2.2 6.1

ST (Setup Trend) provides the highest number oftrades and is predictive on a few markets, especiallywith long entry signals. In addition, it captures cor-rectly the direction of the market and this is alwaystrue when both long and short positions are possible.Sequential and its Combo variant generate less entrysignals compared to ST. As explained in section 2,Sequential and Combo need every time a new Setupbefore completing an entry signal while ST uses theSetup phase only to update support and resistancecurves. If we also consider that these two indicatorsneed to ful�l additional conditions during the Count-

17

Page 18: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

down phase or the Combo phase, then it takes ideallyaround one month before an entry signal can be com-pleted on Sequential or Combo. Quite interestingly,Sequential has shown statistically signi�cant perfor-mance for either long or short positions on all com-modity futures apart from Platinum. Unfortunately,just like its Combo version, this indicator does notseem to be able to forecast the correct market direc-tion. This limits our trading strategies, but forthcom-ing price move in an unknown direction can still bepro�table, for example by using a long straddle op-tion strategy. Looking at �g. 13(a), long Sequentialon energy products is more a trend detector that aturning point detector and the market is more likelyto continue its negative trend rather than to shift toa new positive trend.Therefore, Setup can identify negative trends, but

markets seem to have a price inertia that is too bigto be captured by the current Countdown parame-ters. Indicator-market combinations that in �g. 13appear in the stable but unpro�table area can still beinformative if interpreted correctly.So far, �g. 13 has provided a high level overview of

the behaviour of the indicators on several markets.The framework can be studied in more details bycomparing results from di�erent performance mea-sures within the permutation test setup, like in �g.14. Conditional distributions of returns versus un-conditional returns can be used as an additional coun-tercheck.For example, �g. 13(a) highlights a good perfor-

mance for long ST (Setup Trend) entry signals on soy-bean meal. A more in depth analysis based on �g. 14shows that Pro�ttrade grows regularly over the hold-ing period and, at the same time, it stays steadily inthe shaded area which represents a possible or statis-tically signi�cant result. Furthermore the quantilesof conditional returns are also steadily above the cor-responding quantiles generated from unconditionalmarket returns. These observations are partially con-�rmed by additional permutation tests using di�er-ent metrics. While results are similar when Pf isbeing used, RRRtrade is in the region of signi�cancetoo, but less frequently. The same kind of thinkingshould be applied to the other examples. Sequentialon Cocoa is shown as a successful example for short

(a)

(b)

(c)

Figure 13: Evaluation framework that shows for each indicatorits σ on the horizontal axis (% of signi�cant holding days) andthe corresponding pro�t potential on the vertical axis (averagePro�ttrade). The commodity market is speci�ed by a numberwhich refers to table 2. Blue colour represents Sequential (Sq.),green is for Combo (Cm.) and red is for ST.

18

Page 19: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

positions. If we also recall the interesting results forlong positions previously described in section 4, thenSequential is a predictive indicator also when bothlong and short positions are considered, as con�rmedby �g. 13(c). The last example in �g. 14 shows statis-tical signi�cance for long and short ST entry signalson wheat and it shows how results might depend onthe holding period. Across all metrics, there is nicepredictive power, but this only appears 11-12 daysafter the position has been entered.

5. Conclusion

Currently, there are relatively few studies of tech-nical analysis on commodity futures markets. In thiswork, the predictive power of three DeMark techni-cal indicators (Sequential, Combo and Setup Trend)has been tested from Jan. 2004 to Jan. 2014 on 21commodity futures belonging to the following classes:grains, softs, energy, industrial metals and preciousmetals.Most academic studies test indicators that are not

frequently used in practice. An original aspect of thepresent work is to test indicators that are currentlyamong the most popular ones. These indicators areindeed found and can be used on leading �nancialplatforms.Mr. DeMark is mainly renowned for his Sequential.

It is a time-based indicator that identi�es potentialturning points from trends (Setup phase) and thenforecasts the beginning of price reversals (Countdownphase). Combo is the main variant to Sequential:while it uses di�erent rules to forecast the timing ofprice reversals, turning point identi�cation stays thesame via the Setup phase. ST (Setup Trend) is com-plementary to both because it uses the Setup as well,but it tries to capture sustainable trends instead ofsearching for price reversal patterns. These are allindicators that provide entry signals, they are nottrading systems.For each trading day, DeMark indicators need bar

charts (starting, highest, lowest and closing prices).With the average trade frequency (3.9 trades peryear for Sequential, 1.7 for Combo and 4.5 for ST),we can conclude that the entry signals are sparse.This means that, for most of the tested period, the

trade signal would have been out of the market. Inpractice, this limits the possibilities regarding per-formance measurement because such sparse positionsblock the use of measures which show pro�t evolutionover the trading period (e.g., Net Asset Value).Before running the backtest, daily returns have

been computed from discontinuous commodity fu-tures markets. This has been done by rolling theindividual contracts into one continuous futures priceseries. This approach is the most common for techni-cal traders who trade in commodity futures markets.It is also the most straightforward way for investorsto get exposed to commodity prices. Long or shortpositions are entered just on one contract, for exam-ple always on the rolled front contract. This trad-ing style makes pro�ts when positions are properlymatched with daily �at price movements of a con-tract and it is usually referred to as outright trading.Traditional commodity trading instead makes a lim-ited use of this trading style. In fact, typical com-modity traders speculate mostly without outright ex-posures (time-spreads and inter-product spreads aretheir bread and butter), which means that their dailypro�ts do not depend, to a certain extent dependingalso on correlations between contracts, on �at pricemovements.The predictive power of each indicator has been

studied in two steps. The �rst one was to compareconditional returns on entry signals to exact uncondi-tional return distributions (which represent the mar-ket). An over-performance of the conditional distri-bution compared with the market suggests that thetested indicator might have predictive power. Thesecond step has used approximated permutation teststo check if the initial suggestion is correct.We �nd that all three indicators exhibit predictive

power on some commodity futures. Most of the times,the entry signals provided by the indicators show pre-dictive power only for long or only for short posi-tions. If we consider that long and short entry signalsare generated by symmetrical algorithms, then thiscon�rms the fact that uptrends and downtrends areasymmetrical in the markets. For all the commodityfutures apart from Platinum, DeMark's Sequential in-dicator has shown statistically signi�cant predictivepower for either long or short entry positions. It is

19

Page 20: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

informative on energy for long positions and on theother commodity classes for short positions. LightCrude, Heating Oil and Gas Oil are an exception be-cause both long and short positions are informative.Although Sequential is described as a time-based in-dicator that identi�es turning points, there are prod-ucts or even commodity classes, like energy products,where entry signals (long and/or short) identify con-tinuing trends instead of turning points. Combo hasmany similarities with Sequential, but the main dif-ference is that the number of trades is on average 30-40% lower. Compared to Sequential, there are morecases in which the signal is predictive for both longand short signals, for example with Gold and Silver.ST has the highest number of trades (4.5 trades/yearon average) and provides the correct trade direction,but it shows predictive power on the lowest numberof futures (6 out of 21 markets) and mainly for longpositions. Long ST signals are informative in particu-lar for grains while for combinations of long and shortpositions, there is statistical signi�cance for Wheat,Soybean Meal, Natural Gas NYMEX, Brent, Goldand Copper NYMEX.The choice of which indicator to use to generate

trades on a given market should be mainly drivenby the stability of predictive power over the holdingdays. Nevertheless, it is also important to include ameasure of expected pro�t potential because it is notsu�cient to over-perform the market if still no pro�tscan be made. This seems a more complete approachcompared to only choosing markets where indicatorsare just over-performing, but it also carries furthercomplications. If the choice to trade a signal on aspeci�c market is based mainly on the maximizationof the observed pro�t potential, then it is likely thatthe measured performance will be lower compared toexpectations. For this reason, and also because mar-ket conditions might change during the tested period,results should be cross-validated on the most recentout-of-sample-data.Another original element of the present work is the

study of the sensitivity to di�erent rolling strategiesfor predictive power and pro�t potential. A continu-ous price series of a futures contract must have onecontract selected for each trading day. In general, ituses prices from contracts that are close to expiry to

capture both spot price and short term expectations,but there are potentially in�nite ways to roll over tothe next contract. Four di�erent rolling strategieshave been tested. The main conclusion is that, whenthe roll is done on the expiry day, then the stabilityof predictive power across the holding days decreasesand, in two out of three examples, there is even no sta-tistical signi�cance left. Furthermore, for this rollingstrategy, the average pro�t per trade is always thelowest compared to the other rolling strategies.A natural extension of this work should investigate

the data snooping bias, or selection bias (Daniel et al.,2009). The higher is the number of indicators beingtested on the same historical data-set or the higheris the number of data-sets tested on the same indi-cator, the higher is the probability that luck had animpact on the most statistically interesting results.Regarding this topic, Kuang et al. (2014) review andcompare a broad range of data snooping tests on25'988 trading rules over 9 currency markets, fromWhite's reality check (White, 2000) to more elabo-rated schemes. In our case, results do not seem tobe driven by luck due to a relatively low number ofcombinations (3 trading rules over 21 data-sets). Infact, Sequential provides statistically relevant results(either for long, short or long/short entry signals) onalmost every tested market.Further developments of this work should include

backtests of the ST indicator using complete entryand exit signals, a more general study on the e�ectsof rolling strategies on backtests and, speci�cally forbacktests on commodity futures, time-spreads andinter-product spreads should be added as di�erentsources of market exposures. Parameter optimiza-tion was not included in this work because the �rststep when testing indicators is to analyse their natu-ral trading potential (the stability of predictive powercombined with pro�t potential) on speci�c markets.Only then, if it is worth the e�ort, parameters can beoptimized to maximize trading potential.

20

Page 21: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

Appendix A. Parameters used during the

backtests

Table A.6: List of parameters used during the backtests

Backtested Period

start: 1/1/2004end: 1/1/2014trading days: 2610DeMark Parameters

m 9n 4Sequential & Combo:p 13q 4k 8aggressive Countdown onEntry Strategy:conservative onRolling Strategy

Main: #3Others: #1, #2, #4Quality Measures

Main: Pro�ttradeOthers: Pf or RRRtrade

List of Commodities

See tab. 2Signi�cance Test

Type:Permutation TestParameters:# of holding days 1-14# of permuted signals 400p-values 5%, 10%Con�dence intervals:Clopper-PearsonConover (1999)

References

Agresti, A., Coull, B. A., 1998. Approximate is bet-ter than "exact" for interval estimation of bino-mial proportions. The American Statistician Vol.52, 119�126.

Andersen, J. V., Gluzman, S., Sornette, D., 2000.Fundamental framework for technical analysis. Eu-ropean Physical Journal Vol . B 14, 579�601.

Ariely, D., 2010. Pedictably irrational. New York andLondon: Harper Perennial.

Aronson, D. R., 2007. Evidence-Based Techical Anal-ysis: Applying the Scienti�c Method and Statisti-cal Inference to Trading Signals. Wiley.

Benyamini, Z., 2009. Going long vs. going short. Tech-nical Analysis of Stocks & Commodities Vol. 27:7,10�14.

Bikhchandani, S., Sharma, S., 2001. Herd behaviorin �nancial markets. IMF Sta� Papers Vol. 47:3,279�310.

Billingsley, R., Chance, D., 1996. Bene�ts and limita-tions of diversi�cation among commodity tradingadvisors. Journal of Portfolio Management Vol. 23,65�80.

Brock, W., Lakonishock, J., LeBaron, B., 1992. Sim-ple technical trading rules and the stochastic prop-erties of stock returns. Journal of Finance Vol. 47,1731�1764.

Carchano, O., Pardo, A., 2009. Rolling over stock in-dex futures contracts. The Journal of Futures Mar-kets Vol. 29:7, 684�694.

Chan, E. P., 2013. Algorithmic trading: winningstrategies and their rationale. John Wiley & Sons.

Chan, L., Lin, L., 2004. Boosting pro�tability. Tech-nical Analysis of Stocks & Commodities Vol. 22:8,28�32.

Coles, A., 2011. Automated techniques for intradytraders. Technical Analysis of Stocks & Commodi-ties Vol. 29:8, 14�31.

Conover, W. J., 1999. Practical NonparametricStatistics. Wiley.

Covel, M. W., 2009. The Complete Turtle Trader.HarperCollins.

21

Page 22: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

Daniel, G., Sornette, D., Woehrmann, P., 2009. Look-ahead benchmark bias in portfolio performanceevaluation. Journal of Portfolio Management Vol.36:1, 121�130.

DeMark, T., 1997. New Market Timing Techniques:Innovative Studies in Market Rythm & Price Ex-haustion. Wiley.

Devenow, A., Welch, I., 1996. Rational herding in�nancial economics. European Economic ReviewVol. 40:3-5, 603�615.

Ehrenberg, R., 1928. Capital and Finance in the Ageof the Reinassance: A Study of the Fuggers. Hard-court Brace.

Fama, E., 1995. Random walks in stock market prices.Financial Analysts Journal Vol. 51:1, 75�80.

Filimonov, V., Bicchetti, D., Maystre, N., Sornette,D., 2014. Quanti�cation of the high level of endo-geneity and of structural regime shifts in commod-ity prices. The Journal of International Money andFinance Vol. 42, 174�192.

Garzarelli, F., Cristelli, M., Zaccaria, A., Pietronero,L., 2014. Memory e�ects in stock price dynamics:evidences of technical trading. Nature, Scienti�cReports Vol. 4, Article number: 4487.

Gehrig, T., Menkho�, L., 2006. Extended evidence onthe use of technical analysis in foreign exchange. In-ternational Journal of Finance and Economics Vol.11:4, 327�338.

Gilbert, C., 2010. Speculative in�uences on commod-ity futures prices 2006-2008. Tech. rep., UNCTADDiscussion Paper No.197.

Gorton, G., Hayashi, F., Rouwenhorst, K., 2007. Thefundamentals of commodity futures returns. work-ing paper no. 13249. Tech. rep., National Bureauof Economic Research (NBER).

Grinblatt, M., Han, B., 2005. Prospect theory, mentalaccounting, and momentum. Journal of FinancialEconomics Vol. 78:2, 311�339.

Gromb, D., Vayanos, D., 2010. Limits of arbitrage.Annual Review of Financial Economics Vol. 2:1,251�275.

Hamori, S., Hamori, N., Anderson, D. A., 2001. Anempirical analysis of the e�ciency of the osaka ricemarket during japan's tokugawa era. The Journalof Futures Markets Vol. 21, 861�874.

Harris, M., 2009. Pro�tability and Systematic Trad-ing. Wiley.

Hirshleifer, D., Teoh, S., 2003. Herd behaviour andcascading in capital markets; a review and synthe-sis. European Financial Management Vol. 9:1, 25�66.

Irwin, S. H., 2007. What do we know about the prof-itability of technical analysis? Journal of EconomcSurveys Vol. 21, 786�826.

James, F., 1968. Monthly moving averages - an ef-fective investment tool? Journal of Financial andQuantitiative Analysis Vol 3:3, 315�326.

Jensen, M., 1967. Random walks: reality or myth -comment. Financial Analysts Journal Vol. 23, 77�85.

Johnsson, R., 07 2010. A simple risk-return-ratio.URL http://www.richardcbjohnsson.net/pdf/

risk_return_ratio.pdf

Khan, M., 2009. The 2008 oil price "bubble". policybrief 09/19. Tech. rep., Peterson Institute of Inter-national Economics, Washington DC.

Kosar, J., 1991. Support and resistance levels. Tech-nical Analysis of Stocks & Commodities Vol. 9:1,17�19.

Kuang, P., Schröder, M., Wang, Q., 2014. Illusorypro�tability of technical analysis in emerging for-eign exchange markets. International Journal ofForecasting Vol. 30, 192�205.

Lo, A. W., Harry, M., Wang, J., 2000. Fundationsof technical analysis: Computational algorithms,statistical inference and empirical implementation.The Journal of Finance Vol. 55:4, 1705�1765.

22

Page 23: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

Lo, A. W., Hasanhodzic, J., 2010. The Evolution ofTechnical Analysis. Wiley.

Lukac, L. P., Brorsen, B. W., 1990. A comprehensivetest of futures market disequilibrium. The Finan-cial Review Vol. 25:2, 593�622.

Lukac, L. P., Brorsen, B. W., Irwin, S. H., 1988. Atest of futures market disequilibrium using twelvedi�erent technical trading systems. Applied Eco-nomics Vol. 20, 623�639.

Ma, C. K., Mercer, J. M., Walker, M. A., 1992.Rolling over futures contracts: A note. The Journalof Futures Markets Vol. 12:2, 203�217.

Masteika, S., Rutkauskas, A. V., 2012. Research onfutures trend trading strategy based on short termchart pattern. Journal of Business Economics andManagement Vol. 13 (5), 915�930.URL http://www.tandfonline.com/doi/abs/10.

3846/16111699.2012.705252

Masteika, S., Rutkauskas, A. V., Alexander, J. A.,2012. Continuous futures data series for back test-ing and technical analysis. In: 2012 InternationalConference on Economics, Business and MarketingManagement.

Masters, T., 2010. Monte-carlo evaluation of tradingsystems.URL http://www.evidencebasedta.com/

montedoc12.15.06.pdf

Menkho�, L., Taylor, M. P., 2007. The obstinate pas-sion of foreign exchange professionals: Technicalanalysis. Journal of Economic Literature Vol. 45,936�972.

Miner, R., 1991. Time as a trading tool. TechnicalAnalysis of Stocks & Commodities Vol. 9:3, 113�115.

NASDAQ, July 2013. NASDAQ Commodity IndexMethodology.

OriginalTurtles.org, 2003. The original turtle tradingrules.URL http://www.dailystocks.com/

turtlerules.pdf

Pardo, R., 2008. The Evaluation and Optimization ofTrading Strategies. John Wiley & Sons.

Pelletier, B., 2011. Computed contracts: Theirmeaning, purpose and application. In: An Essayon Computed Contracts.URL http://www.csidata.com/cgi-bin/

getManualPage.pl?URL=essay.htm

Penteado, M. A., 2013. E�cient markets, behavioral�nance and a statistical evidence of the validity oftechnical analysis. Master's thesis, Cornell Univer-sity Library.

Perl, J., 2008. DeMark Indicators. Wiley.

Phillips, P., Yu, J., 2010. Dating the timeline of �-nancial bubbles during the subprime crisis. Mas-ter's thesis, Cowles FUndation Discussion PaperNo. 1770, Yale University.

Reuters, August 2010. Futures Continuous Series,Methodology and De�nitions. 0th Edition.

Roberts, M. C., 2003. Technical analysis in commod-ity markets: Risk, returns, and value. In: Confer-ence on Applied Commodity Price Analysis, Fore-casting, and Market Risk Management.

Ross, S., 2005. Neoclassical Finance. Princeton Uni-versity Press, Princeton.

Samuelson, P., 1965. Proof that properly anticipatedprices �uctuate randomly. Industrial ManagementReview Vol. 6, 41�51.

Shleifer, A., Vishny, R., 1997. The limits of arbitrage.Journal of Finance Vol. 52:2, 737�783.

Smidt, S., 1964. Amateur speculators. Master's the-sis, Graduate School of Business and Public Ad-ministration, Cornell University.

Sornette, D., Cauwels, P., 2014. 1980-2008: The illu-sion of the perpetual money machine and what itbodes for the future. Risks Vol. 2, 103�131.

Sornette, D., Cauwels, P., 2015a. Financial bubbles:mechanisms and diagnostics. Review of BehavioralEconomics Vol. 2 (3), 279�305.

23

Page 24: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

Sornette, D., Cauwels, P., 2015b. Managing risks ina creepy world. Journal of Risk Management inFinancial Institutions Vol. 8 (1), 83�108.

Sornette, D., Woodard, R., Zhou, W.-X., 2009. The2006-2008 oil bubble: evidence of speculation, andprediction. Physica A Vol. 388, 1571�1576.

Sta�ord, P., 2015. Symphony is just the latest attackon bloomberg fortress. Tech. rep., Financial Times.

Tang, K., Xiong, W., 2010. Index investment and�nancialization of commodities. working paper no.16385. Tech. rep., National Bureau of EconomicResearch (NBER).

UNCTAD, 2011. Price formation in �nancialized com-modity markets: the role of information. Tech. rep.,United Nations.

White, H., 2000. A reality check for data snooping.Econometrica Vol. 68:5, 1097�1126.

Widner, M., 1998. Automated support and resistance.Technical Analysis of Stocks & Commodities Vol.16:5, 225�232.

Zhou, G., 2010. How much stock return predictabilitycan we expect from an asset pricing model? Eco-nomic Letters Vol. 108, 184�186.

Zhou, G., Zhu, Y., Qiang, S., 2012. Asset allocation:can technical analysis add value? Int. J. PortfolioAnalysis and Management Vol. 1:1, 43�58.

24

Page 25: Statistical Testing of DeMark Technical Indicators on ... · Statistical Testing of DeMark Technical Indicators on Commodity uturesF ... principles. Commodity markets ... price ratios

Figure 14: Permutation tests and conditional versus unconditional returns are being applied to three signal-market examples.

Long ST (Setup Trend) onSoybean Meal

Short Sequential on Cocoa Long/Short ST on Wheat

Permutations - Pro�ttrade:

Permutations - Pf :

Permutations - RRRtrade:

Conditional returns:

only short entry signals are

being tested on Cocoa

only long entry signals are being

tested on Soybean Meal25