305x Filetype PDF File size 0.25 MB Source: engineering.utm.my
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
Categories and Subject Descriptors novel transforming technique for time series dimensionality
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
Keywords (SAX), and Extended SAX by [14 ].
Financial time series representation, Pattern matching, Elliott Important points are also determined in dimensionality
Wave Theory, Fibonacci number. reduction techniques. Based on identifying the perceptually
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 This paper is organized as follows. Section 2 describes the
method open to different interpretations by different individuals principle of Elliott wave and time series dimensionality reduction
based on their experience. Many researchers have been focusing methods. Section 3 describes the proposed method of time series
their works on technical analysis by automatically applying dimensionality reduction. Section 4 the experimental results are
several distinguish pattern recognition approaches to improve the presented. Finally, section 5 concludes the paper and outlines
investment return. Many approaches are applied to automatically some direction for future works.
recognize the stock chart patterns include; genetic algorithm
[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
Elliott concluded that the movement of the stock market could be traders have decided that the trend is up. Finally, all the buying
predicted by observing and identifying a repetitive pattern of frenzy dies down; Wave 3 comes to a halt. Profit taking now
waves. In fact, Elliott believed that all of man's activities, not just begins to set in. Traders who were long from the lows decide to
the stock market, were influenced by these identifiable series of take profits. They have a good trade and start to protect profits.
waves. Elliott based part his work on the Dow Theory, which also This causes a pullback in the prices that is called Wave 4. Wave 2
defines price movement in terms of waves, but Elliott discovered was a vicious sell-off; Wave 4 is an orderly profit-taking decline.
the fractal nature of market action. Thus Elliott was able to While profit-taking is in progress, the majority of traders are still
analyze markets in greater depth, identifying the specific convinced the trend is up. They were either late in getting in on
characteristics of wave patterns and making detailed market this rally, or they have been on the sideline. They consider this
predictions based on the patterns he had identified. The Elliott profit-taking decline an excellent place to buy in and get even.
Wave Theory describes the stock market’s behavior as a series of On the end of Wave 4, more buying sets in and the prices start to
waves up and another series of waves down to complete a market rally again.
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
Elliott Wave Theory interprets market actions in terms of different categories: simple correction (zigzag) and complex
recurrent price structures. Basically, Market cycles are composed corrections (flat, irregular, triangle).
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
The whole theory of Elliott Wave can be classified into two parts: new lows below the end of Wave A. The Wave A of a zigzag
impulse patterns and corrective patterns. correction always has a five-wave pattern. In the other two types
of corrections (Flat and Irregular), Wave A has a three-wave
2.1.1 Impulse patterns pattern. Thus, if you can identify a five-wave pattern inside Wave
The impulse pattern consists of five waves. The five waves A of any correction, you can then expect the correction to turn out
can be in either direction, up or down. As can be seen in figure 1, as a zigzag formation.
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 impulse pattern, the market drops in Wave A. It then rallies
will finally end without making new lows and the market will in a Wave B to the previous high. Finally, the market drops one
start to turn around for another rally. The initial stages of the last time in Wave C to the previous Wave A low. Irregular
Wave 3 rally are slow, and it finally makes it to the top of the Correction. In this type of correction, Wave B makes a new high.
previous rally (the top of Wave 1). At this time, there are a lot of The final Wave C may drop to the beginning of Wave A, or below
stops above the top of Wave 1. Traders are not convinced of the it. Triangle Correction In addition to the three-wave correction
upward trend and are using this rally to add more shorts. For their patterns, there is another pattern that appears time and time again.
analysis to be correct, the market should not take the top of the It is called the Triangle pattern. Unlike other triangle studies, the
previous rally. Therefore, many stops are placed above the top of Elliott Wave Triangle approach designates five sub-waves of a
Wave 1. The Wave 3 rally picks up steam and takes the top of triangle as A, B, C, D and E in sequence. Triangles, by far, most
Wave 1. As soon as the Wave 1 high is exceeded, the stops are commonly occur as fourth waves. One can sometimes see a
taken out. Depending on the number of stops, gaps are left open.
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
direction as Wave 3. When triangles occur in Wave Bs, the 0.3
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
Our model comprises of two parts; part 1, the time series 00 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 The algorithm of PWP can be sequentially presented as follow.
movements of up and down directions. These movements always
form wave-like structure. However, most of minor fluctuated (1) For the time series S ={s , s , …, s }, consider the first
movements usually become noise in many analysis methods. 1 2 m
Reducing the dimensions or minor fluctuated movements of stock PIP on the first iteration including retrieval of the first
market time series can provide a higher degree of analysis results. and the last point of S.
Let s is the first PIP, thus the time series is divided
Due to Elliott wave analysis, the early identifying the forming of p1 s and s s ,then PIPs are recorded
into 2 segments; s
the waves is very important for traders to gain their profit taking. into PIPList. 1 p1 p1 m
Modeling of stock market time series dimensionality (2) For each sub-segment from step 1, the next iteration of
reduction can be determined by reducing the minor fluctuated PIP retrieval is considered. When PIPs are retrieved
movements and retaining the major fluctuated movement. The from all sub-segments, at this point, the peak-to-peak
major fluctuated movement points can be known as Perceptually connecting and bottom-to-bottom connecting are
Important Points(PIPs). Algorithm of identification of PIPs was determined.
first introduced by Chung et al. (2001)[15], and, with the similar
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 3.2 Identification of Elliott Waves
important points or between the peak important points. This is
shown in figure 2. To identify the existing of Elliott waves, the point-to-point
To eliminate these effects, we introduce the method of matching is provided. This method matches the time series and
time series dimensionality reduction by considering point- the pattern templates. However, since the varieties of amplitude of
importance order of wave-like shape preservation(PWP). The waves and points distances the matching point-to-point directly is
PWP method is very important to preserve the reconstructed not proper.
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 sp denote the PIPs found in P. However, the Information and Communications Technology, 2005.
k Enabling Technologies for the New Knowledge Society: ITI
measure in Eq. (1) has not yet taken the horizontal scale (time
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
where ݏ௧ and ݍ௧ denote the time coordinate of the sequence of Theoretical and Applied Finance, Vol. 2, No.2, 1999,
pp221-241.
points ݏ and ݍ , respectively. To take both horizontal and
[6] Chen, T.-L., C.-H. Cheng, and H. Jong Teoh, Fuzzy time-
vertical distortion into consideration in the similarity measure, the series based on Fibonacci sequence for stock price
distance (or similarity) measure could be modified as: 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 w denotes the weighing among the AD and TD and can be
1 [8] Frost and R.R. Prechter, Elliott Wave Principle: Key to Stock
specified by the users. In this paper w =0.5 is applied[22].
1 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.
6. REFERENCES [16] Fu T-C., Chung F-L., Luk R. and Ng C-M., Representing
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.
no reviews yet
Please Login to review.