Nothing Special   »   [go: up one dir, main page]

Pattern Matching Trading System Based On The Dynamic Time Warping Algorithm

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

sustainability

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

Sustainability 2018, 10, 4641; doi:10.3390/su10124641 www.mdpi.com/journal/sustainability


Sustainability 2018, 10, 4641 2 of 18

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

2. Materials and Methods

2.1. Futures Market


The futures market is a market for futures trading, which is one of many derivatives. The value of
derivatives relies on other assets called underlying assets such as commodities, stocks, bonds, indices
and interest rates. In other words, it changes when the value of the underlying assets changes. Prior to
the establishment of futures markets, forward contracts have been traded to avoid the risk related to
the value of the underlying asset. When one does not need to have the underlying asset at the present
time but needs it in the future, he or she can make a forward contract with a counter party that presents
the underlying asset’s delivery price and date. Due to the credit risk inherent in the forward contract,
futures markets have been established by standardizing transactions and eliminating the credit risk.
The futures market was originally designed to help market participants avoid exposure to the
risk of price fluctuations. In recent years, the role of risk hedging by futures contracts has become
more prominent. For instance, although KOSPI 200 index futures are recognized as a high-return
investment, the primary purpose of investing in the stock index futures is to avoid the risk related to
stock prices. The stock index futures’ underlying asset is a stock price index which is an intangible
product and hence it cannot be acquired or delivered to the counter party of the contract. Investors
in index futures have a long position when the bull market is predicted and have a short position
when the bear market is predicted in the future. Accordingly, investors in index futures can realize
profits in both bull and bear markets if they make a correct prediction. In other words, they should
predict the direction of stock price fluctuations accurately. They can hardly make profits by responding
promptly with intuitive and qualitative investment decisions based on past trading experience. Indeed,
quantitative and systematized trading strategies which use existing futures investment strategies and
past time series data are required for making profits. It is essential to develop a quantitative method to
determine the most useful trading positions and timing of index futures to realize high returns.
An investor in a futures market is classified as a hedger who avoids risk and a speculator who
seeks profit [31–35]. The hedger takes the position to hedge the stock price risk and rollover the
position until the settlement date, whereas a speculator tends to clear his or her position whenever
he or she can make profits. The futures market operates a margin system to avoid the credit risk due
to the leverage effect on underlying assets. It includes the initial margin, maintenance margin and
additional margin. The initial margin is at least 15% of the contract value and must be paid to enter
a new futures contract. The maintenance margin is at least 10% of the contract value and must be
maintained for holding a futures contract. Additional margin should be paid if the margin level is
lower than the maintenance margin as the futures price fluctuates. The additional margin payment
is notified by brokerage firms, which is called a margin call. If the margin call is triggered and the
additional margin is not paid, the exchange arbitrarily clears the outstanding position by making a
reverse trading.

2.2. Dynamic Time Warping


The dynamic time warping (DTW) algorithm is known as an efficient method to measure the
similarity between two sequences of time series data (Figure 1). Intuitively, the sequences are warped in
a nonlinear fashion to match each other. The DTW minimizes distortion effects due to time-dependent
movement by using an elastic transformation of time series data to recognize the similar phases
between different patterns along time. Even if there is a deformation relationship between two
different sequences of time series data, the DTW determines the most similarities between them [7].
Since the DTW was introduced in the 1960s [36], the algorithm has been applied to spoken word
recognition [37,38], gesture recognition [39], behavioral perception [40], data mining and time series
clustering [25,41–43].
Sustainability 2018, 10, 4641 4 of 18
Sustainability 2018, 10, x FOR PEER REVIEW 4 of 17

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

Figure 2. Process of PMTS.


Figure 2. Process of PMTS.
Phase 1: Data preparation for the pattern matching trading system
Phase 1: Data preparation for the pattern matching trading system
To conduct this experiment, 137,242 KOSPI 200 index futures data were collected every at
To conduct this experiment, 137,242 KOSPI 200 index futures data were collected every at 10
10 min intervals from 01/02/2001 to 12/30/2015. The collected index futures time series data are
min intervals from 01/02/2001 to 12/30/2015. The collected index futures time series data are
preprocessed by outlier processing and missing value processing. All extracted daily index futures
preprocessed by outlier processing and missing value processing. All extracted daily index futures
data are standardized by setting the index futures data to 0 at 12:00 pm and scaling with the min-max
data are standardized by setting the index futures data to 0 at 12:00 pm and scaling with the min-max
method. The scaled data is obtained by the following equation:
method. The scaled data is obtained by the following equation:
∼ d) − −
f (𝑓𝑓(𝑑𝑑) min 𝑚𝑚𝑚𝑚𝑚𝑚 f id f ( d
d∈d𝑑𝑑∈𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 )
𝑓𝑓(𝑑𝑑)
d�) ==
f (𝑓𝑓(𝑑𝑑) (3)
(3)
max
𝑚𝑚𝑚𝑚𝑚𝑚 f ( d ) − min
d∈d f id 𝑓𝑓(𝑑𝑑) − 𝑚𝑚𝑚𝑚𝑚𝑚 d∈d f id f ( d𝑓𝑓(𝑑𝑑)
)
𝑑𝑑∈𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 𝑑𝑑∈𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑

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 3. Structures of the initial 27 patterns (ip# as initial pattern).


Figure 3.
Figure 3. Structures
Structures of
of the
the initial
initial 27
27 patterns
patterns (ip#
(ip# as
as initial
initial pattern).
pattern).

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.

Figure 6. Structures of the sliding windows.


Figure 6. Structures of the sliding windows.
Figure 6. Structures of the sliding windows.
The sliding window method has been used for simulation of time series data [47–51]. Table 1
The sliding window method has been used for simulation of time series data [47–51]. Table 1
Theasliding
shows set of 54window
windows method has18been
with an used
months for simulation
training period and of atime series testing
3 months data [47–51].
period.Table
For 1
shows a set of 54 windows with an 18 months training period and a 3 months testing period.
shows a setWindow1
example, of 54 windows with an
is composed of 18
themonths training
18 months period
training andofa 301/2001–06/2002
period months testingand period.
the 3For
For example, Window1 is composed of the 18 months training period of 01/2001–06/2002 and the
months testing
example, Window1 period of 07/2002–09/2002.
is composed of the 18 Sliding
months3 months from
training Window1,
period Window2 is setand
of 01/2001–06/2002 withthe
a 3
3 months
training
testing
period
period
of
of 07/2002–09/2002.
04/2001–09/2002 and a
Sliding
testing
3 months
period of
from Window1,
10/2002–12/2002. The
Window2
sliding is
is set with a
continued
months testing period of 07/2002–09/2002. Sliding 3 months from Window1, Window2 is set with a
training period
until the of sample
entire 04/2001–09/2002 and a testing
period is included period of
and produces 10/2002–12/2002.
of 54 windows.The sliding is continued
training period of 04/2001–09/2002 and a testing periodaof total
10/2002–12/2002. The sliding is continued
until the entire sample period is included and produces a total of 54 windows.
until the entire sample period is included and produces a total of 54 windows.
Table 1. Training and testing data set of 54 windows for the trading simulation.

Table 1. Training and testing data


Period set of 54 windows for the trading simulation.
(mm/yyyy~mm/yyyy)
Training (18 month) Testing (3 month) Training (18 month) Testing (3 month)
Window 1 01/2001~06/2002 Period (mm/yyyy~mm/yyyy)
07/2002~09/2002 Window 28 10/2007~03/2009 04/2009~06/2009
Training (18 month) Testing (3 month) Training (18 month) Testing (3 month)
Window 1 01/2001~06/2002 07/2002~09/2002 Window 28 10/2007~03/2009 04/2009~06/2009
Sustainability 2018, 10, 4641 8 of 18

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

3.1. Data Collection and Preprocessing


The data used in the PMTS experiments are the KOSPI 200 index futures data from 2 January
2001 to 30 December 2015. The data were collected from KOSCOM, which is a subsidiary of the Korea
Exchange, and in charge of financial IT. The raw data consists of daily, hourly and minutely data and
open price, high price, low price, close price and volume per 1 min. If there is no market price or open
price due to a market opening delay or specific market regulations, the missing data was replaced by
the closing price on the previous day. When the trading volume is significantly small or large, outlier
processing is performed by re-extracting the data. The raw data is normalized by min-max scaling.
The market data is a 10-min unit closing price for the daily KOSPI 200 index futures data. The market
data from 9:00 am to 12:00 pm is used for pattern recognition by the dynamic time warping method
and the market data from 12:00 pm is used for trading (either entry or exit position). The simulation is
performed with various combinations of training and testing periods: 12, 18, 24 and 36 months for the
training period and 1, 2 and 3 months for the testing period. The entire sample period of 180 months
from January 2001 to December 2015 provides a number of combinations of the data set. Table 2 shows
the number of windows produced by a several combinations of training and testing periods.

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

Table 3. Frequency of representative patterns for each window.

Representative Pattern (rp)


1 2 3 4 5 6 7 8 9 10 11 12 13
Window 1 44 61 8 10 7 12 8 18 78 73 8 9 29
Window 2 47 55 6 9 5 12 10 15 85 74 8 7 34
Window 3 50 55 6 11 5 15 13 14 91 61 6 5 35
Window 4 52 57 5 10 6 18 13 13 89 56 4 6 38
Window 5 49 59 5 8 6 20 11 11 95 54 3 5 41
Window 6 54 56 4 10 7 17 11 12 93 53 2 6 44
Window 7 57 52 7 9 9 14 12 13 102 49 2 5 40
Window 8 62 56 8 8 9 14 12 15 99 46 3 4 33
Window 9 54 57 8 6 11 13 8 18 99 57 2 4 31
Window 10 52 58 9 5 11 11 8 22 110 53 3 4 23
Window 11 48 61 10 4 9 12 8 24 107 60 3 7 20
Window 12 45 64 9 3 9 15 8 22 108 58 7 9 15
Window 13 38 68 8 5 8 17 5 20 105 62 9 9 17
Window 14 34 67 7 6 10 22 5 18 110 61 8 9 18
Window 15 40 69 7 6 11 22 6 18 107 55 9 9 18
Window 16 41 73 7 8 9 24 6 14 104 55 8 9 19
Window 17 40 70 5 10 10 22 7 12 108 52 8 6 23
Window 18 41 74 7 9 9 22 10 13 101 51 6 4 29
Window 19 39 74 6 10 12 24 12 10 102 48 4 4 29
Window 20 37 77 7 11 13 17 13 10 96 50 4 3 34
Window 21 39 75 8 11 12 18 14 10 102 43 4 3 32
Window 22 41 71 7 10 15 18 14 10 99 39 7 3 34
Window 23 44 67 9 8 16 20 14 10 96 41 9 3 32
Window 24 43 62 11 10 14 17 13 11 99 43 9 5 30
Window 25 48 59 10 9 16 13 12 15 93 47 10 6 29
Window 26 49 55 9 7 14 16 10 16 94 47 10 9 33
Window 27 42 53 9 7 15 15 9 14 92 57 11 8 38
Window 28 40 55 8 5 13 12 11 18 98 57 9 7 38
Window 29 38 59 7 5 15 8 11 19 98 54 11 8 39
Window 30 39 67 7 3 16 8 11 20 98 55 11 6 36
Window 31 37 71 7 3 10 9 12 22 100 56 12 6 35
Window 32 39 73 7 3 11 9 13 25 102 50 12 6 27
Window 33 43 73 8 3 8 10 12 27 97 50 13 7 25
Window 34 47 69 9 4 8 13 12 24 95 55 13 8 21
Window 35 50 66 9 7 5 17 11 23 94 59 13 9 17
Window 36 52 59 7 8 5 17 10 19 101 56 11 9 20
Window 37 52 52 9 7 6 16 10 14 110 53 10 10 24
Window 38 51 49 13 7 4 15 8 11 113 59 11 7 27
Window 39 54 48 11 7 4 17 10 11 114 59 8 7 26
Window 40 51 50 12 6 4 16 10 10 113 60 7 7 29
Window 41 49 48 11 7 4 14 12 11 109 57 3 5 41
Window 42 46 52 10 8 4 17 12 11 105 57 5 6 42
Window 43 53 53 10 8 5 21 10 12 95 57 6 4 40
Window 44 48 56 7 9 8 20 12 15 94 57 5 4 37
Window 45 38 56 7 9 10 18 12 13 103 54 6 4 41
Window 46 34 62 5 9 9 21 10 15 102 52 9 4 39
Window 47 32 69 5 5 8 23 7 15 111 53 9 5 30
Window 48 31 67 5 3 9 24 8 18 107 57 7 4 29
Window 49 23 72 5 3 8 24 9 17 113 53 6 6 29
Window 50 26 72 4 4 7 27 6 16 113 52 5 7 30
Window 51 31 71 3 4 6 29 7 17 102 56 9 8 26
Window 52 32 72 5 4 7 27 7 15 100 55 6 7 30
Window 53 38 62 7 6 8 28 7 15 97 54 6 9 30
Window 54 36 58 10 6 7 25 5 16 102 52 7 8 37
Sustainability 2018, 10, 4641 11 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

3.4. PMTS Results


The PMTS is conducted as follows. We first calculated the annual return of the market data clearing
at 15:00 with various ranges of training and testing periods to find optimal periods. Given these optimal
periods, various filtering criteria and up/down frequency input parameters are used to find optimal
parameters. As a last step, we compared the annual returns clearing at every 10 min from 14:00 to
15:00 using the optimal parameters determined in the previous steps to find the optimal clearing time.
Various ranges of results are generated depending on the parameters used. With the results of the
simulation as described in Section 3.3, we repeat the experiments with significant parameters to find
the optimal parameters. The stop loss and slippage cost were fixed at 0.5% and 0.02 pt, respectively
and other significant parameters are:

- Training period: 12, 18, 24 and 36 months


- Testing periods: 1, 2 and 3 months
- Filtering criteria: 5, 10, 15 and 20 ea
- U/D frequency: 65%, 70%, 75% and 80%

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.

(Training Period, Testing Period)


Performance
(12,1) (12,2) (12,3) (18,1) (18,2) (18,3) (24,1) (24,2) (24,3) (36,1) (36,2) (36,3)
Annualized return 16.62 16.45 18.48 19.59 16.99 19.17 18.13 18.67 19.38 17.81 16.50 18.43
StDev 31.32 22.91 21.49 30.63 23.10 18.83 29.27 22.10 20.88 31.42 23.88 21.72
Sharpe ratio 0.48 0.65 0.79 0.59 0.67 0.94 0.57 0.78 0.86 0.52 0.63 0.78
Slippage Cost: 0.02 pt, Stop loss: 0.5%, Filter Criteria: 20, U/D Frequency: 65%, 15:00 exit.

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.

(Training Period, Testing Period)


Performance
(12,1) (12,2) (12,3) (18,1) (18,2) (18,3) (24,1) (24,2) (24,3) (36,1) (36,2) (36,3)
Annualized return 17.20 16.91 17.81 17.26 16.06 16.50 18.42 18.65 18.66 18.63 18.03 18.48
StDev 36.36 26.92 25.86 33.21 26.40 22.65 31.87 25.11 22.68 34.39 26.76 23.87
Sharpe ratio 0.43 0.57 0.63 0.47 0.55 0.66 0.53 0.68 0.76 0.50 0.62 0.71
Slippage Cost: 0.02 pt, Stop loss: 0.5%, Filter Criteria: 10, U/D Frequency: 65%, 15:00 exit.

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)

Slippage 3.63 5.46 0.5%, Training


6.36 6.69 18, Testing
7.76 period: 8.82 9.33
1
27 pattern Cost:
2 0.02 pt, Stop loss: period: 3, Filter Criteria: 20,6.87
U/D
(0.0098) (0.0004) (0.0002) (0.0000) (0.0000) (0.0000) (0.0000)
Frequency: 65%. Slippage Cost: 0.02 pt, Stop loss: 0.5%, Training period: 24, Testing period: 3, Filter
2
1 Slippage Cost: 0.02 pt, Stop loss: 0.5%, Training period: 18, Testing period: 3, Filter Criteria: 20, U/D Frequency:
Criteria:
65%. 10, U/DCost:
2 Slippage Frequency: 65%.loss: 0.5%, Training period: 24, Testing period: 3, Filter Criteria: 10, U/D
0.02 pt, Stop
Frequency: 65%.
Figures 8 and 9 show the average returns of the market data that are assigned to each of the 27
and 13 representative
Figures patterns
8 and 9 show for all combinations
the average returns of theof parameters
market used
data that areinassigned
this study of clearing
to each at
of the 27
every 10 min from 14:00 to 15:00, respectively. Most patterns show higher returns at the 15:00 clearing
and 13 representative patterns for all combinations of parameters used in this study of clearing at every
time.
10 min from 14:00 to 15:00, respectively. Most patterns show higher returns at the 15:00 clearing time.

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.

Author Contributions: Project


Author Contributions: ProjectAdministrator,
Administrator, K.J.O.;
K.J.O.; Software,
Software, H.K.;
H.K.; Validation,
Validation, H.W.B.;
H.W.B.; Formal
Formal Analysis,
Analysis, S.H.J.;
S.H.J.; Writing-Original
Writing-Original Draft Preparation,
Draft Preparation, S.H.K.; S.H.K.; Writing-Review
Writing-Review & Editing,
& Editing, H.S.L. H.S.L.
Conflicts of
Conflicts Interest: The
of Interest: The authors
authors declare
declare no
no conflicts
conflicts of
of interest.
interest

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/).

You might also like