lsm wp cover 2012 XX candlesticks - UCLouvain · PDF fileDo Japanese candlesticks help solve...

22
Benoit Detollenaere, Paolo Mazza, Louvain School of Management WORKING PAPER 2012/XX Do Japanese candlesticks help solve the trader’s dilemma? LOUVAIN SCHOOL OF MANAGEMENT RESEARCH INSTITUTE

Transcript of lsm wp cover 2012 XX candlesticks - UCLouvain · PDF fileDo Japanese candlesticks help solve...

Benoit Detollenaere, Paolo Mazza, Louvain School of Management

WORKING PAPER 2012/XX

Do Japanese candlesticks help solve the trader’s dilemma?

LOUVAIN SCHOOL OF MANAGEMENT RESEARCH INSTITUTE

Do Japanese candlesticks help solve the trader’s dilemma?

Benoit Detollenaere, Louvain School of Management Paolo Mazza, Louvain School of Management

Summary

In this paper we investigate whether Japanese candlesticks can help traders to find the best trade-off between market timing and market impact costs. Based on fixed-effect panel regressions on a sample of 81 European stocks, we show that implicit transaction costs are better characterized by using specific Japanese candlesticks patterns. Although market timing costs are not lower when Hammer-like and Doji configurations occur, market impact costs are significantly lower when and after a Doji structure occurs. We further check the potential gains through order submission simulations and find that submission strategies based on the occurrence of Dojis result in significantly lower market impact cost than random submission strategies. These findings are of great interest for investors who look for occasional liquidity pools to execute their orders inexpensively such as institutional traders or hedgers

Keywords : Liquidity, Candlesticks, Transaction costs, Market timing, Market impact

JEL Classification: C10, G14.

Louvain School of Management Working Paper Series Editor : Prof. Per J. Agrell

Corresponding author : Benoit Detolleneare Center for Excellence CESAM Louvain School of Management / Campus Mons Unversity catholique de Louvain Chaussée de Binche, 151 B-7000 MONS, BELGIUM Email : [email protected]

The papers in the WP series have undergone only limited review and may be updated, corrected or withdrawn without changing numbering. Please contact the corresponding author directly for any comments or questions regarding the paper. ILSM, UC Louvain, 1 place des doyens, B-1348 Louvain-la-Neuve, BELGIUM www.uclouvain.be/ilsm and www.uclouvain.be/lsm_WP

LOUVAIN SCHOOL OF MANAGEMENT WORKING PAPER2012/00

DO JAPANESE CANDLESTICKS HELP SOLVE THE TRADER’SDILEMMA?

Benoit Detollenaere1 Paolo Mazza2

November 2012

Abstract

In this paper we investigate whether Japanese candlesticks can help traders to find thebest trade-off between market timing and market impact costs. Based on fixed-effectpanel regressions on a sample of 81 European stocks, we show that implicit transactioncosts are better characterized by using specific Japanese candlesticks patterns. Al-though market timing costs are not lower when Hammer-like and Doji configurationsoccur, market impact costs are significantly lower when and after a Doji structure oc-curs. We further check the potential gains through order submission simulations andfind that submission strategies based on the occurrence of Dojis result in significantlylower market impact cost than random submission strategies. These findings are ofgreat interest for investors who look for occasional liquidity pools to execute their or-ders inexpensively such as institutional traders or hedgers.

Keywords: Liquidity, Candlesticks, Transaction costs, Market timing, Market impactJEL Classification: G14, G10.

The authors are grateful to NYSE Euronext in Paris for providing the data. We alsothank Catherine D’Hondt, Rudy De Winne, Mikael Petitjean and Marco Pagano for pro-viding useful comments and suggestions. Any remaining errors are the responsibility of theauthors. The authors gratefully acknowledge the support from the ARC grant 09/14-025.

1Louvain School of Management, Universite catholique de Louvain, 151 Chaussee de Binche - 7000 Mons(Belgium), E-mail: [email protected]. Phone: +32 (0) 65 323 441.

2Louvain School of Management, Universite catholique de Louvain, 151 Chaussee de Binche - 7000 Mons(Belgium). E-mail: [email protected]. Phone: +32 (0) 65 323 552.

1 Introduction

Transaction cost management has always been a major concern of the implementationof trading decisions. There are different components in transaction costs. Explicit costs,which can be determined before the execution of the trade, refer to brokerage commissions,market fees, clearing costs, settlement costs and taxes. Implicit costs, which are not visibleand cannot be evaluated ex-ante, consist of bid-ask spread, market impact and opportunitycosts.1 Bid-ask spread is a compensation for the supply of liquidity. Market impact is thecost incurred for consuming more than the liquidity available at the best opposite quote(BOQ hereafter). Opportunity costs are due to the price movement that materializesbetween the trade decision and the trade itself. Market timing costs belong to the lattercategory and denote the additional cost incurred when traders split their order to lowermarket impact.

The main challenge when implementing trade decisions lies in the impossibility toreduce all costs components simultaneously: traders have to strike a balance to identifythe best trade-off for their execution needs. The most tricky issue is linked to the so-calledtrader’s dilemma. When traders place market orders, they always have to decide whetherthey should split their orders over time to reduce market impact, or submit them directlywhich probably incur the cost of drying out quantities outstanding at the BOQ for largeorder sizes. When they split an order, traders are however exposed to a potential adverseprice evolution that may hinder their performance, i.e. market timing opportunity cost.For instance, if a trader wants to buy a large quantity, and therefore decide to split theorder over 3 days, a positive price appreciation during this period will significantly hinderthe order execution. This cost may be viewed as a risk since the price evolution maypositively or negatively affect the execution.

The question that this paper addresses is the following: Is it possible to solve the trader’sdilemma by using Japanese candlesticks? Japanese candlesticks are an Eastern chartingtechnique that represents open-high-low-close price movements. Candlestick charts givemarket participants a quick snapshot of buying and selling pressures, as well as turningpoints. Candlesticks are related to transaction costs for several reasons. First, as outlinedby Kavajecz and Odders-White (2004), price dynamics, which are easily characterized bycandlesticks, are expected to be related to modifications in the state of the limit order bookand to the supply of liquidity. Transactions costs and liquidity are negatively correlated:market impact rises (drops) rapidly when liquidity is low (high). Wang et al. (2012) alsooutline that order submission strategies are related to technical analysis in the TaiwanStock Exchange. They also argue on causality indicating that technical analysis driveschanges in order submission strategies. Second, Mazza (2012) finds that liquidity is higher

1Opportunity costs include three different components: operational opportunity costs, market timingopportunity costs and missed trade opportunity costs. Operational opportunity costs arise when the delayrequired to trade is operational, the second component is due to the market timing under the control ofthe broker and the missed trade opportunity costs occur when the total size has not been fully executed.

1

when some particular candlestick structures occur, suggesting that a relationship doesexist between limit order book variables and price movements. Third, according to theliterature on Japanese candlesticks, some structures may help forecast future prices, whichdetermines market timing costs. This argument stands directly against the efficient markethypothesis of Fama (1970). In this paper, we restrict our analysis to Doji and Hammer-likeconfigurations which are described in the following section.

Using market data on a sample of European stocks belonging to three national indexes(BEL20, AEX, CAC40), we study order sequences and estimate fixed-effects panel regres-sion models including market impact or market timing costs as the dependant variable.Dummy variables that identify the occurrence of candlestick structures as well as a set ofcontrol variables are explanatory. We establish different types of relationships with contem-poraneous and lagged signals in order to check whether it is possible to lower transactioncosts after the apparition of a potential signal. In a second step, in order to further assesswhether candlesticks are useful or not in this regard, we compare the market impact costof an average quantity submitted after the apparition of a signal to the market impact costof the same quantity submitted randomly along the day.

Our results suggest that market impact is lower at the time of a Doji and after itsoccurrence. There is no impact for Hammer-like configurations. Market timing cost isnot lower when these structures occur. As market timing costs are mainly determinedby price movements, we question the usefulness of candlesticks in predicting future stockprices and contribute to the previous literature on the efficient market hypothesis. Orderprocessing simulations also show that transaction costs are lower when large orders are notsplit over time after the occurrence of a signal. All our results suggest that candlesticks mayhelp traders solve their dilemma by identifying the right moment for submitting aggressiveorders.

The remainder of the paper is organized as follows. Section 2 provides a description ofJapanese candlesticks. Section 3 describes the dataset. Section 4 presents the methodologyand the results of the panel regressions. Section 5 reports the methodology and the resultsof the simulations. The final section concludes.

2 Japanese Candlesticks

Japanese candlesticks are a technical analysis charting technique based on High-Low-Open-Close prices.2 The formation process of candlesticks appears in Figure 1. Depending onthe length of the shadows and the size and color of the bodies, many structures may beidentified, from one to five candles. These candlesticks emphasize what happened in themarket at that particular moment. Each configuration can be translated into traders’

2Steve Nison was the first to bring this method to the west in the nineties, even if Japanese candlestickshave been used for centuries in eastern countries. See Nison (1991), Nison (1994), Morris (1995) and Bigalow(2001) for more information on candlestick charting.

2

behaviors through price dynamics implied by buying and selling pressures.

Figure 1: Candlestick formation process

Japanese candlesticks are interesting because they summarize a lot of information inone single chart: the closing price, the opening price as well as the lowest and highest prices.With the raising interest in high frequency trading and the narrowing of trading intervals,they have been increasingly used by practitioners to capture short term price dynamics.Papers addressing candlesticks enter in the ”stock return predictability” category. For ex-ample, Marshall et al. (2006) and Marshall et al. (2008) find no evidence that candlestickshave predictive value for the Dow Jones Industrial Average stocks and for the Japaneseequity market, respectively. They replicate daily data with a bootstrap methodology sim-ilar to the one used in Brock et al. (1992). However, intraday data is more relevant astraders do not typically wait for the closing of the day to place an order. Nevertheless,using intraday candlesticks charts on two future contracts (the DAX stock index contractand the Bund interest rate future), Fock et al. (2005) still find no evidence which suggeststhat candlesticks, alone or in combination with other methods, have a predictive ability.However, none of these papers looks at the relationships between candlestick configura-tions and the transaction costs of trade sequences. To our knowledge, this paper is thefirst research study that investigates the information content of HLOC price movementsfor execution purposes.

In this paper, we investigate two categories of candlesticks structures. The first oneis the Doji category. The Doji is one of the core structures of the literature on Japanese

3

candlesticks.3 A Doji appears when the closing price is (almost) equal to the opening price.We observe different types of Dojis. The most frequent Doji is a ”plus”, i.e. no real bodyand almost equal shadows. If both closing and opening prices are also the highest priceof the interval, the Doji becomes a Dragonfly Doji. By contrast, it becomes a GravestoneDoji when both closing and opening prices are equal to the lowest price of the interval.In essence, the Doji is not an indicator of price reversal: it only helps detect the end ofthe current trend. Our signals are based on these three Doji structures, i.e. traditional,Dragonfly and Gravestone, and are disentangled in bullish and bearish signals: the Doji isbullish (bearish) when the previous candle is black (white) and the next candle is white(black). These configurations are presented in Figure 2. If these structures are able toforecast future short-term return, bullish (bearish) signals should result in higher (lower)market timing cost when the trader buys. The opposite should also be verified for sales.

Figure 2: Dojis

The Doji presents a closing price (almost) equal to the opening price. It occurs when there is an agreement on the

fair value of the asset and where markets are ’on a rest’. The Doji indicates the end of the previous trend. The most

traditional Doji is a ’plus’ sign but Dragonfly and Gravestone Dojis are also frequent. A Dragonfly Doji appears

when a strong buying pressure directly follows a strong selling pressure implying an upper shadow almost equal to

zero. The Gravestone Doji occurs when the buyers have dominated the first part of the session and the sellers, the

second one.

The second category contains Hammer-like configurations. Among Hammer-like struc-tures, there are four structures that are characterized by a long shadow and a small realbody. The Hammer appears at the end of a downtrend and is made of a very small realbody with (almost) no upper shadow and a very long lower shadow. The same structuremay appear at the end of an uptrend but, in that case, it is called a Hanging Man. In-verting the shadows, i.e. the upper shadow becomes the lower shadow and vice-versa, weobtain an Inverted Hammer at the end of a downtrend or a Shooting Star at the end ofan uptrend. Figure 3 shows these configurations. As these figures are said to be strong

3Nison (1991), Nison (1994) and Morris (1995).

4

reversal structures in the literature on Japanese candlesticks, they should have an influ-ence on market timing cost, if EMH does not hold: for purchases (sales), Hammer andInverted Hammer should lead to higher (lower) market timing cost, while Hanging Manand Shooting star should lead to lower (higher) market timing cost.

Figure 3: Hammer-like structures

The Hammer and the Hanging Man appear when sellers dominate the first part of the session and buyers, the second

part. By construction, they present a long lower shadow and almost no upper shadow. The Hammer occurs at the

end of a downtrend while the Hanging Man puts an end to an uptrend. The Inverted Hammer and the Shooting

Star are made with a small real body, a very long upper shadow and almost no lower shadow. The Inverted Hammer

appears at the end of a downtrend and the Shooting Star occurs at the end of an uptrend. These structures are said

to be strong reversal ones.

As outlined by Duvinage et al. (2012) and Marshall et al. (2006), candlestick-basedstrategies fail to beat a Buy-and-Hold strategy and therefore are not able to predict futureshort-term returns, confirming EMH. As a result, we do not expect market timing to beimproved around the occurrence of these structures. However, as outlined by Mazza (2012)and Kavajecz and Odders-White (2004), technical analysis and Japanese Candlesticks inparticular are related to higher liquidity in the limit order book and therefore should berelated to lower transaction costs, among which market impact costs.

3 Data

3.1 Sample

We use Euronext market data on 81 stocks belonging to three national indexes: BEL20,AEX or CAC40. We have tick-by-tick data for 61 trading days from February 1, 2006 toApril 30, 2006, including information on hidden orders and market members’ ID.

We have rebuilt High-Low-Open-Close prices from this database for the 81 stocks overthe whole sample period. As tick data are not adapted for candlestick analysis, we build

5

15-minute-intervals which leads to 34 intervals a day. This interval length is the besttrade-off which allows to include intraday trends and to avoid noisy candlestick patternsresulting from non-trading intervals. We use the HLOC prices calculated above in order toidentify candlestick configurations based on TA-Lib.4 We obtain a total of 167068 records(81 firms, 61 days, 34 intervals/day). From this dataset, we remove ‘Four Prices Dojis’because they are associated with non-trading patterns.5

We look at the occurrences of the identified structures and check whether Dojis appearat a particular moment during the day. Figure 4 shows that the distribution of Dojisis roughly uniform with the most significant peaks occurring during lunch time. Dojisalso seem to not occur frequently during the first two intervals of the day. This may beexplained by the strong unidirectional movement that appears at that moment, as trendsare at their very beginning. This should not influence our results. Table 3.1 presents thenumber of each structure which is identified in our dataset through the TA-lib.

Figure 4: Dojis by Interval

This figure displays the number of Dojis in each time interval.

4The TA-lib library is compatible with the MATLAB Software. For each type of configuration and foreach record, it returns ”1” if the bullish part of the structure is identified, ”-1” for the bearish part and ”0”otherwise. As the structures are bullish, bearish or both, for each event type, the values that may appearare [0 ; 1], [-1 ; 0] or [-1 ; 0 ; 1]. The TA-lib allows some flexibility in the recognition of the configurations.As it is an open source library, we have been able to check the parametrization of the structures. Thestructures are recognized according to the standard flexibility rules presented in Nison (1991) and Morris(1995). The TA-lib contains 61 pre-programmed structures.

5A Four Prices Doji occurs when all the prices are equal. When they occur in daily, weekly or monthlycharts, they are a strong clue of a potential reversal. However, in intraday price charts, they representnon-trading intervals.

6

Table 1: Number of signalsStructure CountHammer 4487Inverted Hammer 2264Shooting Star 972Hanging Man 5145Doji 29828Bearish Doji 18031Bullish Doji 11797Dragonfly Doji 7071Gravestone Doji 7557Bullish Dragonfly Doji 2575Bearish Dragonfly Doji 4496Bullish Gravestone Doji 3013Bearish Gravestone Doji 4544

3.2 Sequences of orders

In order to study the magnitude of transaction costs around candlestick signals, we dividethe trading days in 15-minute intervals and compute the transaction costs of sequences oforders submitted by market members.

We make the following assumptions when building our sequences: firstly, we only con-sider principal orders so that, in a given sequence, every order is submitted by the samemarket member for his own account. Secondly, we do not consider orders that provideliquidity because they do not generate transaction costs.

Then, we use the market member identity code6 to construct the sequences of ordersfor each stock. For a given market member, a sequence is initiated with a first marketableorder and cumulates the following marketable orders in the same direction. The sequencestops when the market member submits a passive order,7 changes order direction, or whenit reaches the end of the interval.

The descriptive statistics of the sequences are presented in Table 2. Duration andvolume respectively denote the duration and the volume of the sequence, while N denotesthe number of orders in the sequence. We observe that the distributions of the number oforders are similar across the three different exchanges. The duration is however lower forthe CAC40 and the AEX compared to the BEL20.

6Actually, these ID codes are numerical in order to ensure market members’ anonymity but allow us toisolate the whole set of orders or trades associated with a given member from the other orders and tradesin the sample.

7By passive order we mean an order that is neither a market order nor a marketable limit order.

7

Table 2: Sequences - Descriptive Statistics

CAC40 Mean Median Maximum Minimum Standard Deviation

Duration 00:04:23 00:02:49 00:15:00 00:00:01 00:04:20V olume 203191 96391 14234329 23 362943N 3.45 3.00 428.00 2.00 3.25

AEX

Duration 00:04:26 00:02:51 00:15:00 00:00:01 00:04:23V olume 192262 95249 30830446 31 337990N 3.30 2.00 121.00 2.00 2.47

BEL20

Duration 00:06:19 00:05:19 00:15:00 00:00:01 00:04:59V olume 88801 52762 6460514 41 140701N 3.44 2.00 100.00 2.00 4.64

Cross-sectional statistics on the sequences are reported for the three indexes of the whole sample. N refersto the sequence’s number of orders. V olume is the sequence’s volume expressed in currency units. Durationrefers to the execution time of the sequences.

3.3 Transaction costs measures

The market impact of an order i is computed as the signed difference between the averageexecution price (AEPi) and the BOQ prevailing at the order i submission time (BOQi),expressed in percentage of the BOQ:

MIbuy/selli =

|AEPi −BOQi|BOQi

∗ 100

The market impact of a sequence j of n orders is expressed in percentage of the totalamount that the investor would pay without any transaction costs, i.e. the amount ifthe entire volume of the sequence executes at the BOQ prevailing at the beginning of thesequence (BOQ1). Practically, for a sequence j of n orders, we compute the sum of themarket impact of the n orders in EUR that we divide by the total quantity executed in thesequence j multiplied by the BOQ prevailing at the submission of the first order (BOQ1).

MIbuy/sellj =

∑ni=1Qi ∗BOQi ∗MIi∑n

i=1Qi ∗BOQ1∗ 100

Let’s assume a sequence that is made of two buy orders of 100 units respectively. TheBOQ at the submission time of the first order is equal to 84.5 and its AEP is equal to84.75. The BOQ at the submission time of the second order is equal to 85 and its AEP

8

paid is equal to 85.25. The market impact of the first order and the second order are equalto 0.295% and 0.294% respectively. The market impact of the entire sequence is equal to:

MI =(100 ∗ 84.5 ∗ 0.295%) + (100 ∗ 85 ∗ 0.294%)

(200 ∗ 84.5)= 0.2954%

The market timing of an order i is computed as the difference between the BOQi pre-vailing just before the submission of the order and the BOQ1 prevailing at the submissionof the first order of the sequence and is expressed as a percentage of the BOQ1. Themarket timing of the first order of the sequence is thus equal to zero.

MT buyi =

(BOQi −BOQ1)

BOQ1∗ 100

MT selli =

(BOQ1 −BOQi)

BOQ1∗ 100

The market timing of a sequence j of n orders is then expressed in percentage of thetotal amount the investor pays if the entire volume of the sequence executes at the BOQ1

prevailing at the beginning of the sequence. Practically, for a sequence j of n orders, wecompute the sum of the market timing cost of the n orders in EUR and we divide it bythe total quantity executed in the sequence j multiplied by the BOQ1 prevailing at thesubmission of the first order.

MTbuy/sellj =

∑ni=2MTi ∗Qi ∗BOQ1∑n

i=1Qi ∗BOQ1∗ 100 =

∑ni=2MTi ∗Qi∑n

i=1Qi∗ 100

In the example mentioned above, the market timing cost of the second order is equalto 85 minus 84.5 divided by 84.5 (0.5917%). And the market timing cost of the entiresequence is equal to:

MT =0.5917% ∗ 100

200= 0.2958%

4 Panel regressions

4.1 Methodology

We test the impact of candlestick structures on both market timing and market impactcosts components through different fixed-effects panel regression models in order to controlfor stock-specific effects. The robustness of standard errors is a major concern in panel re-gressions. Based on Petersen (2009), we apply the clustering approach that makes standarderrors heteroscedasticity-consistent. As outlined by Petersen (2009), this method producesunbiased standard errors when a firm effect does exist, as opposed to White, Newey-West,and Fama-MacBeth correction methods. Clusters are used to control for common factorsin the fixed effects. For instance, macroeconomic news may evenly affect all the stocks

9

that are present in an index. Omitting to control for common factors may lead to potentialbiases.

In our fixed-effect panel regression model, transaction costs are the dependent variable.We establish different regressions for the two components that we investigate, i.e. markettiming cost and market impact respectively. We first include dummy variables for each ofthe four candlestick structures, i.e. Hammer (H), Inverted Hammer (IH), Hanging Man(HM) and Shooting Star (SS). These dummies are equal to 1 when the structure has beendetected during the interval and 0 otherwise. We also include some control variables thatare key determinants of the sequence costs: the number of orders (Orders) of the sequence,its duration in minutes (Duration) and its volume in thousands (V ). The market timingcost is more likely to increase when there are more orders over a longer duration whilemarket impact cost decreases in the same conditions. A higher volume to trade resultsin higher costs whatever the component. We then control for the state of liquidity at thebeginning of the sequence by including the depth in thousands (Depth), and the relativespread in percentage, (RS). The Depth proxy sums the quantities outstanding at the fivebest opposite quotes, i.e. Depth =

∑5ı=1QBi, in case of sell orders and Depth =

∑5ı=1QAi,

in case of buy orders, where QBi and QAi are respectively the bid and ask quantitiesoutstanding at the limit i.

The model that we estimate is specified as follows:

M buyi,s,t = α0 + α1Orderss + α2Durations + α3Vs + α4Depths+α5RSs + α6Hi,t + α7IHi,t + α8HMi,t + α9SSi,t + νs,

where M buyi,s,t is the transaction cost component, measured for the buying sequence s that

begins during interval t for stock i, that can be either market impact or market timingcost.

The effect estimated in this regression is contemporaneous. We also conduct a similarregression with lagged signals, i.e. the dummy identification variables H, IH, HM andSS are lagged once:

M buyi,s,t = α0 + α1Orderss + α2Durations + α3Vs + α4Depths

+α5RSs + α6Hi,t−1 + α7IHi,t−1 + α8HMi,t−1 + α9SSi,t−1 + νs,

We conduct this regression in order to assess whether we can effectively base a strategyon the signal once it has fully appeared.

We apply the same methodology to Doji configurations, separately for all types Dojis(D) and Dragonfly (DF ) and Gravestone (GR) Dojis. The models are specified as followsfor contemporaneous effects on market impact:

MIbuyi,s,t = α0 + α1Orderss + α2Durations + α3Vs + α4Depths+α5RSs + α7Di,t + νs,

10

where MIbuyi,s,t is the market impact cost of the sequence s for stock i at interval t andDi,t is a dummy variable indicating the presence of a Doji and:

MIbuyi,s,t = α0 + α1Orderss + α2Durations + α3Vs + α4Depths+α5RSs + α6DFi,t + α7GRi,t + νs,

where DFi,t is a dummy variable indicating the presence of a Dragonfly Doji and GRi,t

is a dummy variable indicating the presence of a Gravestone Doji. The same regressionspecifications are also implemented for lagged signals.

However, for market timing cost, we need to know which evolution of future prices thesignal should lead to. We disentangle bullish and bearish Dojis by investigating the previoustrend, i.e. if the previous trend is negative (positive), the Doji is a bullish (bearish) signal.This process is only applicable to market timing costs as market impact is not affected byfuture price movements.

MT buyi,s,t = α0 + α1Orderss + α2Durations + α3Vs + α4Depths

+α5RSs + α6Dbulli,t + α7Dbeari,t + νs,

where MT buyi,s,t is the market timing cost of the sequence s for stock i at interval t and

Dbulli,t is a dummy variable indicating the presence of a bullish Doji and Dbeari,t, thepresence of a bearish Doji and:

MT buyi,s,t = α0 + α1Orderss + α2Durations + α3Vs + α4Depths

+α5RSs + α6DFbulli,t + α7DFbeari,t + α8GRbulli,t + α9GRbeari,t + νs,

where DFbulli,t and DFbeari,t respectively refer to dummy identification variablesof bullish and bearish Dragonfly Dojis while GRbulli,t and GRbeari,t respectively denotedummy identification variables of bullish and bearish Gravestone Dojis. The same regres-sion specifications are also implemented for lagged signals.

We expect market impact to be lower when one of these structures occur, implyinga negative sign for the dummy variables. This explanation is consistent with a higherliquidity supply in the order book around technical signals, as outlined by Mazza (2012)or Kavajecz and Odders-White (2004). If the signal is also an indicator of future pricemovements, which goes against the EMH, dummy variables associated with future priceshould lead to a decrease (increase) in market timing costs for buy (sell) order sequences.An opposite process should apply for signals of positive future price evolutions, if EMHstands. As the performance of candlesticks in predicting returns has been seriously ques-tioned in the literature, e.g. Duvinage et al. (2012) and Marshall et al. (2006), we do notexpect any significant effect in market timing regressions.

Orders and Duration should be negatively correlated with market impact and poten-tially positively correlated with market timing cost, depending on the future price evolution.

11

Splitting orders over a long time logically reduces market impact but increases market tim-ing cost. The trading volume of the sequence, V , should be positively correlated with bothmarket timing and market impact costs. Liquidity should be negatively related to transac-tion costs. Therefore, we expect depth to be negatively related to market impact and RSpositively related to this cost. The effect should be less significant for market timing costas the order size is smaller when orders are split, implying a lower liquidity effect.

4.2 Results

Table 3 to 6 present the results of the fixed-effects panel regression models by cluster offirms. First of all, the behavior of the control variables is consistent with our expectationsfor all models, for both lagged and contemporaneous effects. The market impact cost islower when Orders and duration increase, with a less significant effect for the latter asthe main evolution is captured through the Orders variable. Market timing cost presentsopposite results, as expected. V exhibits strongly significant positive parameters indicatingan evolution in the same direction as transactions costs. Depth’s negative effect is stronglysignificant, even for market timing costs. A possible explanation is that, when depth islarge, traders execute more volume against the depth available at the start of the sequenceand are therefore less exposed to the market timing cost. The RS variable is stronglysignificant for market impact and show mixed results for market timing cost for bothpurchases and sales models. Concerning the market impact, the results are in line withour expectations on the liquidity impact of the spread. With regards to the market timingcost, a wide spread, as outlined by Glosten and Milgrom (1985), through a large adverseselection component, could reveal the presence of informed trading and impact the markettiming cost. It seems that the results are significant only for sell sequences of traders whosemarket timing decrease with the spread, revealing the presence of informed buyers.

As expected, Table 3 shows that EMH holds and that market timing costs (Panel A andB) may not be better managed by looking at Hammer-like structures, whatever contempo-raneous or lagged signals. Some parameters are significant but exhibit the opposite sign.To refute the hypothesis that candlesticks may help predict returns, Hammer and InvertedHammer should exhibit positive (negative) signs for purchases (sales) while Hanging Manand Shooting Star should exhibit positive (negative) signs for sales (purchases). The strongdifferences between the parameters and their significance indicate that we may not basea market timing strategy on these signals. Panel C and D also show that market impactresults are consistent with Mazza (2012) who outlines a relationship between liquidity andthe occurrence of Hammer and Hanging Man configurations. We however observe that thisrelationship is only valid for purchases as parameters for sales models do not present anysignificance. The effect seems to be very short-lived as lagged models display less significantresults.

12

Table 3: Market Impact and Market Timing - Hammer-like configurationsModel Orders Duration V Depth RS H IH HM SHPanel A : Market Timing - Purchasest 0.057∗∗∗ 0.072∗∗∗ 0.037∗∗∗ −0.004∗∗∗ −1.902 0.034 −1.843∗∗∗ −0.111 0.173t− 1 0.057∗∗∗ 0.072∗∗∗ 0.038∗∗∗ −0.004∗∗∗ −1.910 −0.077 −0.578∗∗∗ −0.148 0.990∗∗

Panel B : Market Timing - Salest 0.043∗∗ 0.072∗∗∗ 0.040∗∗∗ −0.005∗∗∗ −4.641∗∗∗ −0.445∗∗∗ 0.429∗∗ −1.125∗∗∗ −0.159t− 1 0.043∗∗ 0.072∗∗∗ 0.040∗∗∗ −0.005∗∗∗ −4.595∗∗∗ 0.010 0.017 −0.308∗ −0.446Panel C : Market Impact - Purchasest −0.006∗∗∗ −0.001∗ 0.007∗∗∗ −0.001∗∗∗ 1.176∗∗∗ −0.038∗∗∗ −0.019 −0.049∗∗∗ 0.037t− 1 −0.006∗∗∗ −0.001∗∗ 0.007∗∗∗ −0.001∗∗∗ 1.175∗∗∗ −0.040∗∗ 0.005 −0.009 0.017Panel D : Market Impact - Salest −0.004∗∗∗ −0.001∗∗ 0.005∗∗∗ −0.001∗∗∗ 0.796∗∗∗ −0.006 −0.032∗∗ −0.006 −0.005t− 1 −0.004∗∗∗ −0.001∗∗ 0.005∗∗∗ −0.001∗∗∗ 0.797∗∗∗ −0.008 0.006 −0.025 0.126∗

This table presents the results of different panel regression models. Panel A and B present the results for the markettiming cost for purchases and sales respectively. Panel C and D display parameter estimates for market impactmodels respectively for purchases and sales. t and t− 1 stand for contemporaneous and lagged signals respectively.Orders indicate the number of order of a sequence s, Duration its duration and V its volume. Depth and RSare liquidity proxies respectively for depth and relative spread. H, IH, HM and SH are candlesticks identificationdummies, respectively for Hammer, Inverted Hammer, Hanging Man and Shooting Star, that equal 1 when thestructure occurs for contemporaneous models (t) and when the structure has occurred during previous interval forlagged models (t− 1). These dummies equal 0 otherwise.

Tables 4 and 5 also show that Doji configurations do not help reduce market timingcosts as the parameters show inconsistent signs and only for contemporaneous signals. Forlagged signals, the parameters are not significant anymore. This is consistent with EMH,suggesting that candlesticks cannot predict future short term price evolution.

Table 4: Market Timing - DojiModel Orders Duration V Depth RS DBear DBullPanel A : Purchasest 0.057∗∗∗ 0.075∗∗∗ 0.037∗∗∗ −0.004∗∗∗ −1.962 −0.714∗∗∗ −0.671∗∗∗

t− 1 0.057∗∗∗ 0.072∗∗∗ 0.038∗∗∗ −0.004∗∗∗ −1.926 −0.070 −0.240∗∗∗

Panel B : Salest 0.043∗∗ 0.074∗∗∗ 0.039∗∗∗ −0.005∗∗∗ −4.594∗∗∗ −0.652∗∗∗ −0.539∗∗∗

t− 1 0.043∗∗ 0.072∗∗∗ 0.040∗∗∗ −0.005∗∗∗ −4.579∗∗∗ −0.186∗∗ 0.141

This table presents the results of different panel regression models. Panel A and B present the results for the markettiming cost for purchases and sales respectively. t and t−1 stand for contemporaneous and lagged signals respectively.Orders indicate the number of order of a sequence s, Duration its duration and V its volume. Depth and RS areliquidity proxies respectively for depth and relative spread. Dbull and Dbear are candlesticks identification dummies,respectively for Bullish Doji and Bearish Doji, that equal 1 when the structure occurs for contemporaneous models(t) and when the structure has occurred during previous interval for lagged models (t− 1). These dummies equal 0otherwise.

13

Table 5: Market Timing - Dragonfly and Gravestone DojisModel Orders Duration V Depth RS DFbull DFbear GRbull GRbearPanel A : Purchasest 0.057∗∗∗ 0.074∗∗∗ 0.037∗∗∗ −0.004∗∗∗ −1.937 −0.329∗ −0.669∗∗∗ −1.191∗∗∗ −0.830∗∗∗

t− 1 0.057∗∗∗ 0.072∗∗∗ 0.038∗∗∗ −0.004∗∗∗ −1.897 −0.451∗∗ −0.374∗∗ −0.171 0.003Panel B : Salest 0.043∗∗ 0.074∗∗∗ 0.040∗∗∗ −0.005∗∗∗ −4.582∗∗∗ −1.254∗∗∗ −0.755∗∗∗ −0.373∗∗ −0.362∗∗∗

t− 1 0.043∗∗ 0.072∗∗∗ 0.040∗∗∗ −0.005∗∗∗ −4.577∗∗∗ −0.040 −0.176 −0.151 −0.207

This table presents the results of different panel regression models. Panel A and B present the results for the markettiming cost for purchases and sales respectively. t and t−1 stand for contemporaneous and lagged signals respectively.Orders indicate the number of order of a sequence s, Duration its duration and V its volume. Depth and RS areliquidity proxies respectively for depth and relative spread. DFbull, DFbear, GRbull and GRbear are candlesticksidentification dummies, respectively for Bullish Dragonfly Doji, Bearish Dragonfly Doji, Bullish Gravestone Dojiand Bearish Gravestone Doji, that equal 1 when the structure occurs for contemporaneous models (t) and when thestructure has occurred during previous interval for lagged models (t− 1). These dummies equal 0 otherwise.

Tables 6 and 7 however show very interesting results which are consistent with previousfindings, as in Mazza (2012). Doji structures are likely to help reduce market impact costs.Market impact is much lower for sequences beginning during the interval that contains aDoji and for sequences beginning during the next interval. These findings indicate that wemay benefit from an execution strategy based on these candlesticks. The results also tellus that traders may place aggressive orders during the formation of the Doji or just afterand therefore profit from a window ranging from 15 to 30 minutes.

Table 6: Market Impact - DojiModel Orders Duration V Depth RS DPanel A : Purchasest −0.006∗∗∗ −0.001∗ 0.007∗∗∗ −0.001∗∗∗ 1.173∗∗∗ −0.049∗∗∗

t− 1 −0.006∗∗∗ −0.001∗ 0.007∗∗∗ −0.001∗∗∗ 1.177∗∗∗ −0.022∗∗

Panel B : Salest −0.004∗∗∗ −0.001∗ 0.005∗∗∗ −0.001∗∗∗ 0.796∗∗∗ −0.023∗∗∗

t− 1 −0.004∗∗∗ −0.001∗∗ 0.005∗∗∗ −0.001∗∗∗ 0.799∗∗∗ −0.022∗∗∗

This table presents the results of different panel regression models. Panel A and B present the results for the markettiming cost for purchases and sales respectively. t and t−1 stand for contemporaneous and lagged signals respectively.Orders indicate the number of order of a sequence s, Duration its duration and V its volume. Depth and RS areliquidity proxies respectively for depth and relative spread. D is a Doji identification dummy that equals 1 when aDoji occurs for contemporaneous models (t) and when a Doji has occurred during previous interval for lagged models(t− 1). This dummy equals 0 otherwise.

14

Table 7: Market Impact - Dragonfly and Gravestone DojisModel Orders Duration V Depth RS DF GRPanel A : Purchasest −0.006∗∗∗ −0.001∗ 0.007∗∗∗ −0.001∗∗∗ 1.175∗∗∗ −0.062∗∗∗ −0.042∗∗∗

t− 1 −0.006∗∗∗ −0.001∗ 0.007∗∗∗ −0.001∗∗∗ 1.179∗∗∗ −0.030∗∗ −0.035∗∗

Panel B : Salest −0.004∗∗∗ −0.001∗ 0.005∗∗∗ −0.001∗∗∗ 0.797∗∗∗ −0.033∗∗∗ −0.041∗∗∗

t− 1 −0.004∗∗∗ −0.001∗∗ 0.005∗∗∗ −0.001∗∗∗ 0.799∗∗∗ −0.024∗ −0.016

This table presents the results of different panel regression models. Panel A and B present the results for the marketimpact cost for purchases and sales respectively. t and t−1 stand for contemporaneous and lagged signals respectively.Orders indicate the number of order of a sequence s, Duration its duration and V its volume. Depth and RS areliquidity proxies respectively for depth and relative spread. DF and GR are candlesticks identification dummies,respectively for Dragonfly Doji and Gravestone Doji, that equal 1 when the structure occurs for contemporaneousmodels (t) and when the structure has occurred during previous interval for lagged models (t− 1). These dummiesequal 0 otherwise.

In a nutshell, the results show that market timing cost is not affected by the reversalpotential that candlesticks contain. The results show some significant estimates but thesigns of the estimates are opposite to what should be expected according to the literature onJapanese candlesticks. This supports our hypothesis that EMH holds and that Japanesecandlesticks are not able to predict future price returns, as outlined in Duvinage et al.(2012) and Marshall et al. (2008).

The other main result of these panel regressions is the relationship between marketimpact cost and the occurrence of these structures. We find that market impact is muchlower when a Doji occurs, whatever its type. This is consistent with Mazza (2012), whichoutlines that liquidity is higher when a Doji appears on a price chart. The effect is alsolong enough as sequences starting after the occurrence of these Dojis still exhibit lowermarket impact costs. The results are also valid for Hammer and Hanging Man but forpurchases only and with much less significance as well as short-lived effects.

5 Order processing simulation

5.1 Methodology

In order to verify whether a trader may really benefit from candlesticks to reduce marketimpact, we simulate order processing and compare a strategy based on candlesticks to arandom strategy.

The candlestick-based strategy consists in placing a quantity Q, equal to the mean ofthe sizes of the sequences for this security over the whole sample, each time a signal occurs.The philosophy behind this strategy is that candlesticks have an informational content onliquidity and therefore should result in a lower market impact. Then, the market impact iscomputed by averaging all days for each stock separately. If there are nd,i signals occurringon the same day d for security i, nd,i market orders are submitted just after total apparition

15

of the structures. This enables us to check the profitability of a trader who waits for theend of the signal.

The random strategy consists in randomly submitting nd,i orders separately for eachday and stock. The strategy is based on a random submission of the same number of orderswith an equal quantity. The only thing that differs between the two strategies is the timeof the order submission. The market impact is then computed for each trade and averagedin the same way as for the candlesticks-based strategy.

To check the robustness of our results, we replicate the sample selection in the randomstrategy 500 times, i.e. for each day d and each stock i, we create 500 random samples ofsize nd,i.

8 We calculate the market impact for each replication and compare this cost tothe candlestick-based strategy. We then count the number of times the replications beatthe strategy and compute a p-value. If more than 95% of the replicated samples fail tohave a lower cost than the original strategy, then the strategy yields significantly betterresults than random simulations.

5.2 Results

Table 8 shows the results of the order processing simulation. We compare two executionstrategies: one based on Dojis and another based on a random order submission. To makethings comparable, we count the number of signals that occurs during the day and use thisnumber in both simulations as the total number of orders. In order to check whether thereis a statistically significant difference between the two strategies, we replicate the randomstrategy 500 times and compare its average market impact cost to the corresponding costincurred by the Doji-based strategy.

The results show that, for both purchases and sales, the candlesticks-based strategypresents a significantly lower market impact cost than the random strategy. The p-valueassociated to the test is lower than 1%. The average market impact of the Doji-basedstrategy is equal to 0.02806 basis points for buy orders and to 0.02883 basis points for sellorders. These results are significantly lower than the market impact paid by the randomsubmission for both buy and sell orders, 0.032154 and 0.031626 respectively. These findingssuggest that investors may benefit from candlesticks to reduce their market impact.

8Due to processing needs, we are not able to provide more replications as the problem is time andresource-consuming (81 stocks, 61 days, n signals per day, 500 replications).

16

Table 8: SimulationMeanRandom MeanDoji p− value

Panel A : Purchases0.032154 0.02806 0.00

Panel B : Sales0.031626 0.02883 0.00

This table presents the results for the simulations of the two strategies: random and Doji-based. Panel A and Bpresent the results for purchases and sales respectively. MeanRandom refers to the average of the market impactcost for the 500 replications of the random strategy over the 81 securities. MeanDoji is the average of the marketimpact cost of the Doji-based strategy over the 81 securities. The p−value is averaged across stocks and is computedas the number of times the market impact cost of the random replications for the 81 securities is lower than themarket impact cost of the Doji-based strategy divided by the total number of replications (500).

6 Conclusion

Transaction costs management is still a tricky issue, as it is not possible to improve all thecosts components simultaneously. Traders are confronted to the so-called trader’s dilemmawhich is based on the choice of an execution strategy, namely splitting orders over timeor not. This dilemma may be summarized by two transaction costs components: marketimpact, that arises when a large order is submitted, and market timing that arises when alarge order is split into smaller ones that execute at different prices through time.

Based on a sample of 81 European stocks from three Euronext indexes, we investi-gate whether the two components of transaction costs of orders sequences are impacted bythe occurrence of particular candlestick structures. We focus on two categories of struc-tures, Hammer-like and Doji configurations, as they are the best known single lines ofthe Japanese Candlesticks literature. We estimate fixed-effects panel regressions of marketimpact or market timing on a set of explanatory variables that contain candlestick iden-tification dummies. We also include as exogenous control variables the number of orders,duration, volume of the sequences, and liquidity proxies. In order to further assess whethera trader may benefit from the occurrence of a given signal, we also conduct order processingsimulations in which we compare the market impact cost of a candlestick-based executionstrategy to the market impact cost of a random execution strategy.

Our results support the existing literature and present interesting findings which indi-cate that traders may benefit from candlesticks to improve their execution strategies. Wefind that market impact costs are significantly lower when and after that Doji structuresoccur. The effect is long enough to allow next sequences of orders to exhibit lower costs.This is also true for Hammer and Hanging Man but only for purchase orders. Those resultsindicate that market impact can be reduced by trading after the occurrence of these struc-tures. Order processing simulations show similar outcomes, i.e. the Doji-based strategyexhibits significantly lower market impact cost than the random one. We also contribute tothe existing literature on EMH by outlining that candlesticks fail to predict future returnsas market timing costs are not lower when or after that one of these configurations occurs.

17

This is consistent with previous findings (Duvinage et al., 2012; Marshall et al., 2006).As a conclusion, all these findings suggest that candlesticks are valuable tools that

could help traders to implement trading decision through an improvement of their orderexecution. This paper outlines an interesting feature of candlesticks: they help detect timewindows where market impact costs are lower. As such, they may be particularly suitablefor immediate liquidity demanders, such as institutional traders or hedgers.

References

Bigalow, S., 2001. Profitable Candlestick Trading: Pinpointing Market Opportunities toMaximize Profits. Wiley Trading.

Brock, W., Lakonishok, J., LeBaron, B., 1992. Simple technical trading rules and thestochastic properties of stock returns. Journal of Finance 47 (5), 1731–64.

Duvinage, M., Mazza, P., Petitjean, M., 2012. The intraday performance of market timingstrategies and trading systems based on Japanese candlesticks. Working Paper.

Fama, E., 1970. Efficient Capital Markets: A Review of Theory and Empirical Work.Journal of Finance 25, 383–417.

Fock, J., Klein, C., Zwergel, B., 2005. Performance of Candlestick Analysis on IntradayFutures Data. The Journal of Derivatives 13 (1), 28–40.

Glosten, L. R., Milgrom, P. R., 1985. Bid, ask and transaction prices in a specialist marketwith heterogeneously informed traders. Journal of Financial Economics 14 (1), 71 – 100.

Kavajecz, K. A., Odders-White, E. R., 2004. Technical analysis and liquidity provision.Review of Financial Studies 17 (4), 1043–1071.

Marshall, B., Young, M., Cahan, R., 2008. Are candlestick technical trading strategies prof-itable in the japanese equity market? Review of Quantitative Finance and Accounting31, 191–207.

Marshall, B., Young, M., Rose, L., 2006. Candlestick technical trading strategies: Can theycreate value for investors? Journal of Banking & Finance 30 (8), 2303–2323.

Mazza, P., 2012. Price Dynamics and Market Liquidity: An Intraday Event Study onEuronext. Working Paper.

Morris, G., 1995. Candlestick Charting Explained: Timeless Techniques for Trading Stocksand Futures. McGraw-Hill Trade.

Nison, S., 1991. Japanese Candlestick Charting Techniques: A Contemporary Guide to theAncient Investment Technique of the Far East. New York Institute of Finance.

18

Nison, S., 1994. Beyond Candlesticks: New Japanese Charting Techniques Revealed. JohnWiley and Sons.

Petersen, M. A., 2009. Estimating standard errors in finance panel data sets: Comparingapproaches. Review of Financial Studies 22 (1), 435–480.

Wang, Z.-M., Chiao, C., Chang, Y.-T., 2012. Technical analyses and order submissionbehaviors: Evidence from an emerging market. International Review of Economics andFinance 24 (0), 109 – 128.

19