Flag Pattern
Flag Pattern
http://hdl.handle.net/10251/102317
Copyright Elsevier
Additional Information
A dynamic trading rule based on filtered flag pattern
recognition for stock market price forecasting
Authors
Rubén Arévalo
I.U. de Matemàtica Pura i Aplicada
Universitat Politècnica de València
Camí de Vera s/n, 46022, Valencia (Spain)
[email protected]
Jorge García
I.U. de Matemàtica Pura i Aplicada
Universitat Politècnica de València
Camí de Vera s/n, 46022, Valencia (Spain)
[email protected]
Francisco Guijarro
I.U. de Matemàtica Pura i Aplicada
Universitat Politècnica de València
Camí de Vera s/n, 46022, Valencia (Spain)
[email protected]
(*) Corresponding author
(+34) 963 877 000 (ext. 88204)
Alfred Peris
I.U. de Matemàtica Pura i Aplicada
Universitat Politècnica de València
Camí de Vera s/n, 46022, Valencia (Spain)
[email protected]
1
Abstract
In this paper we propose and validate a trading rule based on flag pattern recognition,
incorporating important innovations with respect to the previous research. Firstly, we
propose a dynamic window scheme that allows the stop loss and take profit to be updated
on a quarterly basis. In addition, since the flag pattern is a trend-following pattern, we
have added the EMA indicator to filter trades. This technical analysis indicator is
calculated both for 15-minute and 1-day timeframes, which enables short and medium
terms to be considered simultaneously. We also filter the flags according to the price
range on which they are developed and have limited the maximum loss of each trade to
100 points. The proposed methodology was applied to 91,309 intraday observations of
the DJIA index, considerably improving the results obtained in the previous proposals
and those obtained by the buy & hold strategy, both for profitability and risk, and also
after taking into account the transaction costs. These results seem to challenge market
efficiency in line with other similar studies, in the specific analysis carried out on the
DJIA index and is also limited to the setup considered.
Highlights
We propose an automatic and dynamic trading rule based on flag pattern recognition.
The strategy does not depend on the ability of the trader to guess the best configuration
of the trading rule.
We include several filters for the trades, one of them considering the EMA indicator in
short and medium timeframes.
The trading rule is applied on a large intraday database for the DJIA index.
We can conclude that our proposal is far superior to the previous flag pattern strategies
as regards both profitability and risk.
Keywords
Financial markets; Technical analysis; Chart pattern; Exponential moving average;
Trading system; Automatic trading
Acknowledgements
The fourth author of this work was partially supported by MINECO, Project MTM2016-
75963-P.
2
1. Introduction
Financial markets are complex and non-linear dynamic systems, so their predictions are
really challenging (Barak, Dahooie, & Tichý, 2015). Investment institutions, pension
funds and private investors daily face the problem of investing billions of dollars in assets
with the intention of achieving a high profit with a low risk. For these purposes
professional investors use two major approaches to making accurate decisions in financial
markets: fundamental analysis and technical analysis. Fundamental analysis uses
macroeconomic, industrial and/or business variables to predict the stock value of firms,
whereas technical analysis is based on past stock prices under the assumption that
historical behavior has a testable effect on the future evolution of the stock price.
Technical analysis confronts the Efficient Market Hypothesis (EMH) introduced by Fama
(1970). EMH consists of three types: the strong form, the semi-strong form, and the weak
form. The strong form argues that a market is efficient if all information relevant to the
value of a share, whether or not available to existing investors, is reflected in the market
price. The semi-strong form holds that a market is efficient if all publicly available
information is reflected in the market price. The weak form argues that the current price
of an asset reflects all its price and trading volume history. Taking into account this last
form of efficiency, it is not possible to develop a price-based investment strategy that
beats the market in the mean-variance sense; i.e., such price-based strategy cannot obtain
a higher return with equal or less risk than the buy and hold strategy, and such strategy
cannot obtain a lower risk with equal or higher return than the buy and hold strategy.
Nonetheless, Malkiel (2003) indicates that future stock prices are at least partially
predictable. Criticism of EMH has given rise to an increasing number of papers that
question the validity of the EMH basis, and introduce new and successful approaches that
combine technical analysis indicators and chart patterns with methodologies from
econometrics, statistics, data mining and artificial intelligence. Recent research shows
that the combination of some technical analysis such as chart patterns, indicators and
oscillators can predict future prices in such a way that profitable strategies can be
designed, therefore seriously questioning the fundamentals of EMH (Cervelló-Royo,
Guijarro, & Michniuk, 2015; Gong, Si, Fong, & Biuk-Aghai, 2016; Leitão, Neves, &
Horta, 2016). Chart patterns are formations created by the movements of prices on a chart.
A pattern is usually identified by connecting the price points with a line. Indicators and
oscillators are created by applying formulas of varying complexity to historical prices.
Oscillators, when used in technical analysis, are a type of technical indicator usually
employed for identifying momentum (Teixeira and De Oliveira, 2010). In fact, some
papers refer to them as ‘momentum oscillators’ (Park and Irwin, 2007).
This paper focuses on one of the most analyzed chart patterns in the literature: the flag.
Downes and Goodman (1998) defined it as a ‘‘technical chart pattern resembling a flag
shaped like a parallelogram with masts on either side, showing a consolidation within a
trend. It results from price fluctuations within a narrow range, both preceded and followed
by sharp rises or declines’’. The trading rule based on the flag pattern can be considered
as a trend following strategy, which assumes that the movement of stock market prices is
driven by momentum, i.e., the market price moves in the direction of the momentum (Wu
et al., 2016).
Formerly, different pattern definitions of flags were used by Leigh, Modani, Purvis and
Roberts (2002), Leigh, Paz and Purvis (2002), Leigh, Purvis and Ragusa (2002) and
Wang and Chan (2007, 2009). We follow the most recent flag pattern definition by
3
Cervelló-Royo et al. (2015) –henceforth CGM– and incorporate some relevant
improvements to their trading rule. This enables us to design a more profitable and less
risky investment strategy.
We propose to adjust the parameters that define the trading rule in a dynamic way. These
parameters are the stop loss and the take profit. We partition the original data into quarters,
so that the configuration with the best performance in quarter ! is applied on the next
quarter ! + 1. The results from CGM are dependent on the parameters, which remain
constant for the whole period. Thereby the future investor profit depends on its ability to
select the configuration of stop loss and take profit with optimal performance, but,
unfortunately, this cannot be known a priori. Our proposal defines the parameters in an
objective and automatic way, so the result of the strategy is independent of the investor’s
expertise. We use each ! quarter as a training period, and in accordance with the best
profit result then we use the best stop loss and take profit configuration for the next ! + 1
testing quarter.
We also filter each trade by using a very well-known technical indicator: the exponential
moving average (EMA). The aim of using the EMA is to filter the bad trades –those that
end with losses– by only taking into account those trades in which the flag pattern signal
coincides with the indicator signal (both are buy or both are sell signals). The flag is
considered by experts as a trend continuation pattern, so adding the EMA indicator does
reinforce the continuation signal provided by the flag pattern. The present study thus
combines both a classical technical analysis indicator and a chart pattern, which
constitutes a difference from CGM.
We simultaneously consider the short and the medium term in the trading signals. The
flag pattern is identified on a 15-minute time frame, whereas the EMA is calculated both
on 15-minute and daily time frames. Aligning different time frames enables us to analyze
both the short and medium term of the price structure and then optimize the investment
decision process.
Finally, we filter the trades by only considering 1) “relevant” flag patterns: those with a
minimum price range, and 2) by limiting the maximum loss per trade to 100 points, which
constrains losses when the flag pattern is too large in comparative terms.
All these enhancements have a positive impact both on return and risk and reduce the
number of trades through filtering and, consequently, the cost of transactions. The most
important improvement is related to the return/risk ratio, which surpasses the results
reported by the previous research. Additionally, our results improve on all the 96 different
configurations tested by CGM.
The rest of the paper is structured as follows: Section 2 summarizes the recent literature
on trading rules based on technical indicators and trading rules based on chart patterns.
Section 3 reviews the flag pattern trading rule. Section 4 introduces the new EMA-flag
pattern strategy with the dynamic approach for setting parameters. Section 5 presents the
results we obtain when applying the proposal to the intraday data of the Dow Jones
Industrial Average (DJIA), and compares them with those reported in CGM and with the
buy & hold strategy. Section 6 explain how data snooping effect can impact the results,
and presents its statistical significance through the Reality Check. Finally, the last section
summarizes the findings and gives our conclusions.
4
2. Survey of the literature
This section is devoted to analyzing the most recent contributions to the literature on
investment strategies. Firstly, we summarize the ones that make use of technical analysis
indicators and then analyze the strategies that are based on chart pattern recognition.
It is worth mentioning that the work of Fang, Jacobsen, and Quin (2014) concludes that
simple technical trading rules, i.e., rules based on the consideration of isolated technical
indicators such as simple moving averages (SMA), relative strength index (RSI), or
moving average convergence/divergence indicator (MACD), have no predictive power
on stock markets for out-of-sample periods. This supports our hypothesis that complex
and intelligent expert systems need to be developed by efficiently combining chart
patterns and technical analysis indicators.
5
yielded consistent profits with a good Sharpe ratio, outperforming other methods in the
mean-variance sense.
Hu, Feng, Zhang, Ngai, and Liu (2015) developed the eTrend model, which combines an
evolutionary learning method with a trend following strategy. By using classical technical
indicators such as MA, MACD and volume, the model finds several profitable trading
rules for daily stock market prices, whereas the risk is measured through the Sortino ratio.
Kim and Enke (2016) also generated a trading system using trading rules and rough set
analysis. The model is divided into three phases, and the technical indicators are
considered in the first phase of the model.
Ozturk, Toroslu, and Fidan (2016) use a genetic algorithm (GA) and a greedy search
heuristic (GSH) to combine several trading rules based on technical indicators into a
single trading rule. The model is tested on the currency pairs EUR/USD and GBP/USD
in three different time frames, the results showing an average of 60% of profitable trades.
In a similar way, Wu, Wang, and Chung (2016) argue that using a single trading rule may
not be sufficient to predict the stock price trend accurately. To overcome this drawback,
they propose the performance-based reward strategy (PRS), which combines different
rule parameters for the MA and the range break-out. The best parameter value is
determined through time variant particle swarm optimization (TVPSO). They compare
the results obtained with PRS to those obtained through econometrical approaches: the
random walk, the autoregressive model, and the generalized autoregressive conditional
heteroscedasticity (GARCH) model.
Dymova, Sevastianov, & Bartosiewicz (2010) show some limitations of the combination
of fuzzy logic and methods of the Dempster–Shafer theory. They propose an approach to
overcome these limitations, and demonstrate its advantages by developing a stock trading
expert system optimized and tested on real data from the Warsaw Stock Exchange.
Dymova, Sevastianov & Kaczmarek (2016) propose a Forex trading expert system based
on some technical analysis indicators and a new approach to the rule-base evidential
reasoning. In the new approach, information on the values of all membership functions
representing the intersecting fuzzy classes is preserved and used in the fuzzy logic rules.
The advantages of the proposed approach are demonstrated using the developed expert
system optimized and tested on real data from the Forex market for the four currency
pairs and several intraday time frames.
6
Gong, Si, Fong, and Biuk-Aghai (2016) propose extending the subsequence search
algorithm UCR Suite with a Support Vector Machine (SVM) to train a classifier for chart
pattern-matching. Authors prove how the proposal can be applied to correctly identify
typical chart patterns such as the Head&Shoulders pattern. However, no investment
strategy is developed.
The work of Chen and Chen (2016) is focused on flag pattern matching by using PIPs.
To promote recognition accuracy, the proposed model uses chart patterns and technical
indicators. The methodology is applied to forecasting the NASDAQ and TAIEX indexes,
and the results outperform those from the previous research. However, the dataset is
composed of daily historical prices, so the number of identified patterns is low.
It is important to note that most of the papers in the literature use daily historical prices,
which reduces the number of trades and, consequently, the significance of the results from
a statistical point of view. An important problem of overfitting arises when we combine
a low number of trades and a complex trading rule, for example, by including a lot of
parameters for the pattern definition, or by considering an excessive number of technical
analysis indicators.
7
Figure 1. Bull flag template from CGM
Figure 2. Bear flag matrix obtained through multiplying the anti-identity matrix by the
bull flag matrix
Potential flag patterns are detected by fitting the template of Fig. 1 over the price window
we want to check; thus, the highest price in the window corresponds with the top of the
grid, and the lowest price in the window corresponds with the bottom of the grid. The
difference between the highest and the lowest value in the price window is called the price
range (().
The goal of this process is to obtain the fit value (FV), which shows the level of matching
between the matrix and the price window. Fig. 3 shows an example of bull flag pattern
recognition. First, the price window and the grid are superposed. Notice that CGM
constrains the price range to the body of the candlesticks, therefore they do not consider
the maximum and minimum from the candlestick shadows. Then we observe that all the
Japanese candlesticks coincide with 0 value cells, except for the bottom left cell, which
has a value of 5. So, the sum of all these overlapped cells is the fit value: FV=5. This is
the highest fit value we can obtain with the grid weights of Fig.1. The higher the fit value,
the more likely the price window to be recognized as a bull flag pattern. If the price falls
8
within the cells with negative weight (the ones with white background), then the fit value
is lower and the price window is unlikely to be considered as a bull flag pattern.
Observe that we represent the price by using candlesticks instead of classical lines. The
candlestick is much more informative than simple lines, because we can observe the full
price evolution in that candlestick, and not only the line connecting the closing prices.
Figure 3. Bull flag pattern recognition on a Japanese candlestick chart. The fit value is
obtained by adding the values in matched cells
9
Firstly, we have filtered the flag patterns attending to the price range, by considering only
those with a minimum price range of 100 points. This is because some flags are developed
within a narrow price range. We argue that the greater the price range, the more significant
is the movement for the trader and more confident the trader is in performing the trade.
Small movements receive less attention from traders and it is difficult to consider them
as an abrupt price rise or fall, so we discard flags with a price range lower than 100 points.
Secondly, we include the momentum effect with a well-known technical analysis
indicator: the EMA. When the price is higher (lower) than the EMA, traders consider it
as a buy (sell) signal. So, only bull (bear) flag patterns with the price of the last candle
higher (lower) than the EMA should be considered as valid flags, whereas the rest are
discarded. An important issue is to simultaneously regard both the short and medium term.
Thereby, for our intraday trading rule we have computed a short term EMA based on
intraday prices (15-minute time frame) and a medium term EMA based on daily prices.
The 15-minute EMA was calculated from the closing prices of the previous 50
candlesticks, while the daily EMA was calculated by taking the closing prices of the
previous 10 days. In the case of the short-term EMA, a value of ) = 50 implies that the
closing prices of the last 12.5 hours, just over a trading day, are being considered. In the
case of the medium-term EMA, the evolution of the price in the last 10 days is considered.
As it is appropriate to ask how the choice of these parameters affects the results, we
analyze this issue at the end of this paper.
A third related filter is considered, which constrains the maximum loss we are willing to
have: do not risk more than 100 points in each trade.
Regardless of this maximum permissible loss, the strategy has been parameterized
considering different values for the stop loss and the take profit, as detailed in the
following section.
10
price, and the stop loss is 0.5×( points below the trade open price. Note that these values
for the stop loss and the take profit are those used in the example in Figure 4. As we
explain below, the work considers a wide range of values to properly capture the
sensitivity of the results to the values of these two parameters.
In summary, we make both the take profit and the stop loss dependent on the price range.
We follow the common assumption that gains at the take profit level must be considered
greater than losses at the stop loss level. This makes the resulting average profit per trade
greater than the average loss.
For the validation of the trading rule we have defined the following sensible values in
accordance with literature on stop loss and take profit levels:
Therefore, the stop loss goes from 0.2 times the value of the range up to 0.5 times that
value, while the take profit has been defined as a function of the stop loss: from 2 to 3
times its value. In total, we have computed 4×5 = 20 different configurations for the
stop loss and take profit parameters.
Figure 4. An example of triggering a trade entry with take profit and stop loss levels
11
It should be noted that we are supposing that trades occur at the take profit or stop loss
trigger prices, but this may not occur in practice. We may encounter slippage problems,
so that the trade does not close at the point where we had marked the stop loss, and our
loss may be greater than originally anticipated. When the market opens, it may do so at a
price which can be different from the one it closed at the previous day, and that open price
will cause our loss to be greater than that considered by the stop loss. It may also happen
that these price differences benefit us when the price exceeds our take profit. In the case
of our work we opted for a conservative approach, considering that in the event of a gap
between the close price of a session and the open price of the next session, our loss is the
maximum possible (if the price is beyond the stop loss) and our profit is the minimum
possible (if the price opens beyond the take profit).
4.3 The dynamic setting for the take profit and the stop loss
Once the take profit and stop loss parameters are defined as a multiple of the price range,
the following questions arise: what are the optimal values for the take profit and the stop
loss? Must these values remain constant, or should they be timely adapted in a dynamic
way?
We propose to compute both take profit and stop loss levels in a dynamic manner, taking
into account the best recent past performance of the trading rule. We first divide the whole
period in quarters (!), and then we compute the best configuration for the take profit and
the stop loss for the first quarter !. The best configuration for quarter ! is then used by
the trading rule in the next quarter ! + 1. Therefore, quarter ! is used for training whereas
quarter ! + 1 is used for testing. Fig. 5 describes the moving window scheme used in our
research. The whole period is divided into 53 quarters. Quarters from 1 to 52 are used for
training, whereas quarters 2 to 53 are used for testing. Thus, our final results are made up
of the profits obtained during the 52 testing quarters. We compute the total profit as the
return obtained by all trades executed for the testing quarters 2 to 53.
The dataset
May 22nd 2000 – November 29th 2013
Quarter Quarter
Quarter 1 Quarter 2 Quarter 3 …
52 53
Training Training Training Training
We have also measured the risk we have put up with each testing quarter. The non-
normality of the trading rule returns impedes the application of the statistical & (Leigh,
12
Modani, and Hightower, 2004). Due to the levels of take profit and stop loss we have
chosen, the non-normality of the returns is even higher than in other approaches, and use
of the return variance for measuring the risk is not advisable. Instead, we utilize the
maximum drawdown as CGM does.
The drawdown at time &, DE , is defined in Eq. (1) as the drop of the return curve from the
previous maximum at time F, with F < &. The maximum drawdown HD corresponds to
the maximum drawdown experienced during the entire period of the database (Eq. 2).
HD = max DE (2)
E
Note that the maximum drawdown refers to the total maximum drawdown, not the
maximum drawdown of any particular trade. The maximum drawdown picks the worst
run in terms of strategy losses. While these periods can alternate positive trades with
negative ones, the maximum drawdown will summarize the combined effect of all of
them. The strategy limits the maximum loss for any particular trade to 100 points, with
the aim of not being wiped out by a single fatal trade. But this is different from the –total–
maximum drawdown.
Besides, every time a trade closes with losses it does so at the point where it has reached
its maximum loss: the stop loss. It is not possible for a trade to close with a loss less than
the maximum loss it has been holding while it was open. In other words, it is not possible
to have unrealized losses as a result of a trade being in losses and not being closed once
the stop loss has been reached.
As a summary of all the above, we have illustrated the process as a whole in Fig. 6. The
flag pattern selection process is depicted on the left, while the moving window scheme
used for the training and testing the trading rule is summarized on the right.
As a final comment, when applying the strategy to an extensive database it may occur
that one trade opens just after another. For example, it is possible to open a long position
at a certain time and then open another trade in the same direction in the next candlestick.
It is also possible to open a trade while another has not yet been closed, and that both
operations may be in opposite directions. The first case assumes that when implementing
the strategy on the future of an index, the broker will require a greater margin to keep the
trades open. In the other case, the second signal can be implemented by closing the trade
in progress from the first signal, and then reopen it when some of the trades are closed by
reaching their take profit or stop loss. All these operations are currently available for the
most popular trading platforms.
13
Figure 6. The flow chart of the proposed trading rule
14
First, we can observe how the number of trades increases in proportion to the fit value. If
the flag pattern recognition is done with the maximum fit to the matrix presented in Fig.
1, and in addition we use both the EMA and range filters, then only 293 trades are carried
out. This represents a percentage of only 0.3% of the total candlesticks that make up the
sample. To gain statistical significance, we have decided to smooth the fit value
requirement to consider values between +5 and -5. In the latter case, where the fit value
is -5, the number of candlesticks considered is 1,751, which represents 1.9% of the sample.
Although it may seem that a small proportion of the sample is still represented, we must
bear in mind the following: 1) the market does not offer opportunities to buy or sell
continuously, and 2) we are only identifying a specific type of opportunity: that of the
flag. Other types of chartist figures could be sought so that the number of potential trades
could be greater.
Returning to the results of Table 1, we can see that the strategy with the greatest profit is
the one that considers a fit value of -5, with a total of 30,032 points and a return of 286%.
However, we could select the best fit value according to the profit obtained by trade. In
that case, the best choice would be to take a fit value of +4, which provides a profit per
trade of 26.37 points (return per trade = 0.25%).
For the considered fit value range, the lowest profit per trade is given with a fit value of
-5. In general terms, we can see how the profit per trade decreases as the precision in the
identification of the flags decreases.
It should be noted that in all cases the profit per trade far exceeds the transaction costs
associated with the strategy. There are several financial instruments and derivatives that
traders can use for trading and index: futures, options, CFD (contract for differences),
ETF (exchange traded funds), etc. If we focus on one of them in particular, for example
the case of futures, it is easy to find different brokers and the commissions they apply on
the DJIA (E*Trade, Interactive Brokers, OptionXpress, AmeriTrade, TradeStation). The
multiplier of a contract for the future E-mini Dow is $5. The multiplier is the amount by
which the price of this future is multiplied to obtain its monetary value. Therefore, each
point of this future has a value of $5. At the time of writing, if we buy (sell) an E-mini
Dow future when this index is quoted at 20800 points, the monetary value of our trade
would be 20800×5 = $104,000.
The most expensive of the brokers cited above would be charging a commission of $3.50,
i.e. the transaction cost would be 3.50/104,000 = 0.0033%. If we buy the E-mini and
the market rises 1%, then we can earn 1%×104,000 = $1,400, whereas our cost is only
$3.50. We must also consider the margin the broker requires when we trade. But this is
not a cost, because this amount is refunded when we close the trade.
In short, it is possible to trade with the DJIA index through some derivative product, such
as a futures contracts. The cost per operation is in many cases less than $1 per contract,
which takes into account that the $5 multiplier that applies to this type of products (E-
mini Dow future) entails a transaction cost of less than 0.001% per trade.
Although these transaction costs do not significantly affect the returns obtained by the
strategy, we must point out that they are transaction costs for the year 2017. In order to
perform an accurate analysis of the profitability of the strategy after commissions, we
must know the evolution of transaction costs during the period in which the strategy is
implemented. We have completed the analysis by comparing profit and risk. We have
reported the maximum drawdown of the strategy according to each fit value and it can be
seen that in general terms the risk of the strategy is proportional to the profit. The last
column of Table 1 shows the profit in points obtained with respect to the maximum
15
drawdown supported. In this case, the best choice would be a fit value of +2. Again, all
the reported cases offer a very favorable risk/reward ratio. In all of them, the profit
obtained far exceeds the risk assumed by the strategy.
For a more detailed analysis of how the proposed strategy works, Table 2 reports the
quarterly results of the trading rule with a fit value of -5.
The first quarter is used to train the system, after which it is established that the optimal
configuration (the one that obtained the highest profit in points) is the one that maintains
a stop loss of 0.2 and a take profit of 0.4 in the case of buying trades. For selling trades,
the optimal configuration has been a stop loss of 0.2 and a take profit of 0.6. Therefore,
this is the configuration used for the second quarter. We get a profit of 65 points for the
buying flags (return = 0.62%), while we lose 155 points with selling flags (return = -
1.48%). This implies that as a whole the strategy loses 90 points in the second quarter.
As with the first quarter, we also get the optimal stop loss and take profit setting for the
second quarter: 56 = 0.2 and AB = 0.5 for the buying side, and 56 = 0.2 and AB =
0.55 for the selling side. This means that the strategy would have optimized its
profitability with this configuration, instead of using the quarter 1 optimum. The optimal
configuration for quarter 2 is used in the third quarter, gaining 220 points with the long
positions, and losing 106 points with the short positions. The accumulated profit up to the
third quarter is 285 points (return = 2.71%) for long positions and -261 points (return = -
2.49%) for short positions, bringing the overall profit of the strategy to 24 points.
In this way, the strategy is applied to each of the quarters both for buying and selling
opportunities, following the scheme drawn in Fig. 6. The overall result is 1,751 trades,
which provide a profit of 14,106 points (return = 134.34%) in long trades and a profit of
15,927 (return = 151.69%) in short trades. That is, an overall profit of 30,032 points, with
the maximum drawdown of only 2,272 points, as pointed out in Table 1. We have also
included the average duration per trade measured by the number of 15-min candlesticks.
16
Table 2. Results of applying the proposed methodology on Dow Jones intraday data
Buy Sell
2 0.2 0.4 5 8 65 0.62% 0.05% 10.7 0.2 0.6 0 6 -155 -1.48% -0.25% 6.9 0.09%
3 0.2 0.5 9 15 285 2.71% 0.09% 8.9 0.2 0.55 5 17 -261 -2.49% -0.05% 8.2 0.23%
4 0.5 1.25 2 11 -59 -0.56% -0.25% 28.3 0.5 1.5 9 11 1,199 11.42% 0.70% 48.7 0.15%
5 0.2 0.45 7 13 4 0.04% 0.03% 10.5 0.5 1.5 6 13 1,379 13.13% 0.09% 38.8 0.37%
6 0.5 1.375 4 14 -253 -2.41% -0.14% 39.1 0.4 1.2 15 23 4,270 40.67% 0.72% 29.2 0.16%
7 0.2 0.5 16 9 568 5.41% 0.31% 17.8 0.5 1.5 2 15 3,789 36.09% -0.27% 29.3 0.10%
8 0.5 1.5 7 15 970 9.24% 0.17% 41.7 0.3 0.825 4 13 3,663 34.89% -0.07% 16.4 0.13%
9 0.3 0.675 3 21 166 1.58% -0.32% 32.2 0.5 1.5 9 9 4,570 43.52% 0.48% 30.4 0.28%
10 0.2 0.45 13 14 826 7.87% 0.23% 12.1 0.5 1.375 15 24 6,030 57.43% 0.36% 30.9 0.33%
11 0.4 1.2 10 28 1,235 11.76% 0.10% 25.1 0.5 1.5 7 15 6,227 59.30% 0.08% 31.5 0.21%
12 0.2 0.6 6 13 1,389 13.23% 0.08% 37.7 0.5 1.5 7 20 6,279 59.80% 0.02% 46.7 0.14%
13 0.4 0.9 7 10 1,731 16.49% 0.19% 26.5 0.4 1.1 0 13 5,644 53.75% -0.47% 56.7 0.07%
14 0.4 0.9 0 8 1,351 12.87% -0.45% 25.4 0.2 0.4 5 2 5,823 55.46% 0.24% 13.3 0.05%
15 0.2 0.6 0 3 1,285 12.24% -0.21% 31.9 0.5 1.5 2 1 5,817 55.40% -0.02% 8.9 0.08%
16 0.5 1.5 2 6 1,341 12.77% 0.07% 17 0.2 0.4 2 1 5,888 56.08% 0.23% 7.5 0.06%
17 0.4 0.8 2 6 1,215 11.57% -0.15% 71.6 0.2 0.5 1 2 5,873 55.93% -0.05% 5.4 0.06%
18 0.5 1.375 3 3 1,513 14.41% 0.47% 109 0.2 0.6 4 0 6,138 58.46% 0.63% 13.0 0.07%
19 0.5 1.5 0 7 1,101 10.49% -0.56% 39.6 0.4 0.8 0 0 6,138 58.46% NA NA 0.03%
17
20 0.2 0.6 2 4 1,121 10.68% 0.03% 58 0.2 0.6 0 2 6,087 57.97% -0.25% 4.0 0.04%
21 0.5 1.5 1 7 910 8.67% -0.25% 29.3 0.5 1.5 0 0 6,087 57.97% NA NA 0.03%
22 0.2 0.6 2 0 1,040 9.90% 0.62% 15.5 0.2 0.6 1 1 6,130 58.38% 0.21% 1.0 0.05%
23 0.5 1.375 0 1 968 9.22% -0.68% 25.4 0.5 1.5 0 1 6,060 57.71% -0.67% 8.0 0.05%
24 0.5 1.25 0 3 788 7.50% -0.57% 30.1 0.2 0.55 0 4 5,972 56.88% -0.21% 108.0 0.06%
25 0.3 0.9 6 10 1,036 9.87% 0.15% 33.6 0.2 0.6 2 3 6,047 57.59% 0.14% 10.5 0.05%
26 0.5 1.5 0 2 926 8.82% -0.53% 25.2 0.3 0.675 1 1 6,083 57.93% 0.17% 1.5 0.05%
27 0.4 1.1 0 3 791 7.53% -0.43% 15.1 0.2 0.55 2 1 6,239 59.42% 0.50% 31.0 0.09%
28 0.2 0.6 5 10 916 8.72% 0.08% 34.9 0.5 1.5 2 3 6,408 61.03% 0.32% 10.0 0.14%
29 0.5 1.5 9 14 1,714 16.32% 0.33% 44.6 0.3 0.75 4 13 6,207 59.11% -0.11% 23.6 0.11%
30 0.5 1.125 6 18 1,855 17.67% 0.06% 48.7 0.2 0.6 11 9 7,206 68.63% 0.48% 12.1 0.22%
31 0.4 1 13 25 2,375 22.62% 0.13% 45.4 0.5 1.25 25 18 11,084 105.56% 0.86% 13.5 0.19%
32 0.4 0.8 4 18 1,758 16.74% -0.27% 25.8 0.5 1.375 9 16 12,258 116.74% 0.45% 31.5 0.19%
33 0.3 0.6 12 21 1,963 18.70% 0.06% 15.3 0.5 1 10 25 11,944 113.75% -0.09% 72.2 0.35%
34 0.3 0.6 10 19 2,266 21.58% 0.10% 11.8 0.4 1.2 16 27 14,173 134.98% 0.49% 16.4 0.43%
35 0.5 1.5 6 21 2,236 21.30% -0.01% 9.1 0.5 1.5 15 33 14,971 142.58% 0.16% 14.8 0.43%
36 0.3 0.675 10 23 2,280 21.70% -0.58% 36.9 0.5 1.5 7 18 15,043 143.27% 0.03% 31.5 0.23%
37 0.2 0.5 4 14 2,214 21.09% 1.05% 23.4 0.2 0.4 3 11 14,904 141.94% -0.10% 49.1 0.06%
38 0.5 1.25 7 16 2,409 22.94% 0.08% 13.4 0.2 0.4 7 8 15,012 142.97% 0.07% 23.7 0.14%
39 0.4 1.2 3 6 2,423 23.08% 0.02% 72.4 0.2 0.4 4 10 14,993 142.79% -0.01% 8.0 0.08%
40 0.5 1.25 9 22 2,145 20.43% -0.09% 19.2 0.5 1 9 14 15,835 150.81% 0.35% 9.3 0.24%
41 0.5 1.5 8 11 3,172 30.21% 0.51% 30.2 0.3 0.825 4 12 15,977 152.16% 0.08% 37.7 0.13%
42 0.5 1.375 4 11 3,289 31.32% 0.07% 71.9 0.5 1.5 3 5 16,100 153.33% 0.15% 26.7 0.14%
43 0.5 1.5 9 3 5,248 49.98% 1.56% 120.4 0.5 1.5 2 12 15,773 150.22% -0.22% 25.0 0.18%
18
44 0.5 1.375 9 12 6,019 57.32% 0.35% 83.3 0.3 0.9 3 21 15,204 144.80% -0.23% 27.2 0.16%
45 0.5 1.5 14 21 9,055 86.24% 0.83% 54.1 0.5 1.5 13 29 16,835 160.33% 0.37% 19.5 0.39%
46 0.5 1.375 8 20 9,508 90.55% 0.15% 29.0 0.5 1.125 2 24 15,398 146.65% -0.53% 25.9 0.26%
47 0.5 1.5 5 12 9,499 90.47% 0.00% 65.3 0.3 0.675 3 12 15,185 144.62% -0.14% 18.1 0.07%
48 0.5 1.5 8 14 10,215 97.29% 0.31% 46.1 0.5 1.25 4 15 14,603 139.08% -0.29% 20.6 0.17%
49 0.4 1.2 2 7 10,381 98.87% 0.18% 51.4 0.2 0.45 2 8 14,406 137.20% -0.19% 29.7 0.14%
50 0.5 1.5 7 9 11,724 111.66% 0.80% 115.9 0.4 1.2 1 6 14,338 136.55% -0.09% 23.9 0.16%
51 0.5 1.5 5 11 12,219 116.37% 0.29% 91.9 0.3 0.9 2 3 14,542 138.50% 0.39% 22.6 0.09%
52 0.5 1.5 9 14 12,805 121.95% 0.24% 50.0 0.3 0.9 6 10 15,310 145.81% 0.46% 9.9 0.10%
53 0.5 1.5 9 8 14,106 134.34% 0.73% 47.4 0.4 1.1 6 5 15,927 151.69% 0.53% 23.7 0.14%
Note: The best configurations are represented separately for the buying and selling trades for each of the tested quarters. Both the stop loss (SL)
and the take profit (TP) are defined as a percentage over the range of the flag pattern. We report the number of winning trades (Pos. trades), the
number of losing trades (Neg. trades), the total accumulated points (Acc. profit points), the total accumulated return (Acc. profit return), the mean
return per trade, the average duration in 15-min candlesticks per trade, and the standard deviation of returns.
19
Figure 7 compares the range of the detected flag patterns with the evolution of the DJIA.
Again, it is the result obtained with a fit value of -5. We can see how the flag patterns
with the highest range coincide with more abrupt movements of the price in the DJIA,
especially when there are big drops in the market. For lower volatility periods, such as
that of the 2004-2006 triennium, the range of the flag patterns is smaller on average, and
in addition the number of the detected flag patterns is much lower than that observed for
the whole period.
Figure 7. A comparison between the range of the detected flag patterns and the DJIA
Once these results are obtained, we can ask ourselves if the strategy is simply reacting to
the EMA, i. e. to consider if the profit obtained is due to the flags improving the result
that the EMA would obtain by itself, or on the other hand, if the EMA improves the results
obtained by the flag as a strategy by itself. In order to answer this question, we designed
a strategy based solely on the signals offered by the EMA strategy, and compare its results
with the CGM flag pattern strategy and those obtained in this work.
The EMA strategy design is simple; if the closing price of a candlestick is above the EMA,
then it is considered a buying signal. If it closes below the EMA, the signal indicates
selling. In either case, the operation is closed when a new signal is generated in the
opposite direction. Following these instructions, as many strategies are generated as
parameter n values in the EMA definition. In our case we considered 246 values from
! = 5 to ! = 250.
Figure 8 shows the returns obtained for the 246 different values of the moving average.
It can be observed that in the best case the strategy obtains a profit slightly over 200%,
while the average profit is 157%. We also represent the number of trades for each EMA
strategy. EMA(250) has the minimum number of trades (2,362) while EMA(5) has the
maximum (23,781).
20
The highest profit obtained with CGM is 180.2%, which is less than that obtained by the
EMA strategy, and also lower than the one proposed in our work. The average profit for
all the CGM configurations is 93%.
To sum up, the EMA strategy obtains a higher mean profit than that obtained with the
strategy based on the flag pattern (without taking into account risk or transaction costs),
but the combination of both, together with the other elements considered in our work,
obtains a higher return than the two previous cases.
Note: Points account for the EMA strategy return. The curve represents the number of
trades executed in each EMA strategy. The n parameter in EMA goes from ! = 5 to ! =
250
It is also interesting to compare the results obtained when applying this strategy with the
previous proposal of CGM, or the profit obtained by following a buy & hold strategy on
the DJIA index. Fig. 9 compares the results of applying the proposed strategy in the case
of maximizing the number of points obtained (fit value of +5), with the best strategy
reported in CGM, and the result of following a buy & hold on the DJIA index.
We can clearly see how our proposal improves on the results of CGM and the buy & hold
strategy. If we stick to profitability, our proposal reaches 30,032 points, while CGM's
best alternative gets 17,710 points. Still greater distance exists with the buy & hold
strategy, which for the analyzed period only obtains 5,004 points.
In addition, our proposal gets over 30,000 profit points by making a total of 1,751 trades.
The best CGM alternative reaches 17,710 points with 1,576 trades. This means that by
making no more than 200 additional trades we get more than 12,000 points ahead of CGM.
The difference in profit between the two strategies is considerable, while the transaction
costs are similar. Therefore, we conclude that 1) a quarterly review of the stop loss and
take profit configuration, as well as 2) filtering the trades by the number of points of the
21
flag and by the EMA indicator, and 3) constraining the maximum loss to 100 points,
greatly improve the performance of the flag pattern trading rule.
Figure 9. Comparison of the profit obtained with the proposed strategy, compared to
the best alternative of CGM and the DJIA
In addition to profitability, our proposal also beats the other alternatives in terms of risk.
This risk has been measured through the maximum drawdown. Figs. 10-12 represent the
evolution of the drawdown for each of the 3 strategies analyzed. Again, our proposal
improves on the results of the other two.
The maximum drawdown reached by our proposal is 2,271 points, while in CGM the best
alternative gives a maximum drawdown of 4,244 points. In the worst position is the buy
& hold strategy, with a maximum drawdown of 7,716 points.
In short, we can conclude that our proposal beats the other two in both profitability and
risk.
22
Figure 10. Evolution of the accumulated profit, the drawdown and the maximum
drawdown in the proposed strategy
Figure 11. Evolution of the accumulated profit, the drawdown and the maximum
drawdown in CGM
23
Figure 12. Evolution of the accumulated profit, the drawdown and the maximum
drawdown in the buy & hold strategy
24
The procedure starts with the calculation of the &×1 performance statistic (3):
.
) = !*+ ,/0 ),-+ (3)
where & is the number of technical trading rules to be evaluated, ! is the number of
prediction periods from 1 through 2 so that 2 = 1 + ! − 1, and ),-+ is the observed
performance measure for period 5 + 1 – in our case, the return of the trading rule –.
The null hypothesis to test is that the performance of the best trading rule is no better than
the performance of the benchmark (4).
67 = max ? ); ≤0 (4)
;/+,…,>
where );,,-+ represents the performance of the A-th trading rule when compared with the
benchmark on day 5 + 1:
B,-+ is the return on day 5 + 1, defined as B,-+ = D,-+ − D, /D, . C;,,-+ and C7,,-+ are the
indication of market positions (+1 long, -1 short, 0 out) on day 5 + 1 obtained from the
trading signals of the A -th trading rule and the benchmark. As stated above, the
benchmark can be holding cash, so C7,,-+ = 0 ∀5.
If the null hypothesis (4) is rejected, then we can conclude that the best trading rule is
superior to the benchmark (Sullivan et al., 1999). White (1999) evaluates the null
hypothesis by applying the Politis & Romano’ stationary bootstrap (1994) to the observed
values of );,, . Then H bootstrapped values of ); can be obtained by resampling the
∗
returns from the & trading rules, denoted as );,I where K refers to the index of the H
bootstrap sample. The following statistics are then calculated:
L> is compared to the quantiles of L>,I to obtain the Reality Check D-value for the null
hypothesis (4).
Hansen (2005) noticed that D-values increased when poor or irrelevant trading rules
produced negative performance measurements, which makes the Reality Check a very
conservative procedure. When a trading rule obtains a very poor return, then this
translates into a higher value for the p-value. even though the rest of the trading rules
perform appropriately. Hansen (2005) proposes a more powerful test for Superior
25
Predictive Ability (SPA), in which the test statistic takes trading rules with negative return
means into account and corrects for potential biases from them.
We have followed the above-mentioned procedure to apply the Reality Check to the
proposed strategy. Considering Figure 6, we can see that some parameters are fixed a
priori, which may lead one to doubt if these values have been deliberately chosen to
achieve an optimal result, or if the strategy would remain profitable for other possible
configurations. For the determination of the universe of trading rules we have configured
the following parameters:
• Short term EMA (15min): ! = 35, 40, 45, 50
• Medium term EMA (daily): ! = 5, 7, 9, 11, 15
• Flat pattern’s minimum range: 1(DRK!5S) = 80, 82, … , 110
• Maximum loss per trade: DRK!5S = 90, 92, … , 110
Which leads to a total of & = 4×5×16×11 = 4,224 trading rules.
It would be possible to include within these parameters the stop loss and the take profit.
However, the values for these parameters are not chosen a priori, but are calculated each
quarter according to the best result obtained in the previous quarter. Sullivan et al. (1999)
state “The cumulative wealth trading rule bases today’s signal on the best trading rule as
of yesterday, according to total accumulated wealth. The recursive cumulative wealth rule
is not the best trading rule ex post, thus the Reality Check D-value does not apply”. This
is why we have not included the stop loss and take profit together with the other
parameters mentioned above.
Figure 13 represents the return obtained by each of the 4,224 trading rules generated from
the parameters previously mentioned. We can see how you get a positive return, above
all in all cases of 240% and in some cases higher than 300%. The best configuration
reported by the CGM hardly obtains a 180% return, which is the one shown in the figure.
Figure 14 follows a similar one in White (2000), and represents the values of the matrix
L for the & trading rules, together with the best relative performance encountered as of the
given trading rule.
It is observed that all values are positive, so the D-value of the Reality Check is zero.
Therefore, we reject the null hypothesis (4) and we can assume that the positive return
obtained by the trading rule proposed in the work is not affected by the data snooping
effect. SPA, which is not as conservative as the Reality Check, confirms this conclusion.
26
Fig. 13. Comparison between the return of the 4,224 trading rules and the best CGM
trading rule
Note: The blue points represent the accumulated return of the & different trading rules.
The orange straight dashed line is the accumulated return for the best performance trading
rule in CGM.
Fig. 14. The L matrix values from the Reality Check test
Note: The orange line represents the best relative performance encountered as of the given
trading rule. The blue dashed line represents candidate model performance relative to the
benchmark.
27
7. Conclusions
Analysis of the efficiency of stock markets has been the subject of great interest,
especially in recent years with the advance in the computation and the treatment of large
amounts of information at a great speed. Many recent research studies have detected
significant anomalies in the efficiency of markets, some of them linked to chartist patterns.
Our work focuses on one of them, the flag pattern.
Following a previous study of ours, Cervelló-Royo, Guijarro, and Michniuk (2015), we
have introduced important innovations that have been shown to improve the behavior of
the strategy based on the flag pattern in the form of both higher profitability and lower
risk. First, the success of the strategy reported in Cervelló-Royo, Guijarro, and Michniuk
(2015) depended on how lucky the investor was in choosing the best combination of stop
loss and take profit. Our proposal makes this selection automatically, so that these
parameters are calibrated in one quarter to be used in the next. In addition, to filter the
trades and improve the hit ratio of the strategy, we have introduced the use of the EMA
indicator in the short and medium term, which allows only those trades that favor the
trend to be launched. We have also discarded those flags that were developed within a
very small price range and limited the maximum loss for any operation to 100 points.
These innovations allow better selection of the trades, but in a way that the number of
trades carried out will continue allowing the results to be statistically significant. The
results thus obtained generate a greater profit than the best alternative reported by
Cervelló-Royo, Guijarro, and Michniuk (2015) at a lower risk, as measured by the
maximum drawdown. In addition, the impact of transaction costs on results is very small,
given the high profit per trade obtained with the strategy. In addition, it was also shown
that the model does not entail data snooping problems, after generating 4,224 different
trading rules and passing the Reality Check test
References
Barak, S., Dahooie, J. H., & Tichý, T. (2015). Wrapper ANFIS-ICA method to do stock
market timing and feature selection on the basis of Japanese Candlestick. Expert Systems
with Applications, 42(23), 9221–9235.
Brock, W., Lakonishok, J., & LeBaron, B. (1992). Simple technical trading rules and the
stochastic properties of stock returns. The Journal of Finance, 47(5), 1731-1764.
Cervelló-Royo, R., Guijarro, F., & Michniuk, K. (2015). Stock market trading rule based
on pattern recognition and technical analysis: forecasting the DJIA index with intraday
data. Expert Systems with Applications, 42, 5963–5975.
Chang, P. C., Liao, T. W., Lin, J. J., & Fan, C. Y. (2011). A dynamic threshold decision
system for stock trading signal detection. Applied Soft Computing, 11(5), 3998-4010.
Chen, T. L., & Chen, F. Y. (2016). An intelligent pattern recognition model for supporting
investment decisions in stock market. Information Sciences, 346, 261-274.
Chiang, W. C., Enke, D., Wu, T., & Wang, R. (2016). An adaptive stock index trading
decision support system. Expert Systems with Applications, 59, 195-207.
Deng, S., & Sakurai, A. (2014). Integrated model of multiple kernel learning and
differential evolution for EUR/USD trading. The Scientific World Journal, 2014.
28
Downes, J., & Goodman, J. (1998). Dictionary of finance and investment terms (5th ed.).
New York: Barron’s Educational Series Inc.
Dymova, L., Sevastianov, P., & Bartosiewicz, P. (2010). A new approach to the rule-base
evidential reasoning: Stock trading expert system application. Expert Systems with
Applications, 37(8), 5564-5576.
Dymova, L., Sevastjanov, P., & Kaczmarek, K. (2016). A Forex trading expert system
based on a new approach to the rule-base evidential reasoning. Expert Systems with
Applications, 51, 1-13.
Fama, E. F. (1970). Efficient capital markets: A review of theory and empirical work. The
Journal of Finance, 25, 383–417.
Fang, J., Jacobsen, B., & Qin, Y. (2014). Predictability of the simple technical trading
rules: An out-of-sample test. Review of Financial Economics, 23(1), 30-45.
Gong, X., Si, Y. W., Fong, S., & Biuk-Aghai, R. P. (2016). Financial time series pattern
matching with extended UCR Suite and Support Vector Machine. Expert Systems with
Applications, 55, 284-296.
Hansen, P. R. (2005). A test for superior predictive ability. Journal of Business &
Economic Statistics, 23(4), 365-380.
Hu, Y., Feng, B., Zhang, X., Ngai, E. W. T., & Liu, M. (2015). Stock trading rule
discovery with an evolutionary trend following model. Expert Systems with Applications,
42(1), 212-222.
Hu, Y., Liu, K., Zhang, X., Su, L., Ngai, E. W. T., & Liu, M. (2015). Application of
evolutionary computation for rule discovery in stock algorithmic trading: A literature
review. Applied Soft Computing, 36, 534-551.
Kim, Y., & Enke, D. (2016). Developing a rule change trading system for the futures
market using rough set analysis. Expert Systems with Applications, 59, 165-173.
Leigh, W., Modani, N., & Hightower, R. (2004). A computational implementation of
stock charting: Abrupt volume increase as signal for movement in New York stock
exchange composite index. Decision Support Systems, 37, 515–530
Leigh, W., Modani, N., Purvis, R., & Roberts, T. (2002). Stock market trading rule
discovery using technical charting heuristics. Expert Systems with Applications, 23, 155–
159.
Leigh, W., Paz, N., & Purvis, R. (2002). Market timing: A test of a charting heuristic.
Economics Letters, 77, 55–63.
Leigh, W., Purvis, R., & Ragusa, J. (2002). Forecasting the NYSE composite index with
technical analysis, pattern recognizer, neural network, and genetic algorithm: A case
study in romantic decision support. Decision Support Systems, 32, 361–377.
Leitão, J., Neves, R. F., & Horta, N. (2016). Combining rules between PIPs and SAX to
identify patterns in financial markets. Expert Systems with Applications, 65, 242-254.
Luo, L., & Chen, X. (2013). Integrating piecewise linear representation and weighted
support vector machine for stock trading signal prediction. Applied Soft Computing, 13(2),
806-816.
Malkiel, Burton G. (2003). The efficient market hypothesis and its critics. The Journal of
Economic Perspectives, 17(1), 59–82.
29
Ozturk, M., Toroslu, I. H., & Fidan, G. (2016). Heuristic based trading system on Forex
data using technical indicator rules. Applied Soft Computing, 43, 170-186.
Papailias, F., & Thomakos, D. D. (2015). An improved moving average technical trading
rule. Physica A: Statistical Mechanics and its Applications, 428, 458-469.
Park, C. H., & Irwin, S. H. (2007). What do we know about the profitability of technical
analysis? Journal of Economic Surveys, 21(4), 786-826.
Politis, D. N., & Romano, J. P. (1994). The stationary bootstrap. Journal of the American
Statistical Association, 89(428), 1303-1313.
Schulmeister, S. (2009). Profitability of technical stock trading: Has it moved from daily
to intraday data? Review of Financial Economics, 18(4), 190-201.
Sullivan, R., Timmermann, A., & White, H. (1999). Data-snooping, technical trading rule
performance, and the bootstrap. The Journal of Finance, 54(5), 1647-1691.
Teixeira, L., & De Oliveira, A. (2010). A method for automatic stock trading combining
technical analysis and nearest neighbor classification. Expert Systems with Applications,
37, 6885–6890.
Wang, J., & Chan, S. (2007). Stock market trading rule discovery using pattern
recognition and technical analysis. Expert Systems with Applications, 33, 304–315.
Wang, J., & Chan, S. (2009). Trading rule discovery in the US stock market: An empirical
study. Expert Systems with Applications, 36, 5450–5455.
Wang, F., Philip, L. H., & Cheung, D. W. (2014). Combining technical trading rules using
particle swarm optimization. Expert Systems with Applications, 41(6), 3016-3026.
White, H. (2000). A reality check for data snooping. Econometrica, 68(5), 1097-1126.
Wu, M. E., Wang, C. H., & Chung, W. H. (2016). Using trading mechanisms to
investigate large futures data and their implications to market trends. Soft Computing, 1-
14. DOI: 10.1007/s00500-016-2162-6.
Zapranis, A., & Tsinaslanidis, P. E. (2012). A novel, rule-based technical pattern
identification mechanism: Identifying and evaluating saucers and resistant levels in the
US stock market. Expert Systems with Applications, 39(7), 6301-6308.
30