You are on page 1of 5

Time Series Representation for Elliott Wave Identification

in Stock Market Analysis


Chaliaw Phetking Mohd Noor Md. Sap Ali Selamat
Faculty of Science and Technology Faculty of Comp. Sci. and Info. Sys. Faculty of Comp. Sci. and Info. Sys.
Suan Dusit Rajabhat University Universiti Teknologi Malaysia Universiti Teknologi Malaysia
Bangkok, Thailand Johor, Malaysia Johor, Malaysia
+662-244-5600 +607-553-2419 +607-553-2638
chaliaw_phe@dusit.ac.th mohdnoor@fsksm.utm.my aselamat@fsksm.utm.my

ABSTRACT Unfortunately, Elliott wave identification is a very difficult


Elliott waves are considered as the crowded psychological effect. task and usually depending on analyst experiences. Further, stock
In stock market time series, there are several Elliott waves and in time series always demonstrates its movement in a fluctuant way
different resolution. To identify existing Elliott wave in time due to some important factors or events. These give the hard
series, a dimensional reduction technique is determined. problem of identification of existing Elliott wave. However, with
Unfortunately, existing financial time series reduction methods the time series dimensionality reduction technique, it is available
usually produce the distorted wave-like shape time series which is to identify the existing of Elliott wave.
difficult to identify Elliott waves. In this study, we propose the By considering the time series dimensionality reduction
method of financial time series reduction for Elliott Wave techniques, many researchers propose various advantage
identification based on perceptually important points techniques. The work done by Agrawal et al.(1993)[9] utilizes the
identification method. These collected points are used to produce Discrete Fourier Transform(DFT) to reduce the time series
a wave-like time series by using point-importance order of wave- dimensions. However, other techniques are suggested including
like shape preservation. The method is tested in Elliott Wave Singular Value Decomposition (SVD) [10] and the Discrete
identification in real time series. Wavelet Transform (DWT)[11]. Keogh et al.[12] introduce a
novel transforming technique for time series dimensionality
Categories and Subject Descriptors reduction call Piecewise Aggregate Approximation (PAA). This
Time series analysis. technique approximates the dimensions by segmenting the
sequences into equi-length sections and recording the mean value
General Terms of these sections. The extended versions of PAA can be found by
Algorithms, Economics. the works of [13] so-called symbolic aggregate approximation
(SAX), and Extended SAX by [14 ].
Keywords Important points are also determined in dimensionality
Financial time series representation, Pattern matching, Elliott
reduction techniques. Based on identifying the perceptually
Wave Theory, Fibonacci number.
importance points (PIPs)[15], Fu et al.[16] proposed SB-Tree
1. INTRODUCTION representation to perform financial time series dimensionality
Technical analysis is an attempt to predict the future prices of reduction. Fink and Pratt[17] collects the important points in time
securities based on historical prices and volumes rather than series by considering some of its minima and maxima and
underlying company fundamentals, political events, and economic discards the other points. Among the minima and maxima
factors. Technical analysts believe in chart analysis to looking for important points collecting, Bao[18] interests in local minimal and
some significant information for predicting the next price maximal points and considers them as the turning points.
movement. Several chart analysis techniques are considered as In this research, we propose the method of time series
analysis tools. There are three main popular charting techniques: dimensionality reduction for Elliott wave identification in stock
bar charts, point-and-figure charts, and candlestick charts[1]. All market time series. We also improve the technique of Elliott wave
of them have been focused on attempting to recognize important pattern matching.
patterns. At the very least, chart pattern recognition is a subjective
method open to different interpretations by different individuals This paper is organized as follows. Section 2 describes the
based on their experience. Many researchers have been focusing principle of Elliott wave and time series dimensionality reduction
their works on technical analysis by automatically applying methods. Section 3 describes the proposed method of time series
several distinguish pattern recognition approaches to improve the dimensionality reduction. Section 4 the experimental results are
investment return. Many approaches are applied to automatically presented. Finally, section 5 concludes the paper and outlines
recognize the stock chart patterns include; genetic algorithm some direction for future works.
[2][3], fuzzy logic [4], neural network[5]. Various supported
theories are implemented including Dow theory and Elliott Wave
theory. Elliott wave theory is widely implemented in various
technical analysis approaches[6][7][8].
2. RELATED WORKS Gaps are a good indication of a Wave 3 in progress. After taking
In this section, the reviews of existing works and related theories the stops out, the Wave 3 rally has caught the attention of traders.
are described. The next sequence of events are as follows: Traders who were
initially long from the bottom finally have something to cheer
2.1 Elliott Wave Principle about. They might even decide to add positions. The traders who
The Elliott Wave Theory is introduced by Ralph Nelson were stopped out (after being upset for a while) decide the trend is
Elliott[19] which is inspired by the Dow Theory[20] and by up, and they decide to buy into the rally. All this sudden interest
observations found throughout nature. fuels the Wave 3 rally. This is the time when the majority of the
traders have decided that the trend is up. Finally, all the buying
Elliott concluded that the movement of the stock market could be frenzy dies down; Wave 3 comes to a halt. Profit taking now
predicted by observing and identifying a repetitive pattern of begins to set in. Traders who were long from the lows decide to
waves. In fact, Elliott believed that all of man's activities, not just take profits. They have a good trade and start to protect profits.
the stock market, were influenced by these identifiable series of This causes a pullback in the prices that is called Wave 4. Wave 2
waves. Elliott based part his work on the Dow Theory, which also was a vicious sell-off; Wave 4 is an orderly profit-taking decline.
defines price movement in terms of waves, but Elliott discovered While profit-taking is in progress, the majority of traders are still
the fractal nature of market action. Thus Elliott was able to convinced the trend is up. They were either late in getting in on
analyze markets in greater depth, identifying the specific this rally, or they have been on the sideline. They consider this
characteristics of wave patterns and making detailed market profit-taking decline an excellent place to buy in and get even.
predictions based on the patterns he had identified. The Elliott On the end of Wave 4, more buying sets in and the prices start to
Wave Theory describes the stock market’s behavior as a series of rally again.
waves up and another series of waves down to complete a market
cycle. Those cycles are grouped into eight waves, with five of The Wave 5 rally lacks the huge enthusiasm and strength
those following the main trend, and three being corrective trends. found in the Wave 3 rally. The Wave 5 advance is caused by a
After the eight moves are made, the cycle is complete. The small group of traders. Although the prices make a new high
graphical view of Elliott Wave is depicted in figure 1. above the top of Wave 3, the rate of power, or strength, inside the
Wave 5 advance is very small when compared to the Wave 3
advance. Finally, when this lackluster buying interest dies out, the
market tops out and enters a new phase.

2.1.2 Corrective patterns


Corrections are very hard to master. Most Elliott traders
make money during an impulse pattern and then lose it back
during the corrective phase. An impulse pattern consists of five
waves. With the exception of the triangle, corrective patterns
consist of 3 waves. An impulse pattern is always followed by a
Figure 1. Elliott wave cycle corrective pattern. Corrective patterns can be grouped into two
different categories: simple correction (zigzag) and complex
Elliott Wave Theory interprets market actions in terms of corrections (flat, irregular, triangle).
recurrent price structures. Basically, Market cycles are composed
of two major types of Wave : Impulse Wave and Corrective Wave Simple Correction (Zigzag). There is only one pattern in a
For every impulse wave, it can be sub-divided into 5 – wave simple correction. This pattern is called a Zigzag correction. A
structure (1-2-3-4-5), while for corrective wave, it can be sub- Zigzag correction is a three-wave pattern where the Wave B does
divided into 3 – wave structures (a-b-c). not retrace more than 75 percent of Wave A. Wave C will make
new lows below the end of Wave A. The Wave A of a zigzag
The whole theory of Elliott Wave can be classified into two parts: correction always has a five-wave pattern. In the other two types
impulse patterns and corrective patterns. of corrections (Flat and Irregular), Wave A has a three-wave
pattern. Thus, if you can identify a five-wave pattern inside Wave
2.1.1 Impulse patterns A of any correction, you can then expect the correction to turn out
The impulse pattern consists of five waves. The five waves
as a zigzag formation.
can be in either direction, up or down. As can be seen in figure 1,
the first wave is usually a weak rally with only a small percentage Complex Corrections (Flat, Irregular, Triangle). In a Flat
of the traders participating. Once Wave 1 is over, they sell the correction, the length of each wave is identical. After a five-wave
market on Wave 2. The sell-off in Wave 2 is very vicious. Wave 2
will finally end without making new lows and the market will impulse pattern, the market drops in Wave A. It then rallies
start to turn around for another rally. The initial stages of the in a Wave B to the previous high. Finally, the market drops one
Wave 3 rally are slow, and it finally makes it to the top of the last time in Wave C to the previous Wave A low. Irregular
previous rally (the top of Wave 1). At this time, there are a lot of Correction. In this type of correction, Wave B makes a new high.
stops above the top of Wave 1. Traders are not convinced of the The final Wave C may drop to the beginning of Wave A, or below
upward trend and are using this rally to add more shorts. For their it. Triangle Correction In addition to the three-wave correction
analysis to be correct, the market should not take the top of the patterns, there is another pattern that appears time and time again.
previous rally. Therefore, many stops are placed above the top of It is called the Triangle pattern. Unlike other triangle studies, the
Wave 1. The Wave 3 rally picks up steam and takes the top of Elliott Wave Triangle approach designates five sub-waves of a
Wave 1. As soon as the Wave 1 high is exceeded, the stops are triangle as A, B, C, D and E in sequence. Triangles, by far, most
taken out. Depending on the number of stops, gaps are left open. commonly occur as fourth waves. One can sometimes see a
triangle as the Wave B of a three-wave correction. Triangles are 0.5
very tricky and confusing. One must study the pattern very peak-peak connecting

carefully prior to taking action. Prices tend to shoot out of the


0.4
triangle formation in a swift thrust. When triangles occur in the
fourth wave, the market thrusts out of the triangle in the same
0.3
direction as Wave 3. When triangles occur in Wave Bs, the
market thrusts out of the triangle in the same direction as the
Wave A. 0.2
bottom-bottom connecting

0.1

3. THE PROPOSED MODEL


0
Our model comprises of two parts; part 1, the time series 0 50 100 150 200 250 300 350 400 450
dimensionality reduction, and the part 2, the identification of
Elliott wave. Figure 2. Distorted-wave shape dimensionality reduction.
3.1 Time Series Dimensionality Reduction .
A stock market time series consists of several fluctuant price
movements of up and down directions. These movements always The algorithm of PWP can be sequentially presented as follow.
form wave-like structure. However, most of minor fluctuated (1) For the time series S ={s1, s2, …, sm}, consider the first
movements usually become noise in many analysis methods. PIP on the first iteration including retrieval of the first
Reducing the dimensions or minor fluctuated movements of stock and the last point of S.
market time series can provide a higher degree of analysis results.
Due to Elliott wave analysis, the early identifying the forming of Let sp1 is the first PIP, thus the time series is divided
the waves is very important for traders to gain their profit taking. into 2 segments; s1sp1 and sp1sm ,then PIPs are recorded
into PIPList.
Modeling of stock market time series dimensionality
reduction can be determined by reducing the minor fluctuated (2) For each sub-segment from step 1, the next iteration of
movements and retaining the major fluctuated movement. The PIP retrieval is considered. When PIPs are retrieved
major fluctuated movement points can be known as Perceptually from all sub-segments, at this point, the peak-to-peak
Important Points(PIPs). Algorithm of identification of PIPs was connecting and bottom-to-bottom connecting are
first introduced by Chung et al. (2001)[15], and, with the similar determined.
idea, it is independently introduced by Douglas and Peucker (3) If the peak-to-peak connecting or bottom-to-bottom
(1973)[21]. Chung et al [15] describe the concept of data point connecting exists, retrieval the next PIP of the segment
importance as the influence of a data point on the shape of the is determined. Otherwise, remove PIPs which are the
time series. A data point that has a greater influence to the overall end points of the segment. Finally, all PIPs are recorded
shape of the time series is considered as more important. The to the PIPList.
implementation of PIPs identification can be found in
[15][16][22]. (4) Follow step 1-4 until the threshold is reached.
In a time series, PIPs identification is performed recursively The threshold used for considering in step 4 is determined by
until all points are considered. With the method introduced by Fu the period of trading. If a stock trader trades once a week(5
et al.(2007)[15], importance-ordered PIPs are used for business days) the threshold is set to be 5.
constructing the SB-Tree data structure and dimensionality
The result from this algorithm is the list of PIPs series in different
reduction can be done by accessing number of PIPs from the tree.
levels.
Nevertheless, by considering number of PIPs, in some case, the
reconstructed time series may be constructed in distorted-wave
shape because of the connecting line between the bottom
important points or between the peak important points. This is 3.2 Identification of Elliott Waves
shown in figure 2. To identify the existing of Elliott waves, the point-to-point
matching is provided. This method matches the time series and
To eliminate these effects, we introduce the method of the pattern templates. However, since the varieties of amplitude of
time series dimensionality reduction by considering point- waves and points distances the matching point-to-point directly is
importance order of wave-like shape preservation(PWP). The not proper.
PWP method is very important to preserve the reconstructed
shape of time series in the wave-like form. The idea of PWP is By the method of pattern based matching proposed by Fu et
come from the number of retrieved PIPs cannot preserve the al.(2007)[22], the amplitude distance and temporal distance
wave-like shape of the dimension reduced time series measures are applied in this research.
2. Suppose P and Q are lists of points in the time series and
templates, thus the amplitude distance can be determined as
follow.

, ∑ (1)
Here, SP and spk denote the PIPs found in P. However, the Information and Communications Technology, 2005.
measure in Eq. (1) has not yet taken the horizontal scale (time Enabling Technologies for the New Knowledge Society: ITI
dimension) into considerations. Therefore, it is preferred to 3rd International Conference on. 2005.
consider the horizontal distortion of the pattern against the pattern [4] Ming Dong, X.-S.Z., Exploring the fuzzy nature of technical
templates. The temporal distance (TD) between P and Q is patterns of US stock market.. Proc. ICONIP’02-SEAL’02-
defined as: FSKD’02, 2002: p. 6.

∑ [5] J. T. Yao, C. L. Tan and H.-L. Poh, "Neural Networks for


, (2)
Technical Analysis: A Study on KLCI", International Journal
of Theoretical and Applied Finance, Vol. 2, No.2, 1999,
where and denote the time coordinate of the sequence pp221-241.
points and , respectively. To take both horizontal and
vertical distortion into consideration in the similarity measure, the [6] Chen, T.-L., C.-H. Cheng, and H. Jong Teoh, Fuzzy time-
distance (or similarity) measure could be modified as: series based on Fibonacci sequence for stock price
forecasting. Physica A: Statistical Mechanics and its
Applications, 2007. 380: p. 377-390.
, , 1 , (3) [7] Kirkpatrick, C.D., Dahlquist, J.R., Technical analysis. 2007:
Financial times press.
where w1 denotes the weighing among the AD and TD and can be
specified by the users. In this paper w1=0.5 is applied[22]. [8] Frost and R.R. Prechter, Elliott Wave Principle: Key to Stock
Market Profits. 1985: New Classics Library.
4. EXPERIMENTAL RESULTS [9] R. Agrawal, C. Faloutsos, and A. Swami: Efficient Similarity
Search in Sequence Databases, Proc. Int’l Conf. Foundations
5. CONCLUSION of Data Organiz ations and Algorithms, pp. 69-84,
Oct, 1993.
[10] Korn, F., Jagadish, H & Faloutsos. C.: Efficiently supporting
ad hoc queries in large datasets of time sequences. Proc. of
SIGMOD ’97, Tucson, AZ, pp 289-300, 1997.
[11] Chan, K.& Fu, W.: Efficient time series matching by
wavelets. Proc. of the 15th IEEE International Conference on
Data Engineering, 1999.
[12] Keogh, E., Chakrabarti, K., Pazzani, M., Mehrotra, S., 2000.
Dimensionality reduction for fast similarity Search in large
time series databases. Journal of Knowledge and Information
Systems 3 (3), 263–286.
[13] Lin J., Keogh E., Lonardi S., Chiu B. A Symbolic
Representation of Time Series, with Implications for
Streaming Algorithms. In proceedings of the 8th ACM
SIGMOD Workshop on Research Issues in Data Mining and
Knowledge Discovery. (2003).
[14] Battuguldur Lkhagva, Yu Suzuki, Kyoji Kawagoe: New
Time Series Data Representation ESAX for Financial
Applications. ICDE Workshops 2006.
[15] Chung, F-L., Fu, T-C., Luk, R., Ng, V. Flexible time series
pattern matching based on perceptually important points. In:
International Joint Conference on Artificial Intelligence
Workshop on Learning from Temporal and Spatial Data, pp.
1–7.
[16] Fu T-C., Chung F-L., Luk R. and Ng C-M., Representing
6. REFERENCES financial time series based on data point importance.,
[1] Person, J.L., A complete guide to technical trading tactics : Engineering Applications of Artificial IntelligenceVolume
how to profit using pivot points, candlesticks & other 21, 2,March 2008, pp.277-300.
indicators. 2004, Canada: John Wiley & Sons.
[17] Fink, E., K.B. Pratt, and H.S. Gandhi. Indexing of time series
[2] Baba, N., et al., Utilization of AI & GAs to Improve the by major minima and maxima. in Systems, Man and
Traditional Technical Analysis in the Financial Markets, in Cybernetics, 2003. IEEE International Conference on. 2003.
Knowledge-Based Intelligent Information and Engineering
[18] Bao D. A generalized model for financial time series
Systems. 2003. p. 1095-1099.
representation and prediction. Applied Intelligence,
[3] Badawy, F.A., H.Y. Abdelazim, and M.G. Darwish. Genetic DOI:10.1007/s10489-007-0104-9.
Algorithms for Predicting the Egyptian Stock Market. in
[19] Elliott, R.N. 1938.
[20] Nelson,S. The A B C of stock speculation, 1902. Burlington,
VT: Fraser Publishing Co., 1964 reprint.
[21] Douglas, D., Peucker, T., 1973. Algorithms for the reduction
of the number of points required to represent a digitized line
or its caricature. The Canadian Cartographer 10 (2), 112–
122.
[22] Fu, T.-C, Chung, F.-L., Luk R., Ng C.-M., Stock time series
pattern matching: Template-based vs. rule-based approaches.
Engineering Applications of Artificial Intelligence 20,2007,
pp.347-364.

You might also like