Pattern Matching Trading System Based On The Dynamic Time Warping Algorithm
Pattern Matching Trading System Based On The Dynamic Time Warping Algorithm
Pattern Matching Trading System Based On The Dynamic Time Warping Algorithm
Article
Pattern Matching Trading System Based on the
Dynamic Time Warping Algorithm
Sang Hyuk Kim 1 , Hee Soo Lee 2 , Han Jun Ko 1 , Seung Hwan Jeong 1 , Hyun Woo Byun 1 and
Kyong Joo Oh 1, *
1 Department of Industrial Engineering, Yonsei University, 50 Yonsei-ro, Seodaemun-gu, Seoul 03722, Korea;
blueshak@yonsei.ac.kr or blueshak@gmail.com (S.H.K.); ko9550@naver.com (H.J.K.);
jsh0331@yonsei.ac.kr (S.H.J.); next1219@nate.com (H.W.B.)
2 Department of Business Administration, Sejong University, 209 Neungdong-ro, Gwangjin-gu,
Seoul 03722, Korea; heesoo@sejong.ac.kr
* Correspondence: johanoh@yonsei.ac.kr; Tel.: +82-2-2123-5720
Received: 27 October 2018; Accepted: 1 December 2018; Published: 6 December 2018
Abstract: The futures market plays a significant role in hedging and speculating by investors.
Although various models and instruments are developed for real-time trading, it is difficult to realize
profit by processing and trading a vast amount of real-time data. This study proposes a real-time index
futures trading strategy that uses the KOSPI 200 index futures time series data. We construct a pattern
matching trading system (PMTS) based on a dynamic time warping algorithm that recognizes patterns
of market data movement in the morning and determines the afternoon’s clearing strategy. We adopt
13 and 27 representative patterns and conduct simulations with various ranges of parameters to find
optimal ones. Our experimental results show that the PMTS provides stable and effective trading
strategies with relatively low trading frequencies. Financial market investors are able to make more
efficient investment strategies by using the PMTS. In this sense, the system developed in this paper
contributes the efficiency of the financial markets and helps to achieve sustained economic growth.
Keywords: dynamic time warping; pattern matching trading system; time series data; sliding
window
1. Introduction
The global financial crisis of 2007–2008 (GFC) was caused by many factors but one of the main
causes was the excessive expansion of financial assets including derivatives [1–3]. The world’s leading
financial markets include major equity index futures such as the S&P 500, NASDAQ 100, DJIA, FTSE
Russel 100, Nikkei 225 and KOSPI 200. Among them, the KOSPI 200 futures and options markets have
been the largest trading market since prior to the GFC until the mid-2010s [4]. As a single time series
data, the index futures, which generate a large amount of data as a result of large-scale transactions,
have been widely used for statistical analysis [5,6]. In recent years, data mining and machine learning
techniques are utilized to investigate the futures market.
Time series data is a collection of observational data that is generated chronologically from most
scientific and business domains [7]. Many researchers in various fields have used time series data
for their research [8,9]. Time series data in financial markets have unique characteristics compared
to that in other fields such as electrocardiograms [10]. In stock price time series data, investors in
equity markets show various patterns of investment. They can be categorized as investors who adopt
fundamental analysis and technical analysis [11]. Fundamental analysts make investment decisions
using global economic, industry and business indicators. On the other hand, assuming that the
past behavior of a stock price affects the future price, technical analysts make investment decisions
based on historical prices or patterns of price movement using complex indicators. Accordingly,
technical analysts use pattern analysis methods to analyze stock price charts for trading decisions [12].
Many studies on technical analysis for pattern matching have been carried out [13–17]. This pattern
analysis is a method of predicting the stock price by examining specific patterns observed in the past
stock price chart and confirming the existence of similar patterns in the current stock price [18].
An algorithm for efficient pattern recognition of the time series data is needed to build a trading
system based on pattern recognition. The Euclidean distance method or artificial intelligence method
has been used to find a similar pattern for stock prices [19–21]. Hu et al. [22] proposed a model which
is an investment strategy using a short- and long-term evolutionary trend algorithm. De Oliveira,
Nobre and Zarate [23] also proposed a model for predicting stock prices in the Brazilian market,
which combines fundamental and technical analysis using artificial neural networks. The system
development includes forecasting the FX market financial time series, which combines an adaptive
network-based fuzzy inference system and quantum behavioral particle gain optimization and
forecasting market trends using chart patterns [11]. Patel et al. [24] also proposed a model to predict
trends in financial markets by comparing four predictive models such as artificial neural networks,
support vector machines, random forests and naïve-Bayes. There are also studies showing the efficiency
of dynamic time warping algorithms for the problem of retrieving multi-attribute time sequences
similar to financial time series data [25]. The proposed method based on the dynamic time warping
algorithm predefines the pattern used as a template for pattern matching [26]. These studies have
focused on optimization and efficiency in pattern recognition. However, there is a limit to a study
on system trading at the optimal trading time point by checking the similarity of existing patterns
in the futures market. This trading strategy requires efficient pattern recognition algorithms such as
dynamic time warping [27]. Among them, only a few studies use the dynamic time warping algorithm
for futures trading [28–30].
The purpose of this research is to construct a pattern matching trading system (PMTS) that
extracts efficiently the optimized pattern of the proposed representative pattern in time series data
and conducts trading to find the optimal trading exit point. For this goal, we propose an algorithm
trading system that matches the time series pattern of the index futures data with the representative
pattern using the naïve dynamic time warping (DTW) algorithm. As the experiment progresses,
we consider various situations in futures contracts such as when margin calls are made, the liquidity
and volatility increases, the trend changes for trades that enter into the calculation of the intraday
trade and trades exit right before the closing of the market, to find the optimal trading exit point.
Our experimental results show stable and effective trading entry and exit strategies with relatively low
trading frequencies.
A number of financial instruments that are traded in financial markets exist and an enormous
number of models or techniques have been developed for efficient investment strategies. Therefore,
financial instruments and investment techniques as well as investors make an important contribution
to the efficiency of the financial markets. It is well known that the efficiency of the financial markets
have played an important role in sustaining economic growth. Financial market investors are able to
make more efficient investments strategies by using the PMTS. In this sense, the system developed
in this paper appears to contribute to the efficiency of the financial markets and hence play a role in
sustaining economic growth.
The rest of this paper is organized as follows. Section 2 introduces the concept of futures markets,
the concept of dynamic time warping algorithms and the sliding window method. In Section 3,
the topics include the standardization of extracted raw daily index futures data, the dynamic trading
pattern together with the dynamic time warping analysis for real-time pattern recognition and the
proposed trading entry and exit simulation. Section 3.4 describes the procedure of the experiments
performed and discusses the experimental results. Section 4 interprets the results and suggests the
direction of future research.
Sustainability 2018, 10, 4641 3 of 18
Figure 1. (A)
Figure 1. (A) Euclidean
Euclidean distance approach, (B)
distance approach, (B) DWP
DWP (Nonlinear
(Nonlinear alignment)
alignment) approach.
approach.
The objective
The objective of of DTWDTW isis totocompare
comparetwo twotimetimeseries
seriesX 𝑋𝑋== ((𝓍𝓍§11,, 𝓍𝓍§22, ,⋯ ), ∈Nℕ ∈and
· ·, ·𝓍𝓍,𝑁𝑁§),N𝑁𝑁 𝑌𝑌 =
N and
(𝓎𝓎=
Y 1 , 𝓎𝓎
( †
2 ,
1 ⋯
, ,
† 𝓎𝓎
2 , ·
𝑀𝑀
·),· 𝑀𝑀
, † ∈
M ℕ
) , and
M ∈ calculate
N and the
calculateminimum
the cumulative
minimum distance
cumulative between
distance them
between [44].themVarious
[44].
modifications
Various modifications of the of algorithm have have
the algorithm been been
proposed
proposed to speed
to speedupup DTW DTWcomputations
computationssuch such as
multiscaling [45,46]. Local distance measurement measurement is required to compare two time series that differ
in length. The The concept
conceptof ofthe
thecost
costfunction
functionororthe thedistance
distanceminimization,
minimization, whichwhich is isthethe core
coreof of DTW,
DTW, is
applied to a dynamic programming algorithm to produce a small value when
is applied to a dynamic programming algorithm to produce a small value when two sequences are
similar and a large large value
value when
when two two sequences
sequences are are not
not similar.
similar. The algorithm provides a way to
optimize the alignment and to minimize minimize cost functions or the
cost functions or the distance.
distance.
N ×𝑁𝑁×𝑀𝑀
M
The DTW DTW algorithm creates a distance matrixl 𝐶𝐶𝑙𝑙 ∈ ℝ : c∶i,j𝑐𝑐𝑖𝑖,𝑗𝑗
algorithm creates a distance matrix C ∈ R = =∥||§i𝓍𝓍−𝑖𝑖 − ||,𝑗𝑗 i∥,∈𝑖𝑖 [∈1 [1:
† j 𝓎𝓎 ], j 𝑗𝑗∈∈[1[1:
: N𝑁𝑁], :M𝑀𝑀]]
that represents
that representsallall pairwise
pairwise distances.
distances. It isItcalled
is called the cost
the local local cost for
matrix matrix for the alignment
the alignment of two sequencesof two
sequences X and Y. After generating this matrix, the algorithm uses a warping function that defines
X and Y. After generating this matrix, the algorithm uses a warping function that defines the similarity
the similarity
between §i ∈ between and 𝓎𝓎follows
X and † j 𝓍𝓍∈𝑖𝑖 ∈Y,𝑋𝑋which 𝑗𝑗 ∈ 𝑌𝑌, which follows the boundary condition of assigning the
the boundary condition of assigning the first and last
first and last elements of X and Y and finds the optimal
elements of X and Y and finds the optimal alignment pathalignment
to path
toThis
pass through. passoptimal through. This optimal
alignment path
alignment
is a sequence path is a sequence
of points of P = (√of points of 𝑃𝑃 = (𝓅𝓅 , 𝓅𝓅 , ⋯ , 𝓅𝓅 ) with 𝓅𝓅 = (𝓅𝓅 , 𝓅𝓅 ) ∈ [1: 𝑁𝑁] × [1: 𝑀𝑀]
1 , √2 , · · · , √K ) with1√l 2= √𝐾𝐾i , √ j ∈ [1𝑙𝑙 : N ] ×i [1𝑗𝑗: M ] for l ∈ [1 : K ]
for 𝑙𝑙 ∈ [1: 𝐾𝐾] that satisfies all three criteria of the boundary condition, the monotonicity condition and
that satisfies all three criteria of the boundary condition, the monotonicity condition and the step size
the step size condition. The boundary condition is the first and last values of sequences in the optimal
condition. The boundary condition is the first and last values of sequences in the optimal alignment
alignment path. The monotonicity condition is sequence of points on the path placed in chronological
path. The monotonicity condition is sequence of points on the path placed in chronological order.
order. The step size condition limits the long jumping warping path in time. It is generally
The step size condition limits the long jumping warping path in time. It is generally recommended to
recommended to use the formulated basic step size condition as 𝓅𝓅 − 𝓅𝓅𝑙𝑙 ∈ {(1,1), (1,0), (0,1)}. The
use the formulated basic step size condition as √l +1 − √l ∈ {(1, 1𝑙𝑙+1 ), (1, 0), (0, 1)}. The cost function
cost function used to calculate the local cost matrix of all the bidirectional distances is:
used to calculate the local cost matrix of all the bidirectional 𝐿𝐿
distances is:
𝑐𝑐𝑝𝑝 (𝑋𝑋, 𝑌𝑌) = �
L 𝑐𝑐�𝓍𝓍𝑛𝑛𝑙𝑙 , 𝓎𝓎𝑚𝑚𝑙𝑙 � (1)
c p ( X, Y ) = ∑ 𝑙𝑙=1c § nl , † ml (1)
l =1
The aligned warping path with the least cost is called the 𝑃𝑃∗ optimal warping path. By
definition, the optimal
The aligned warpingpath
pathincreases
with the exponentially as thethe
least cost is called length of X and
P∗ optimal Y increases
warping path.linearly, so all
By definition,
possible
the warping
optimal paths between
path increases X and Y,as
exponentially which consume
the length of Xaand largeY amount
increasesoflinearly,
computation, must be
so all possible
tested. This
warping problem
paths can X
between beand
solved by O(MN)
Y, which consume that isa the time
large complexity
amount of DTW algorithm
of computation, must be[7]. The
tested.
DTWproblem
This distancecan
between X and
be solved byY,O(MN)
DTW(X, thatY),isisthe
then
timedefined as the total
complexity of DTWcostalgorithm
of 𝑃𝑃 as follows:
∗ [7]. The DTW
distance between X and Y, DTW(X, Y), is then defined as the total cost of𝑁𝑁×𝑀𝑀 P∗ as follows:
𝐷𝐷𝐷𝐷𝐷𝐷(𝑋𝑋, 𝑌𝑌) = 𝑐𝑐𝑃𝑃∗ (𝑋𝑋, 𝑌𝑌) = 𝑚𝑚𝑚𝑚𝑚𝑚{𝑐𝑐𝑃𝑃 (𝑋𝑋, 𝑌𝑌), 𝑝𝑝 ∈ 𝑃𝑃 }, (2)
n o
where 𝑃𝑃𝑁𝑁×𝑀𝑀 is the set DTW
of all (possible
X, Y ) = warping
c P∗ ( X, Y )paths.
= min c P ( X, Y ), p ∈ P N × M , (2)
2.3. Pattern
where PN×M Matching
is the setTrading System warping paths.
of all possible
This section describes the structure and characteristics of the pattern matching trading system
2.3. Pattern Matching Trading System
(PMTS) used in experiments for index futures trading. The experiments determine the entry and exit
of trading by matching
This section the the
describes daily index futures
structure time series data
and characteristics with
of the fixedmatching
pattern patterns using
trading thesystem
DTW
algorithm. Figure 2 shows an experimental procedure diagram of the pattern matching trading
(PMTS) used in experiments for index futures trading. The experiments determine the entry and exit
system.
of trading The
byfirst phase of
matching thethe procedure
daily is to collect
index futures the daily
time series dataindex
withfutures data and
fixed patterns to preprocess
using the DTW
them for outlier
algorithm. Figure 2processing, missing value
shows an experimental processing
procedure diagram and standardization
of the pattern matching of the datasystem.
trading from
KOSCOM’s Check Expert system. In the second phase, the fixed time series patterns and the collected
The first phase of the procedure is to collect the daily index futures data and to preprocess them for
index futures
outlier time missing
processing, series patterns are recognized
value processing to find similar of
and standardization patterns
the dataand then
from classified by
KOSCOM’s the
Check
dynamic time warping algorithm. The third phase is to improve the performance with training data
Expert system. In the second phase, the fixed time series patterns and the collected index futures time
for trading
series entry
patterns are and exit simulations
recognized withpatterns
to find similar variousandparameters and perform
then classified the verification
by the dynamic with
time warping
testing data.
Sustainability 2018, 10, 4641 5 of 18
algorithm. The third phase is to improve the performance with training data for trading entry and exit
simulations with10,various
Sustainability 2018, parameters
x FOR PEER REVIEW and perform the verification with testing data. 5 of 17
wheref (𝑓𝑓(𝑑𝑑),
where d), ∀∀𝑑𝑑
d ∈∈Daily
𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷f𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓
utures data 𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑
set𝑠𝑠𝑠𝑠𝑠𝑠 (dfid)
(dfid) is the
is the daily
daily indexindex futures
futures data.
data.
The processed data is divided into two groups:
The processed data is divided into two groups: the pattern recognition group the pattern recognition group that consists
that consists of data of
data 9:00
from fromam 9:00
to am
12:00 topm 12:00 and pm theand the trading
trading group that group that consists
consists of data
of data after 12:00after
pm.12:00 pm.isIfno
If there there
datais
atno9:00
data
amatdue9:00toam due to market
a delayed a delayed openingmarket opening
caused by a caused
market by a market
action action or
or regulation, theregulation,
missing data the
ismissing datathe
filled with is filled
closing with pricetheofclosing price ofdate.
the previous the previous date.
Phase2:2:Pattern
Phase Patternrecognition
recognitionand anddetermination
determinationof ofthe
thetrading
tradingposition
position
We construct two sets of fixed patterns using
We construct two sets of fixed patterns using two different time divisions.two different time divisions.
TheThetimetime
fromfrom
9:00 9:00
am
toam to 12:00
12:00 pm ispm is divided
divided into three
into three time zones
time zones (from (from
9 am to 9 am to 10
10 am, am,10
from from
am to 10 11
amamto and
11 amfromand11from
am
to1112ampm) toand
12 apm)totalandof 27 a fixed
total timeof 27series
fixedpatterns
time series
is setpatterns is setofup
up consisting allconsisting of all possible
possible combinations of
combinations of three steps (upward, stable and downward) in
three steps (upward, stable and downward) in each time zone. The 27 fixed patterns can be describedeach time zone. The 27 fixed patterns
bycan be described by
9 representative 9 representative
roughness patterns as roughness
a result of patterns as a the
eliminating result of eliminating
similarity in termsthe similarity in
of macroscopic
terms of macroscopic
viewpoints and endpoints. viewpoints
In addition,and endpoints.
the time from In addition,
9:00 am to the12:00
timepm from 9:00 am into
is divided to 12:00
two pm timeis
zones (or the first half from 9 am to 10:30 am and the second half from 10:30 am to 12:00 pm) to10:30
divided into two time zones (or the first half from 9 am to 10:30 am and the second half from set
upam9 to 12:00 pm) topatterns
representative set up 9consisting
representative of three patterns
steps andconsisting of three recommendation
then 4 industry steps and then 4 patterns
industry
recommendation patterns are added to have 13 representative patterns. Figure 3 and Figure 4 below
show the structure of 27 fixed patterns and 13 representative patterns, respectively.
Sustainability 2018, 10, 4641 6 of 18
are added to have 13 representative patterns. Figures 3 and 4 below show the structure of 27 fixed
Sustainability 2018, 10, x FOR PEER REVIEW 6 of 17
Sustainability
patterns and 13 10,
2018, x FOR PEER REVIEW
representative patterns, respectively. 6 of 17
Figure
Figure 4. Structures of
4. Structures of the
the representative
representative 13
13 patterns
patterns (rp-#
(rp-# as
as representative
representative pattern).
pattern).
Figure 4. Structures of the representative 13 patterns (rp-# as representative pattern).
The daily market data between 9:00 am and 12:00 pm from 01/02/2001 to 12/30/2015 are assigned
The daily market data between 9:00 am and 12:00 pm from 01/02/2001 to 12/30/2015 are assigned
to oneTheof daily market
the fixed data between
patterns that is the9:00most
am and 12:00topm
similar thefrom 01/02/2001
market data bytousing 12/30/2015 are assigned
the dynamic time
to one of the fixed patterns that is the most similar to the market data by using the dynamic time
to one ofmethod
warping the fixed and patterns
then the that is the most
frequency similar
of each to thepattern
selected marketisdata by using
counted. the step,
At this dynamic time
the fixed
warping method and then the frequency of each selected pattern is counted. At this step, the fixed
warpingwith
patterns method and frequency
a higher then the frequency of each criteria
than the filtering selectedare pattern is counted.
selected. For each At this step,
selected theof
pattern fixed
the
patterns with a higher frequency than the filtering criteria are selected. For each selected pattern of
patterns
daily withdata,
market a higher frequency
the price at 12:00thanpm theandfiltering
3:00 pm criteria
on a dayare selected.
included in For eachperiod
training selected pattern of
is compared.
the daily market data, the price at 12:00 pm and 3:00 pm on a day included in training period is
the daily
Then, “up”market data,tothe
is assigned theprice
patternat 12:00 pm and
if the price 3:00pm
at 3:00 pmis on a day
higher thanincluded in training
that at 12:00 pm andperiod
“down” is
compared. Then, “up” is assigned to the pattern if the price at 3:00 pm is higher than that at 12:00 pm
compared.
is assigned Then,
to the“up”
patternis assigned
if the priceto the pattern
at 3:00 pm ifisthe price
lower at 3:00
than thatpm is higher
at 12:00 pm. than
The thatratioatof12:00
“up”pm to
and “down” is assigned to the pattern if the price at 3:00 pm is lower than that at 12:00 pm. The ratio
and “down”
“down” is assigned
for each pattern is tocalculated
the patternand if the
used price at 3:00 pmthe
to determine is lower
trading than that atin12:00
position pm. The
the testing ratio
period.
of “up” to “down” for each pattern is calculated and used to determine the trading position in the
of “up”
Once to “down”
a pattern fromfor 9:00each
am pattern
to 12:00ispm calculated
is selected andforused
marketto determine
data on one thedaytrading
that isposition
included ininthe
a
testing period. Once a pattern from 9:00 am to 12:00 pm is selected for market data on one day that is
testing period,
testing period. the Once a pattern from
investment 9:00atam
strategy to 12:00
12:00 pm on pm is selected
that for marketas
day is determined data on one day that is
follows:
included in a testing period, the investment strategy at 12:00 pm on that day is determined as follows:
included in a testing period, the investment strategy at 12:00 pm on that day is determined as follows:
- Enter a long position at 12:00 pm and clear the position by taking a short position at 3:00 pm if
- Enter a long position at 12:00 pm and clear the position by taking a short position at 3:00 pm if
- Enter a long
the ratio position
of “up” at 12:00for
to “down” pmtheand clear the
selected position
pattern by taking
is higher than 1. a short position at 3:00 pm if
the ratio of “up” to “down” for the selected pattern is higher than 1.
-- the ratio of
Enter aa short “up” to
short position “down”
position at at 12:00 for
12:00 pm the
pm and selected
and clear pattern
clear the is
the position higher than 1.
Enter position by by taking
taking aa longlong position
position at at 3:00
3:00 pmpm ifif
- Enter
the a short
ratio of position
“up” to at 12:00
“down” forpm
the and clear pattern
selected the position
is by taking
lower than 1. a long position at 3:00 pm if
the ratio of “up” to “down” for the selected pattern is lower than 1.
the ratio of “up” to “down” for the selected pattern is lower than 1.
The
The margin
margin of of the
the futures
futures trading
trading is settled at
is settled at 12:00
12:00 pm
pm when
when the
the volatility
volatility andand liquidity
liquidity increase.
increase.
The margin
Therefore, of the futures trading isposition.
settled atFor12:00 pm when the the
volatility andtimeliquidity increase.
Therefore, it is a critical time to enter a position. For intraday trades, the clearing time can be used
it is a critical time to enter a intraday trades, clearing can be used atat
Therefore,
various it
points is a
in critical
time andtimeis to
not enter a
limited position.
at 3:00 For
pm. intraday trades, the clearing time can be used at
various points in time and is not limited at 3:00 pm.
various
Phase pointsPMTSin time and is not limited at 3:00 pm.
Phase 3: 3: PMTS simulation
simulation
Phase
In 3: PMTS simulation
In the last phase,
the last phase, we we performed
performed PMTS PMTS simulation
simulation by by applying
applying trading
trading rule rule created
created in in Phase
Phase 2. 2.
FigureIn the last phase, we performed PMTS simulation by applying trading rule created in Phase 2.
Figure 55 shows
shows the the workflow
workflow of of PMTS
PMTS simulation.
simulation.
Figure 5 shows the workflow of PMTS simulation.
Sustainability 2018, 10, x FOR PEER REVIEW 7 of 17
Sustainability 2018, 10, 4641 7 of 18
Sustainability 2018, 10, x FOR PEER REVIEW 7 of 17
Figure5.5.Workflow
Workflow ofthe
thePMTS.
PMTS.
Figure 5. Workflow of
Figure of PMTS.
As
As As shown
shown inin
shown inthis
this this figure,
we we
figure,
figure, firstfirst
we first set sample
set
set the the sample
the sample
period period
period
using using
using a asliding
a sliding sliding window
window
window method method
method andand
and divide
divide
divide
each each
windoweachwindow
window
into into
into training
training training
and and testing periods.
andperiods.
testing testing periods.
We useWe Weuse
the usethe
daily the daily
daily
index index
index
futures futures
futures
data data
atdata at
10every
at every
every min
10
from min
10 min from
9:00 from 9:00
am to9:00 am
12:00am pmto 12:00
to 12:00 pm for pattern
pm for pattern
for pattern matching matching
matching
to the to to the representative
the representative
representative patterns
patterns
patterns constructed
constructed
constructed by by by
data
data
at everyat every
data atminute minute
every minute
from 9:00 from
fromam 9:00
9:00 am
toam to 12:00
to 12:00
12:00 pm. pm. pm.
Then, Then,
Then,
using using
using the
the the
DTW DTW
DTW algorithm
algorithm
algorithm with various
withvarious
with variousranges ranges
ranges of
ofof
parameters,
parameters,
parameters, weweconduct
we conduct conduct pattern
pattern
pattern matching
matching
matching todaily
to
to daily daily
index index
index futures
futures
futures data data
data
andand and determine
determine
determine thethe the entry
entry
entry and
and and
exit
exit
exitposition
position for
for the
the testing
testing period.
period. This
This process
process is
is repeated
repeated for
for allall
position for the testing period. This process is repeated for all windows for the selected parameters. windows
windows forforthethe selected
selected
parameters.
As a last step, As
parameters. Asaanalyze
we alast
laststep, thewe
step, we analyze
analyze
trading theand
the
profit trading
trading profitand
profit
determine andoptimal
the determine
determine the
the optimal
optimal
parameters parameters
forparameters
PMTS. for for
Figure 6
PMTS.
PMTS. Figure
Figure6 6shows
shows the
the structure
structure
shows the structure of the sliding windows. of the
the sliding
sliding windows.
windows.
Table 1. Training and testing data set of 54 windows for the trading simulation.
Period (mm/yyyy~mm/yyyy)
Training (18 Months) Testing (3 Months) Training (18 Months) Testing (3 Months)
Window 1 01/2001~06/2002 07/2002~09/2002 Window 28 10/2007~03/2009 04/2009~06/2009
Window 2 04/2001~09/2002 10/2002~12/2002 Window 29 01/2008~06/2009 07/2009~09/2009
Window 3 07/2001~12/2002 01/2003~03/2003 Window 30 04/2008~09/2009 10/2009~12/2009
Window 4 10/2001~03/2003 04/2003~06/2003 Window 31 07/2008~12/2009 01/2010~03/2010
Window 5 01/2002~06/2003 07/2003~09/2003 Window 32 10/2008~03/2010 04/2010~06/2010
Window 6 04/2002~09/2003 10/2003~12/2003 Window 33 01/2009~06/2010 07/2010~09/2010
Window 7 07/2002~12/2003 01/2004~03/2004 Window 34 04/2009~09/2010 10/2010~12/2010
Window 8 10/2002~03/2004 04/2004~06/2004 Window 35 07/2009~12/2010 01/2011~03/2011
Window 9 01/2003~06/2004 07/2004~09/2004 Window 36 10/2009~03/2011 04/2011~06/2011
Window 10 04/2003~09/2004 10/2004~12/2004 Window 37 01/2010~06/2011 07/2011~09/2011
Window 11 07/2003~12/2004 01/2005~03/2005 Window 38 04/2010~09/2011 10/2011~12/2011
Window 12 10/2003~03/2005 04/2005~06/2005 Window 39 07/2010~12/2011 01/2012~03/2012
Window 13 01/2004~06/2005 07/2005~09/2005 Window 40 10/2010~03/2012 04/2012~06/2012
Window 14 04/2004~09/2005 10/2005~12/2005 Window 41 01/2011~06/2012 07/2012~09/2012
Window 15 07/2004~12/2005 01/2006~03/2006 Window 42 04/2011~09/2012 10/2012~12/2012
Window 16 10/2004~03/2006 04/2006~06/2006 Window 43 07/2011~12/2012 01/2013~03/2013
Window 17 01/2005~06/2006 07/2006~09/2006 Window 44 10/2011~03/2013 04/2013~06/2013
Window 18 04/2005~09/2006 10/2006~12/2006 Window 45 01/2012~06/2013 07/2013~09/2013
Window 19 07/2005~12/2006 01/2007~03/2007 Window 46 04/2012~09/2013 10/2013~12/2013
Window 20 10/2005~03/2007 04/2007~06/2007 Window 47 07/2012~12/2013 01/2014~03/2014
Window 21 01/2006~06/2007 07/2007~09/2007 Window 48 10/2012~03/2014 04/2014~06/2014
Window 22 04/2006~09/2007 10/2007~12/2007 Window 49 01/2013~06/2014 07/2014~09/2014
Window 23 07/2006~12/2007 01/2008~03/2008 Window 50 04/2013~09/2014 10/2014~12/2014
Window 24 10/2006~03/2008 04/2008~06/2008 Window 51 07/2013~12/2014 01/2015~03/2015
Window 25 01/2007~06/2008 07/2008~09/2008 Window 52 10/2013~03/2015 04/2015~06/2015
Window 26 04/2007~09/2008 10/2008~12/2008 Window 53 01/2014~06/2015 07/2015~09/2015
Window 27 07/2007~12/2008 01/2009~03/2009 Window 54 04/2014~09/2015 10/2015~12/2015
As a result of the PMTS execution for each window, a revenue profile for each pattern from
2:00 pm to 3:00 pm is generated. Our experiment uses a total of 7 clearing times at 10-min intervals
from 14:00 to 15:00 to find the optimal clearing time.
3. Results
Table 2. Number of windows produced by the training and testing period between 2001 and 2015.
Training Period
Month 12 18 24 36
1 168 162 156 144
Testing Period 2 84 81 78 72
3 56 54 52 48
Sustainability 2018, 10, 4641 9 of 18
Sustainability 2018, 10, x FOR PEER REVIEW 9 of 17
3.2. Pattern
3.2. Pattern Matching
Matching by
by the
the Dynamic
Dynamic Time
Time Warping
Warping Algorithm
Algorithm
AA self-developed
self-developed program
program was was used
used forfor the
the analysis
analysis inin Phase
Phase 22 with
with daily
daily 10-min
10-min time
time series
series
data. For
data. For pattern
pattern matching
matching of of daily
daily market
market datadata by
by the
the dynamic
dynamic timetime warping
warping algorithm,
algorithm, twotwo sets
sets of
of
27 fixed
27 fixed patterns
patternsand
and13 13fixed
fixedpatterns
patternsareare used
used as as input
input data.
data. TheThe daily
daily market
market datadata between
between 9:009:00
am
am and
and 12:0012:00 pm assigned
pm are are assigned to one
to one of fixed
of the the fixed patterns
patterns that that
is theismost
the most similar
similar to thetomarket
the market
data data
and
and then
then the frequency
the frequency of eachof selected
each selected
pattern pattern is counted.
is counted. For market
For market data included
data included in the training
in the training period,
period,
the pricethe
at price
12:00 at
pm 12:00 pm is compared
is compared with thewith theofprice
price of 10-min
10-min intervals intervals
betweenbetween 14:00
14:00 and and 15:00.
15:00. Then,
Then,
the the trading
trading position
position is determined
is determined by the byrulethe rule explained
explained in Phase in 2Phase 2 in Section
in Section 2.3. 2.3.
3.3. Trading
3.3. Trading Simulation
Simulation
We conduct
We conduct the
the trading
trading simulation
simulation with
with various
various parameters.
parameters. Figure
Figure 77 shows
shows the
the PMTS
PMTS user
user
interface, which displays the selected parameters for the trading simulation.
interface, which displays the selected parameters for the trading simulation.
Figure 7.
Figure 7. PMTS
PMTS user
user interface.
interface.
The PMTS
The PMTS isisoperated
operatedusing
usingthe
thetwo
twoinput
inputfiles
filesand
andsixsix parameters.
parameters. The
The two
two input
input files
files consist
consist of
aoffixed
a fixed pattern file and a time series data file. The six input parameters used in our experiment are
pattern file and a time series data file. The six input parameters used in our experiment are
as follows:
as follows:
1.
1. The
The training
training period
period for
for pattern
pattern matching:
matching: 3, 3, 6,
6, 9,
9, 12,
12, 18,
18, 24,
24, 36,
36, 48
48 and
and 60
60 months
months are
are used.
used.
2.
2. Testing period for trading: 1, 2 and 3 months are
Testing period for trading: 1, 2 and 3 months are used. used.
3.
3. Filtering criteria: aavalue
Filtering criteria: valuetoto exclude
exclude patterns
patterns if frequency
if the the frequency of a pattern
of a pattern assigned
assigned to dailytomarket
daily
market data is below this value. Seven values of 5, 10, 15, 20, 25, 30
data is below this value. Seven values of 5, 10, 15, 20, 25, 30 and 40 are used. and 40 are used.
4. Stop-loss
4. ratio:the
Stop-loss ratio: therate
rate
of of
lossloss for clearing
for the the clearing
position position
when thewhen the
price priceagainst
moves movesthe against the
predicted
predicted
direction. direction.
0.5% is used.0.5% is used.
5. U/D frequency: the proportion of “up” movements in the training period to determine the
5. U/D frequency: the proportion of “up” movements in the training period to determine the
trading position. Six values of 50%, 60%, 65%, 70%, 75% and 80% are used.
trading position. Six values of 50%, 60%, 65%, 70%, 75% and 80% are used.
6. Slippage cost: the level of slippage cost, where 0.02 pt is used.
6. Slippage cost: the level of slippage cost, where 0.02 pt is used.
Table 3 shows the frequency of 13 representative patterns selected in each window with 18-
Table 3 shows the frequency of 13 representative patterns selected in each window with 18-month
month training and 3-month testing periods.
training and 3-month testing periods.
Sustainability 2018, 10, 4641 10 of 18
For example, testing is performed with patterns of rp-1, 2, 9, 10 and 13 in Window1 when the
filtering criterion is 20 ea. With the U/D frequency of 50%, the “up” or “down” position determined
and the frequency of “up” and “down” for this Window1 are reported in Table 4.
Table 4. Up or down position determined and the frequency of up and down for Window1 with
18-month training and 3-month testing periods and 50% U/D frequency.
Clearing Time
14:00 14:10 14:20 14:30 14:40 14:50 15:00
U 25 22 22 23 21 26 28
rp-1 D 19 22 22 21 23 18 16
UD U U U U D U U
U 26 28 25 26 28 29 28
rp-2 D 35 33 36 35 33 32 33
UD D D D D D D D
U 38 40 40 39 41 39 42
rp-9 D 40 38 38 39 37 39 35
UD D U U U U U U
U 39 47 39 38 36 36 32
rp-10 D 34 26 34 35 37 37 41
UD U U U U D D D
U 10 9 9 10 10 11 8
rp-13 D 19 20 20 19 19 18 20
UD D D D D D D D
For example, the frequency of “up” for rp-1 at 14:00 is 25 and that of “down” is 19, so the position
is determined as “U” because the proportion of “up” is lower than 50%. However, as shown in Table 5,
when the 65% U/D frequency is used, it is classified as M (middle) rather than U or D because the
proportion of up (57%) was not higher than 65% and was not lower than 35%, that is, it is between 35%
and 65%. In the case of where M is determined, no position is taken for testing.
Table 5. Up or down position determined and the frequency of up and down for Window1 with
18-month training and 3-month testing periods and 65% U/D frequency.
Clearing Time
14:00 14:10 14:20 14:30 14:40 14:50 15:00
U 25 22 22 23 21 26 28
rp-1 D 19 22 22 21 23 18 16
UD M M M M M M M
U 26 28 25 26 28 29 28
rp-2 D 35 33 36 35 33 32 33
UD M M M M M M M
U 38 40 40 39 41 39 42
rp-9 D 40 38 38 39 37 39 35
UD M M M M M M M
U 39 47 39 38 36 36 32
rp-10 D 34 26 34 35 37 37 41
UD M M M M M M M
U 10 9 9 10 10 11 8
rp-13 D 19 20 20 19 19 18 20
UD D D D D D M D
Sustainability 2018, 10, 4641 12 of 18
To find the optimal parameters, we compare the Sharpe ratio produced by various ranges of
parameters when the trading position is cleared at every 10 min from 14:00 to 15:00. Table 6 shows the
annual return, standard deviation and Sharpe ratio of the market data clearing at 15:00 that is assigned
to 13 fixed patterns with a 0.02 pt slippage cost, a 0.5% stop-loss ratio, a 20 ea filter criteria, 65% U/D
frequency and a combination of training periods (12, 18, 24 and 36 months) and testing periods (1, 2
and 3 months). Table 7 shows the annual return, standard deviation and Sharpe ratio of the market
data clearing at 15:00 that is assigned to 13 fixed patterns with a 0.02 pt slippage cost, a 0.5% stop-loss
ratio, an 18-month training period, a 3-month testing period and a combination of filtering criteria
(5, 10, 15 and 20 ea) and U/D frequencies (65%, 70%, 75% and 80%). Taking the results in Tables 6
and 7 together, the set of parameters that consists of a 0.02 pt slippage cost, a 0.5% stop-loss ratio,
an 18-month training period, a 3-month testing period, 20 ea filtering criteria and 65% U/D frequency
were determined to have the highest Sharpe ratio of 0.94.
Table 6. Performance achieved from an experiment using 13 patterns with various combinations of
training and testing periods.
Table 7. Performance achieved from an experiment using 13 patterns with various combinations of
filtering criteria and up/down frequencies.
(Filtering Criteria, Up/Down Frequency (%))
Performance
(5,65) (5,70) (5,75) (5,80) (10,65) (10,70) (10,75) (10,80) (15,65) (15,70) (15,75) (15,80) (20,65) (20,70) (20,75) (20,80)
Annualized return 18.83 1.30 0.63 0.69 18.27 0.91 0.12 0.32 19.17 0.69 0.06 0.09 19.17 0.25 −0.03 0.00
StDev 18.63 4.59 2.64 2.26 19.18 4.37 1.87 1.67 19.53 3.63 0.70 0.65 18.83 3.29 0.23 0.00
Sharpe ratio 0.93 −0.04 −0.33 −0.36 0.87 −0.14 −0.74 −0.71 0.90 −0.22 −2.07 −2.16 0.94 −0.38 −6.53 0.00
Slippage Cost: 0.02 pt, Stop loss: 0.5%, Training period: 18, Testing period: 3, 15:00 exit.
We conduct the same experiments using 27 fixed patterns as in the case of using 13 fixed patterns.
Table 8 shows the annual return, standard deviation and Sharpe ratio of the market data clearing at
15:00 that is assigned to 27 fixed patterns with a 0.02 pt slippage cost, a 0.5% stop-loss ratio, 10 ea filter
criteria, 65% U/D frequency and a combination of training periods (12, 18, 24 and 36 months) and
testing periods (1, 2 and 3 months). Table 9 shows the annual return, standard deviation and Sharpe
ratio of the market data clearing at 15:00 that is assigned to 27 fixed patterns with a 0.02 pt slippage
Sustainability 2018, 10, 4641 13 of 18
cost, a 0.5% stop-loss ratio, a 24-month training period, a 3-month testing period and a combination
of filtering criteria (5, 10, 15 and 20 ea) and U/D frequencies (65%, 70%, 75% and 80%). Taking the
results in Tables 8 and 9 together, a set of parameters that consists of a 0.02 pt slippage cost, a 0.5%
stop-loss ratio, a 24-month training period, a 3-month testing period, 10 ea filtering criteria and 65%
U/D frequency is determined to have the highest Sharpe ratio of 0.76.
Table 8. Performance achieved from an experiment using 27 patterns with various combinations of
training and testing periods.
Table 9. Performance achieved from an experiment using 27 patterns with various combinations of
filtering criteria and up/down frequencies.
(Filtering Criteria, Up/Down Frequency (%))
Performance
(5,65) (5,70) (5,75) (5,80) (10,65) (10,70) (10,75) (10,80) (15,65) (15,70) (15,75) (15,80) (20,65) (20,70) (20,75) (20,80)
Annualized return 18.54 1.26 0.25 0.09 18.66 1.09 0.01 −0.11 17.80 0.99 −0.01 0.00 18.25 1.20 −0.03 0.00
StDev 21.78 4.92 2.59 2.04 22.68 4.10 1.70 0.90 22.51 3.67 1.07 0.00 22.91 3.88 1.01 0.00
Sharpe ratio 0.78 −0.05 −0.48 −0.69 0.76 −0.10 −0.88 −1.79 0.72 −0.14 −1.42 0.00 0.73 −0.08 −1.52 0.00
Slippage Cost: 0.02 pt, Stop loss: 0.5%, Training period: 24, Testing period: 3, 15:00 exit.
We obtained experimental results from all possible combinations of parameters at every 10 min
from 14:00 to 15:00. Tables 10 and 11 report the annual return, standard deviation and Sharpe ratio
of the market data clearing at every 10 min from 14:00 to 15:00 with the selected parameters for
using 13 and 27 fixed patterns, respectively. We conduct the t-test for annualized return and report
p-values in parenthesis in Tables 10 and 11. All returns reported in Tables 10 and 11 are found to be
statistically significant.
Table 10. Performance achieved from an experiment using 13 patterns of clearing at every 10 min from
14:00 to 15:00.
Trading Exit Time 14:00 14:10 14:20 14:30 14:40 14:50 15:00 Avg.
7.24 11.42 13.07 13.80 17.65 18.05 19.17
Annualized return 14.34
(0.0153) (0.0002) (0.0000) (0.0000) (0.0000) (0.0000) (0.0000)
StDev 21.05 20.41 18.78 21.33 23.15 24.61 18.83 21.17
Sharpe Ratio 0.27 0.49 0.62 0.58 0.70 0.67 0.94 0.61
Slippage Cost: 0.02 pt, Stop loss: 0.5%, Training period: 18, Testing period: 3, Filter Criteria: 20, U/D Frequency: 65%.
Table 11. Performance achieved from an experiment using 27 patterns of clearing at every 10 min from
14:00 to 15:00.
Trading Exit Time 14:00 14:10 14:20 14:30 14:40 14:50 15:00 Avg.
7.25 10.93 12.72 13.39 15.52 17.64 18.66
Annualized return 13.73
(0.0098) (0.0004) (0.0002) (0.0000) (0.0000) (0.0000) (0.0000)
StDev 19.31 20.40 22.88 19.18 22.13 23.40 22.68 21.43
Sharpe Ratio 0.30 0.46 0.49 0.62 0.63 0.69 0.76 0.56
Slippage Cost: 0.02 pt, Stop loss: 0.5%, Training period: 24, Testing period: 3, Filter Criteria: 10, U/D Frequency: 65%.
Sharpe Ratio 0.30 0.46 0.49 0.62 0.63 0.69 0.76 0.56
Slippage Cost: 0.02 pt, Stop loss: 0.5%, Training period: 24, Testing period: 3, Filter Criteria: 10, U/D
Frequency: 65%.
As shown
Sustainability in 4641
2018, 10, Tables 6–9, the performance of the market data clearing at 15:00 is found to 14 beofthe
18
best. We also compare the performance of the market data in the experiments using 13 and 27 fixed
patterns. The average
As shown values
in Tables 6–9, of
thethe annual return,
performance standard
of the marketdeviation and Sharpe
data clearing at 15:00ratio of thetomarket
is found be the
data clearing at every 10 min from 14:00 to 15:00 are reported in the last
best. We also compare the performance of the market data in the experiments using 13 and column in Tables 1027
and 11.
fixed
The average
patterns. TheSharpe
averageratio
valuesforofthetheexperiments
annual return, using 13 fixed
standard patternsand
deviation (0.61) is higher
Sharpe ratio ofthan
the that for
market
experiments using 27 fixed patterns (0.56). We also find that the best performance
data clearing at every 10 min from 14:00 to 15:00 are reported in the last column in Tables 10 and 11. with Sharpe ratio
of 0.94
The is produced
average Sharpeby the for
ratio experiment using 13using
the experiments fixed 13patterns and clearing
fixed patterns (0.61)atis15:00.
higher In than
addition,
that we
for
calculate the average of total profit obtained when the optimal parameters are
experiments using 27 fixed patterns (0.56). We also find that the best performance with Sharpe ratio used in an experiment
using
of 0.9413is and 27 patterns
produced by the ofexperiment
clearing at every
using 1013 min
fixedfrom 14:00and
patterns to 15:00 and conduct
clearing at 15:00. the t-test for the
In addition, we
average of total profit. Table 12 shows the average of the total profit points with
calculate the average of total profit obtained when the optimal parameters are used in an experiment the corresponding
p-value
using 13in parentheses
and 27 patternsinofan experiment
clearing using
at every 13 and
10 min from2714:00
patterns of clearing
to 15:00 at every
and conduct the 10 minfor
t-test from
the
14:00 to 15:00 with the selected parameters. All returns reported in Table
average of total profit. Table 12 shows the average of the total profit points with the corresponding 12 are found to be
statistically
p-value significant. As
in parentheses shown
in an in Tableusing
experiment 12, the13average
and 27total profitofisclearing
patterns the highest (9.58 pt)
at every when
10 min the
from
experiment uses 13 fixed patterns and clears at 15:00.
14:00 to 15:00 with the selected parameters. All returns reported in Table 12 are found to be statistically
significant. As shown in Table 12, the average total profit is the highest (9.58 pt) when the experiment
Table 12. Average of total profit in an experiment using 13 and 27 patterns of clearing at every 10 min
uses 13 fixed patterns and clears at 15:00.
from 14:00 to 15:00.
Avg. of Total
Table 12. Average of total profit in an experiment using 13 and 27 patterns of clearing at every 10 min
14:00 14:10 14:20 14:30 14:40 14:50 15:00 avg.
Profit (pt) to 15:00.
from 14:00
3.62 5.71 6.53 6.90 8.83 9.02 9.58
13 Avg.
pattern
of Total
1
14:00 14:10 14:20 14:30 14:40 14:50 15:00 Avg. 7.17
Profit (pt) (0.0153) (0.0002) (0.0000) (0.0000) (0.0000) (0.0000) (0.0000)
3.63
3.62 5.46
5.71 6.536.36 6.90 6.69 8.83 7.76 9.02 8.82 9.58 9.33
27 pattern
13 pattern2 1 7.17 6.87
(0.0098)
(0.0153) (0.0004)
(0.0002) (0.0002)
(0.0000) (0.0000)(0.0000)
(0.0000) (0.0000)(0.0000)
(0.0000)
(0.0000)(0.0000)
Figure
Figure 8.
8. Average
Average return
return from the experiment
from the experiment with
with 27
27 patterns
patterns by
by clearing
clearing time.
time.
Sustainability 2018, 10, 4641 15 of 18
Sustainability 2018, 10, x FOR PEER REVIEW 15 of 17
Figure
Figure 9.
9. Average
Average return
return from
from the
the experiment with 13
experiment with 13 patterns
patterns by
by clearing
clearing time.
time.
4.
4. Discussion
Discussion
The
The purpose
purpose of of this
this study
study isis to develop aa pattern
to develop pattern matching
matching trading
trading system
system using
using thethe DTW
DTW
algorithm
algorithm withwithoptimal
optimalparameters.
parameters.Using KOSPI
Using KOSPI200200
index futures
index market
futures data data
market from from
2001 to 2015,
2001 to
we conduct experiments with various ranges of parameters and find optimal parameters. Our
2015, we conduct experiments with various ranges of parameters and find optimal parameters.
experimental
Our experimental results show show
results that the PMTS
that based on
the PMTS the DTW
based on thealgorithm providesprovides
DTW algorithm stable and effective
stable and
trading
effectivestrategies with relatively
trading strategies low trading
with relatively frequencies.
low trading When financial
frequencies. marketmarket
When financial investors make
investors
more efficient investment strategies with the PMTS, the financial markets are more likely to
make more efficient investment strategies with the PMTS, the financial markets are more likely to be
be
efficient.
efficient. In
In this
this sense,
sense, the
the system
system developed
developed in in this
this paper
paper contributes
contributes the the efficiency
efficiency ofof the financial
the financial
markets and helps to achieve sustained economic growth.
markets and helps to achieve sustained economic growth.
A
A future study can
future study can be
beenriched
enrichedby bythe
thestudies
studiespresented
presentedininthisthispaper.
paper.
AnAn interesting
interesting extension
extension to
to
thethe current
current studystudy
wouldwould include
include empirical
empirical studiesstudies
usingusing
a morea sophisticated
more sophisticated DWP algorithm,
DWP algorithm, such as
such as the deepening dynamic time warping (DDTW) algorithm or the segmented dynamic time
the deepening dynamic time warping (DDTW) algorithm or the segmented dynamic time warping
warping (SDTW) algorithm
(SDTW) algorithm or the
or the cluster cluster generative
generative statisticaltime
statistical dynamic dynamic time(CSDTW)
warping warping algorithm,
(CSDTW)
algorithm, from which better results are expected. This study could also be extended by experiments
from which better results are expected. This study could also be extended by experiments with various
with various financial instruments such as interest rate futures contracts, options and other
financial instruments such as interest rate futures contracts, options and other derivatives to find the
derivatives to find the optimal strategy.
optimal strategy.
References
References
1.
1. Birău,
Birău, F.R. FinancialDerivatives-Meanings
F.R. Financial Derivatives-Meaningsbeyond beyondSubprime
SubprimeCrisisCrisisStigma. Analele
Stigma.Analele Universităţii
Univ. Constantin
Constantin Brâncuşi
Brâncuşi din Târgu Jiu: Seria Economie 2010, 2, 195–199.
din Târgu Jiu: Ser. Econ. 2010, 2, 195–199.
2.
2. Carmassi,
Carmassi, J.;J.; Gros,
Gros, D.;
D.; Micossi,
Micossi, S.S. The
Theglobal
globalfinancial
financialcrisis:
crisis:Causes
Causesand cures.JCMS
andcures. JCMSJ.J.Common
CommonMarket
Mark. Stud.
Stud.
2009, 47, 977–996.
2009, 47, 977–996. [CrossRef]
3.
3. Crotty, J. Structural
Crotty, J. Structural causes of the
causes of global financial
the global crisis: Acrisis:
financial critical
Aassessment of the ‘newoffinancial
critical assessment the ‘newarchitecture’.
financial
Camb. J. Econ. 2009, 33, 563–580. [CrossRef]
architecture’. Camb. J. Econ. 2009, 33, 563–580.
4.
4. Ghysels, E.;
Ghysels, E.; Seon,
Seon, J.
J. The
The Asian
Asian financial
financial crisis:
crisis: The
The role
role of
of derivative
derivative securities
securities trading
trading and
and foreign
foreign investors
investors
Korea. J.J. Int.
in Korea.
in Int. Money
Money Finance
Financ. 2005, 24, 607–630.
2005, 24, 607–630. [CrossRef]
5.
5. Caillault, É.P.; Lefebvre, A.; Bigand, A. Dynamic
Caillault, É.P.; Lefebvre, A.; Bigand, A. Dynamic time time warping-based
warping-based imputation
imputation forfor univariate
univariate time
time series
series
data. Pattern Recognit. Lett. 2017, in
data. Pattern Recognit. Lett. 2017, in press. press.
6.
6. Kwon, D.;
Kwon, D.; Lee,
Lee,T.T.Hedging
Hedgingeffectiveness
effectivenessofofKOSPI200
KOSPI200indexindexfutures
futuresthrough
through VECM-CC-GARCH
VECM-CC-GARCH model.
model. J.
J. Korean Data Inf. Sci. Soc. 2014, 25, 1449–1466.
Korean Data Inf. Sci. Soc. 2014, 25, 1449–1466.
7. Keogh, E.J.; Pazzani, M.J. Scaling up dynamic time warping to massive datasets. In European Conference on
Principles of Data Mining and Knowledge Discovery; Springer: Berlin/Heidelberg, Germany, 1999; pp. 1–11
Sustainability 2018, 10, 4641 16 of 18
7. Keogh, E.J.; Pazzani, M.J. Scaling up dynamic time warping to massive datasets. In European Conference on
Principles of Data Mining and Knowledge Discovery; Springer: Berlin/Heidelberg, Germany, 1999; pp. 1–11.
8. Agrawal, R.; Faloutsos, C.; Swami, A. Efficient similarity search in sequence databases. In International
Conference on Foundations of Data Organization and Algorithms; Springer: Berlin/Heidelberg, Germany, 1993;
pp. 69–84.
9. Das, G.; Gunopulos, D.; Mannila, H. Finding similar time series. In European Symposium on Principles of Data
Mining and Knowledge Discovery; Springer: Berlin/Heidelberg, Germany, 1997; pp. 88–100.
10. Fu, T.C.; Chung, F.L.; Luk, R.; Ng, C.M. Stock time series pattern matching: Template-based vs. rule-based
approaches. Eng. Appl. Artif. Intell. 2007, 20, 347–364. [CrossRef]
11. Bagheri, A.; Peyhani, H.M.; Akbari, M. Financial forecasting using ANFIS networks with quantum-behaved
particle swarm optimization. Expert Syst. Appl. 2014, 41, 6235–6250. [CrossRef]
12. Deboeck, G. Trading on the Edge: Neural, Genetic, and Fuzzy Systems for Chaotic Financial Markets; John Wiley &
Sons: Hoboken, NJ, USA, 1994; Volume 39.
13. Leigh, W.; Modani, N.; Hightower, R. A computational implementation of stock charting: Abrupt volume
increase as signal for movement in New York stock exchange composite index. Decis. Support Syst. 2004, 37,
515–530. [CrossRef]
14. Leigh, W.; Modani, N.; Purvis, R.; Roberts, T. Stock market trading rule discovery using technical charting
heuristics. Expert Syst. Appl. 2002, 23, 155–159. [CrossRef]
15. Leigh, W.; Purvis, R.; Ragusa, J.M. Forecasting the NYSE composite index with technical analysis, pattern
recognizer, neural network, and genetic algorithm: A case study in romantic decision support. Decis. Support
Syst. 2002, 32, 361–377. [CrossRef]
16. Lo, A.W.; Mamaysky, H.; Wang, J. Foundations of technical analysis: Computational algorithms, statistical
inference, and empirical implementation. J. Financ. 2000, 55, 1705–1765. [CrossRef]
17. Cervelló-Royo, R.; Guijarro, F.; Michniuk, K. Stock market trading rule based on pattern recognition and
technical analysis: Forecasting the DJIA index with intraday data. Expert Syst. Appl. 2015, 42, 5963–5975.
[CrossRef]
18. Chen, T.L.; Chen, F.Y. An intelligent pattern recognition model for supporting investment decisions in stock
market. Inf. Sci. 2016, 346, 261–274. [CrossRef]
19. Chung, F.L.; Fu, T.C.; Ng, V.; Luk, R.W. An evolutionary approach to pattern-based time series segmentation.
IEEE Trans. Evol. Comput. 2004, 8, 471–489. [CrossRef]
20. Dong, M.; Zhou, X.S. Exploring the fuzzy nature of technical patterns of US stock market. Proc. Fuzzy Syst.
Knowl. Discov. 2002, 1, 324–328.
21. Kim, S.D.; Lee, J.W.; Lee, J.; Chae, J. A two-phase stock trading system using distributional differences.
In International Conference on Database and Expert Systems Applications; Springer: Berlin/Heidelberg, Germany,
2002; pp. 143–152.
22. Hu, Y.; Feng, B.; Zhang, X.; Ngai, E.W.T.; Liu, M. Stock trading rule discovery with an evolutionary trend
following model. Expert Syst. Appl. 2015, 42, 212–222. [CrossRef]
23. De Oliveira, F.A.; Nobre, C.N.; Zárate, L.E. Applying Artificial Neural Networks to prediction of stock price
and improvement of the directional prediction index–Case study of PETR4, Petrobras, Brazil. Expert Syst.
Appl. 2013, 40, 7596–7606. [CrossRef]
24. Patel, J.; Shah, S.; Thakkar, P.; Kotecha, K. Predicting stock and stock price index movement using trend
deterministic data preparation and machine learning techniques. Expert Syst. Appl. 2015, 42, 259–268.
[CrossRef]
25. Kahveci, T.; Singh, A.; Gurel, A. Similarity searching for multi-attribute sequences. In Proceedings of the
14th International Conference on Scientific and Statistical Database Management, Edinburgh, UK, 24–26 July
2002; pp. 175–184.
26. Berndt, D.J.; Clifford, J. Using dynamic time warping to find patterns in time series. KDD Workshop 1994, 10,
359–370.
27. Senin, P. Dynamic Time Warping Algorithm Review; Information and Computer Science Department University
of Hawaii at Manoa Honolulu: Honolulu, HI, USA, 2008; pp. 1–23.
Sustainability 2018, 10, 4641 17 of 18
28. Lee, S.J.; Ahn, J.J.; Oh, K.J.; Kim, T.Y. Using rough set to support investment strategies of real-time trading in
futures market. Appl. Intell. 2010, 32, 364–377. [CrossRef]
29. Lee, S.J.; Oh, K.J.; Kim, T.Y. How many reference patterns can improve profitability for real-time trading in
futures market? Expert Syst. Appl. 2012, 39, 7458–7470. [CrossRef]
30. Tsinaslanidis, P.E. Subsequence dynamic time warping for charting: Bullish and bearish class predictions for
NYSE stocks. Expert Syst. Appl. 2018, 94, 193–204. [CrossRef]
31. Chang, E.C. Returns to speculators and the theory of normal backwardation. J. Financ. 1985, 40, 193–208.
[CrossRef]
32. Hartzmark, M.L. Returns to individual traders of futures: Aggregate results. J. Polit. Econ. 1987, 95,
1292–1306. [CrossRef]
33. Hartzmark, M.L. Luck versus forecast ability: Determinants of trader performance in futures markets. J. Bus.
1991, 64, 49–74. [CrossRef]
34. Leuthold, R.M.; Garcia, P.; Lu, R. The returns and forecasting ability of large traders in the frozen pork bellies
futures market. J. Bus. 1994, 67, 459–473. [CrossRef]
35. Wang, C. Investor sentiment and return predictability in agricultural futures markets. J. Futures Mark. Futures
Opt. Other Deriv. Prod. 2001, 21, 929–952. [CrossRef]
36. Bellman, R.; Kalaba, R. On adaptive control processes. IRE Trans. Autom. Control 1959, 4, 1–9. [CrossRef]
37. Myers, C.; Rabiner, L.; Rosenberg, A. Performance tradeoffs in dynamic time warping algorithms for isolated
word recognition. IEEE Trans. Acoust. Speech Signal Process. 1980, 28, 623–635. [CrossRef]
38. Sakoe, H.; Chiba, S. Dynamic programming algorithm optimization for spoken word recognition. IEEE Trans.
Acoust. Speech Signal Process. 1978, 26, 43–49. [CrossRef]
39. Kuzmanic, A.; Zanchi, V. Hand shape classification using DTW and LCSS as similarity measures for
vision-based gesture recognition system. In Proceedings of the International Conference on “Computer as a
Tool”, Warsaw, Poland, 9–12 September 2007; pp. 264–269.
40. Corradini, A. Dynamic time warping for off-line recognition of a small gesture vocabulary. In Proceedings
of the Recognition, Analysis, and Tracking of Faces and Gestures in Real-Time Systems, Vancouver, BC,
Canada, 13 July 2001; pp. 82–89.
41. Niennattrakul, V.; Ratanamahatana, C.A. On clustering multimedia time series data using k-means and
dynamic time warping. In Proceedings of the 2007 International Conference on Multimedia and Ubiquitous
Engineering (MUE’07), Seoul, Korea, 26–28 April 2007; pp. 733–738.
42. Bahlmann, C.; Burkhardt, H. The writer independent online handwriting recognition system frog on hand
and cluster generative statistical dynamic time warping. IEEE Trans. Pattern Anal. Mach. Intell. 2004, 26,
299–310. [CrossRef]
43. Kahveci, T.; Singh, A. Variable length queries for time series data. In Proceedings of the 17th International
Conference on Data Engineering, Heidelberg, Germany, 2–6 April 2001; pp. 273–282.
44. Müller, M. Dynamic time warping. In Information Retrieval for Music and Motion; Springer: Berlin/Heidelberg,
Germany, 2007; pp. 69–84.
45. Müller, M.; Mattes, H.; Kurth, F. An efficient multiscale approach to audio synchronization. In Proceedings
of the 6th International Conference on Music Information Retrieval, London, UK, 11–15 September 2005;
pp. 192–197.
46. Salvador, S.; Chan, P. Toward accurate dynamic time warping in linear time and space. Intell. Data Anal.
2007, 11, 561–580. [CrossRef]
47. Jang, G.S.; Lai, F.; Jiang, B.W.; Parng, T.M.; Chien, L.H. Intelligent stock trading system with price trend
prediction and reversal recognition using dual-module neural networks. Appl. Intell. 1993, 3, 225–248.
[CrossRef]
48. Hwarng, H.B. Insights into neural-network forecasting of time series corresponding to ARMA (p, q)
structures. Omega 2001, 29, 273–289. [CrossRef]
49. Ahn, J.J.; Kim, D.H.; Oh, K.J.; Kim, T.Y. Applying option Greeks to directional forecasting of implied volatility
in the options market: An intelligent approach. Expert Syst. Appl. 2012, 39, 9315–9322. [CrossRef]
Sustainability 2018, 10, 4641 18 of 18
50. Ahn, J.J.; Byun, H.W.; Oh, K.J.; Kim, T.Y. Using ridge regression with genetic algorithm to enhance real estate
appraisal forecasting. Expert Syst. Appl. 2012, 39, 8369–8379. [CrossRef]
51. Chou, J.S.; Ngo, N.T. Time series analytics using sliding window metaheuristic optimization-based machine
learning system for identifying building energy consumption patterns. Appl. Energy 2016, 177, 751–770.
[CrossRef]
© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC BY) license (http://creativecommons.org/licenses/by/4.0/).