没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Expert Systems With Applications 54 (2016) 193–207
Contents lists available at ScienceDirect
Expert Systems With Applications
journal homepage: www.elsevier.com/locate/eswa
Evaluating machine learning classification for financial trading:
An empirical approach
Eduardo A. Gerlein
a , c , ∗
, Martin McGinnity
a , b
, Ammar Belatreche
a
, Sonya Coleman
a
a
Intelligent Systems Research Centre, University of Ulster, Londonderry, UK
b
School of Science and Technology, Nottingham Trent University, Nottingham, UK
c
Electronics Department, Pontificia Universidad Javeriana, Bogotá, Colombia
a r t i c l e i n f o
Keywords:
Trading
Financial forecasting
Computer intelligence
Data mining
Machine learning
FOREX markets
a b s t r a c t
Technical and quantitative analysis in financial trading use mathematical and statistical tools to help in-
vestors decide on the optimum moment to initiate and close orders. While these traditional approaches
have served their purpose to some extent, new techniques arising from the field of computational intel-
ligence such as machine learning and data mining have emerged to analyse financial information. While
the main financial engineering research has focused on complex computational models such as Neu-
ral Networks and Support Vector Machines, there are also simpler models that have demonstrated their
usefulness in applications other than financial trading, and are worth considering to determine their ad-
vantages and inherent limitations when used as trading analysis tools. This paper analyses the role of
simple machine learning models to achieve profitable trading through a series of trading simulations in
the FOREX market. It assesses the performance of the models and how particular setups of the models
produce systematic and consistent predictions for profitable trading. Due to the inherent complexities of
financial time series the role of attribute selection, periodic retraining and training set size are discussed
in order to obtain a combination of those parameters not only capable of generating positive cumulative
returns for each one of the machine learning models but also to demonstrate how simple algorithms
traditionally precluded from financial forecasting for trading applications presents similar performances
as their more complex counterparts. The paper discusses how a combination of attributes in addition to
technical indicators that has been used as inputs of the machine learning-based predictors such as price
related features, seasonality features and lagged values used in classical time series analysis are used to
enhance the classification capabilities that impacts directly into the final profitability.
©2016 Elsevier Ltd. All rights reserved.
1. Introduction
Data mining is the process of finding hidden patterns within
data using automatic or semi-automatic methods ( Witten, Frank,
& Hall, 2011 ). In particular, machine learning (ML) techniques
have shown impressive performance in solving real life classi-
fication problems in many different areas such as communica-
tions ( Di, 2007 ), internet traffic analysis ( Nguyen & Armitage,
2008 ), medical imaging ( Wernick, Yang, Brankov, Yourganov, &
Strother, 2010 ), astronomy ( Freed & Lee, 2013 ), document anal-
ysis ( Khan, Baharudin, Khan, & E-Malik, 2009 ), biology ( Zamani
& Kremer, 2011 ) and time series analysis ( Qi & Zhang, 2008 ).
∗
Corresponding author at: Electronics Department, Pontificia Universidad Javeri-
ana, Bogotá, Colombia. Tel. +5713208320 ext 5549 .
E-mail addresses: gerlein-e@email.ulster.ac.uk (E.A. Gerlein),
tm.mcginnity@ulster.ac.uk (M. McGinnity), a.belatreche@ulster.ac.uk (A. Belatreche),
sa.coleman@ulster.ac.uk (S. Coleman).
Although complex models such as Neural Networks (NN) and
Support Vector Machine (SVM) techniques are studied within
the ML field, several other approaches also exist, characterized
by a greater degree of simplicity when compared with NN and
SVM. Despite this apparent simplicity, some of the ML tech-
niques may be well-suited for quantitative analysis within the
financial industry, as their capabilities for finding hidden patterns
in large amounts of data may help in financial forecasting for trad-
ing.
Financial trading of securities using technical and quantitative
analysis has been traditionally modelled by statistical techniques
for time series analysis such as the ARMA ( Box et al., 1994 ) and
ARIMA models, and the more sophisticated ARCH technique ( Engle,
1982 ). In contrast to these statistical approaches, complex mod-
els coming from the ML field have emerged attempting to pre-
dict future movements of securities’ prices ( Yoo, Kim, & Jan, 2007 ).
The extensive literature has shown how some ML techniques spe-
cializing in classification and regression tasks have demonstrated
http://dx.doi.org/10.1016/j.eswa.2016.01.018
0957-4174/© 2016 Elsevier Ltd. All rights reserved.
194 E.A. Gerlein et al. / Expert Systems With Applications 54 (2016) 193–207
that they are well-suited for quantitative analysis within the fi-
nancial industry, as their capabilities of finding hidden patterns
in large amounts of financial data may help in derivatives pric-
ing, risk management and financial forecasting. One of the most
published projects that uses such techniques in financial applica-
tions is Standard & Poor’s Neural Fair Value 25 portfolio ( Smicklas,
2008 ), which selects on a weekly basis 25 stocks using an artificial
NN, from a total of 30 0 0 stocks yield relative to that of the S&P
500 index, attempting to outperform the market by calculating a
stock’s weekly fair value based on fundamental analysis. Particu-
larly for securities trading, the utility of complex models such as
NN, SVM and hybrid models ( Cai, Hu, & Lin, 2012 ) have been ex-
tensively studied and have led to promising results. Nevertheless,
information regarding the incorporation of such methods into trad-
ing floor operations tends to remain hidden to the public, for com-
mercial proprietary reasons ( Yamazaki & Ozasa, n.d.; Duhigg, 2006;
Patterson, 2016) .
In terms of financial trading, analysts in the industry (usually
referred to as “quants”) have developed technical indicators that
are used to identify the most suitable moments to open and close
trades, and are possibly the most popular tools currently used
in technical trading. Published research that aims to incorporate
Computational Intelligence (CI) in financial prediction shows how
those technical indicators have been used as inputs to ML models
to find the hidden patterns or relationships among them, in order
to predict future prices, trends or a percentage of confidence in
those predictions. With the possible exception of long term aver-
ages, those technical indicators are constructed using information of
prices over short periods in the past, no more than 20–30 trading
periods in order to incorporate the historical behaviour in a sin-
gle value. The selected trading period is part of the trading strat-
egy and might vary from long frames of 1 day to small frames of
1 min ute, or even smaller time windows as in the case of high fre-
quency trading. The construction of such indicators can be seen as
a process used in large scale time series data sets called dimension
reduction ( Wang et al., 2005 ) that attempts to transform the series
to another domain seeking a version of the data set that might be
much simpler to analyse. In contrast to time series analysis where
the data set is seen as a whole entity, ML classification tasks con-
struct independent instances that are representative examples of
the concept to be learned.
Financial predictions that incorporate ML approaches construct
the training, test and off-sample data sets as a collection of in-
stances using popular technical indicators as reported in a number
of papers. Hence, an instance is created usually using the value of
the current price and the instantaneous values of the mentioned
indicators, generating a static picture of the situation of the market
for the exact time that the instance is constructed. In this scenario,
each instance , i.e. prices and their correspondent technical indica-
tors used as attributes, becomes itself an independent example of
the problem, which avoids the time dependence in the series, ap-
proaching the problem as simple classification task rather than a
time series analysis in the strict meaning of the word. The hypoth-
esis in this case is that once a ML model is trained, it may be able
to classify individual instances using the technical indicators as at-
tributes, due to the fact that those unseen instances represent in
turn the invariant circumstances of the market at certain points
in time, and that the result of the classification task can be inter-
preted as a trend forecast. The main implication of this hypothesis
is that the financial forecasting can benefit from the use of simpler
ML techniques rather than using complex time series analysis ap-
proaches, simplifying the use of computational resources while at
the same time avoiding indexing and ordering issues in the data
sets.
This paper addresses the question of the usefulness of low-
complex ML classifiers in financial trading, and in particular
will demonstrate if such low-complexity binary classification
approaches are able to generate consistent profitable trading over
an extensive period of time. The paper’s main contribution resides
in the fact that simple machine learning models that tradition-
ally have been precluded from financial applications, as opposed
to the more complex NN and SVM, can be used to generate prof-
itable transactions on the long term with the correct combina-
tion of periodic retraining, training set size and attribute selection.
The work is motivated mainly by the results reported in ( Barbosa,
2011 ), which claims outstanding financial results using simple clas-
sifiers. In this case, a simple model is characterized by the low
computational requirements for both the training and the classi-
fying process due to the inherent simplicity of the learned model
(instance-based classifiers, decision trees and rule-based learners).
While the main objective of ML classification is to maximise ac-
curacy, this might not be the best metric to evaluate the perfor-
mance of such systems when used in the context of financial trad-
ing. The most important metric when assessing trading strategies
is undoubtedly profitability, reflected in this paper as cumulative
return over a specific trading period. In this paper, it is developed
an empirical comparison between average accuracy and cumula-
tive return as the main metrics of performance of a set of six ma-
chine learning models (OneR, C4.5, JRip, Logistic Model Tree, KStar
and Naïve Bayes). The models produce a binary classification used
later to predict price movement (up or down in the next trading
period) for the USDJPY currency pair using six hour time frames
over a trading time-frame of six years. The six hour time frame
was selected to be able to validate and compare with the results
reported in ( Barbosa & Belo, 2008b ), although the same approach
used in the experiments can be applied to different time frames. A
set of experiments was conducted where the results of modifying
three variables were studied: training set size, period of retraining
and number of attributes for the training and test sets. The results
show relative low accuracy, only a few points over 50%, but at the
same time, very promising results in terms of profitability. Later,
further experiments are conducted on simulated trades over the
same period of time using EURGPB and EURUSD currency pairs,
and similar results are reported.
The remainder of the paper is organised as follows: Section 2
discusses related work using ML in financial forecasting applica-
tions. Section 3 presents the general experimental setup, describ-
ing the data sets, and the attribute selection to feed the models
and briefly describes the different ML algorithms used in the ex-
periments as well as their particular parameter set up in order to
present comprehensive information for future experiment replica-
tion. Section 4 discusses the results detailing each one of the sim-
ulated trading scenarios. Finally, Section 5 concludes the paper and
explores future work.
2. Machine learning in financial forecasting
Within the financial trading chain two main areas can be iden-
tified, where the use of ML techniques have reported particularly
successful implementations: derivatives pricing, risk management
and financial forecasting. Financial forecasting is possibly the most
important application within ML for data mining in Capital Mar-
kets. ML techniques for forecasting include expert or rule-based
systems, decision trees, NNs and genetic computing. Applications
within the trading cycle such as Algorithmic Trading Engines
1
and
1
Algorithmic trading engines in the buy side, are essentially semi-automatic
computer aided systems that help retail investors to take the best financial de-
cisions in terms of high returns at lowest possible risks, and by means of pro-
gramming specific rules the system are capable of transmitting pre- and post-trade
data about quotes and trades to other market participants ( Hendershott, 2003 Chan,
2008 ). The literature also reports the use of algorithmic trading engines in the sell
E.A. Gerlein et al. / Expert Systems With Applications 54 (2016) 193–207 195
Order Matching Engines
2
( Hendershott, 2003 ) have the potential to
incorporate different levels of CI, and in particular ML techniques.
The majority of existing ML-based methods for trading use techni-
cal indicators as part of the training attributes extracted from the
financial series instead of using the raw prices as a training vector.
Maggini, Giles, and Horne (1997 ) had pointed out that there is an
inherent difficulty in generating statistically reliable technical indi-
cators , due to the fact that the rules inferred to produce accurate
predictions are changing continually in financial time series, and
that it is even possible to evidence the presence of a high number
of contradictory instances in the training sets due to the fact that
market data exhibit statistical characteristics found in other types
of time series. This situation is reflected in the large volume of pa-
pers ( Chen & Shih, 2006; Eng, Li, Wang, & Lee, 2008; Kim, 2003;
Lee, Park, O, Lee, & Hong, 2007; Li & Kuo, 2008; Tenti, 1996 ) that
have reported accuracies under 60% with ML models which have
shown impressive performance in areas other than financial pre-
diction. According to Sewell and Yan (2008 ), for certain markets
such as futures and FOREX, it may be necessary to generate pre-
dictions with an accuracy marginally higher than the one obtained
by a random classifier to obtain profits due to two main factors:
low costs and leverage.
Artificial NNs are probably the most common method utilized
in financial forecasting. Early works such as that of Tenti ( Tenti,
1996 ) compared the performance of three recurrent neural net-
works based on their returns in the simulated forecasts on cur-
rency futures. The inputs to the networks include technical indica-
tors (average directional movement index, trend movement index
and the rate of change). Tenti also takes into account trading costs,
and reports positive returns in the trading simulation, demonstrat-
ing that NN techniques can indeed be used as forecasting tools. Lu
and Wu (2009 ) show another example of stock market forecasting
with artificial neural networks. The paper compared a NN model’s
performance against the ARIMA model, predicting the direction of
future values of the S&P 500 Index. The experiments showed that
the NN-based system outperformed the ARIMA model only in sta-
ble market conditions, since the system only exhibits a modest 23%
level of accuracy against the ARIMA’s 42% in more volatile scenar-
ios. Kamruzzaman and Sarker (2003 ) compared the performance
of the ARIMA model with several NN models when forecasting ex-
change rates of currency pairs in the FOREX market. The NNs were
trained with back-propagation, scaled conjugate gradient and back-
propagation with Bayesian regularization, using exchange rates in
the previous period and moving averages as inputs. The accuracy
in the prediction as well as the normalized mean square error and
the mean absolute error were used to measure global performance,
showing that all NN models outperformed the ARIMA model with
an accuracy of 80%. Taking into account that only the best results
obtained were reported and that, in general ML techniques do not
present high levels of accuracy with unseen data that differ sig-
nificantly from the training sets, these impressive results must be
considered with care. ( McDonald, Coleman, McGinnity, Li, & Bela-
treche, 2014 ), investigate the effectiveness of a number of machine
learning algorithms and their combinations at generating one-step
ahead forecasts of a number of financial time series. The authors
found that hybrid models, consisting of a linear statistical model
and a non-linear machine learning algorithm, are effective at fore-
side, brokers and investment banks, to manage the vast amount of daily orders
from the clients usually arrived before the market opening hours, deciding how
and when to execute those orders taking into account existing regulations and at
the same time, minimizing the effect on prices [53].
2
An order matching engine is a trading system that facilitates the exchange of
financial instruments between multiple parties by means of a transaction algorithm
that translates orders into trades pairing buyers with sellers in terms of transaction
prices and quantities ( Hendershott, 2003 ).
casting future values of the series, particularly in terms of the fu-
ture direction of the series.
While artificial NNs are considered the most popular technique
in financial forecasting, other reports also show promising results
with different data mining models. Using SVM, Kim (2003 ) at-
tempted to forecast daily price directions of the KOSPI stock in-
dex. The model used technical analysis indicators (momentum,
Williams %R and commodity channel index) as inputs and the best
accuracy obtained after training several models with different pa-
rameters was 57.83%. The work also presented a comparison with
the back propagation NN (with 54.76% of accuracy) and nearest-
neighbour model (51.98% of accuracy). This middle-range level of
accuracy is expected due to the high volatility of financial time se-
ries, but to achieve it several models needed to be trained. This
study concludes that no single model is perfectly suited in all mar-
ket conditions, and even more importantly, the models must be
retrained frequently to maintain the forecasts accurate. In another
study, Tay and Cao (2001 ) also compared SVM with back propa-
gation NN to forecast prices of five types of futures contracts. On
average, the SVM approach obtained better accuracy than the back
propagation NN, but also in middle-range levels: 47.7% by SVM
against 45.0% obtained by back propagation NN. SVM also out-
performed a back propagation NN in the work presented by Chen
and Shih (2006 ), where these techniques were used to predict the
value of six Asian indices, obtaining 57.2% level of accuracy with
SVM and 56.7% with NN models.
Apart from NN and SVM, in the study presented in ( Maggini et
al., 1997 ) the authors proposed a heuristic method to select dif-
ferent inputs for a non-linear machine learning algorithm, discard-
ing the option of time series prediction and limiting the problem
to classification to determine the class of price variation, although
there is no specification in the paper if the problem is restricted to
a binary (up/down) or multi-class classification (up/down/stable)
problem. The selected method is the K-nearest neighbours with a
sliding window dataset used to retrain the model at every time
step. The metric selected to evaluate the performance was mean
square error. The paper concludes that it is impossible to predict
price variation with enough accuracy, discouraging the use of this
approach and attributing the poor results to the weakness of the
model and a poor selection of inputs that might affect the price
movement. Nevertheless, the authors seem to be focused on ac-
curacy and do not provide any financial results in the trading pe-
riod used in the simulation. J. Li, Tsang, and Park (1999 ) predicted
expected return in the Dow Jones Industrial Average using Finan-
cial Genetic Programming, and compared it with random decisions
and C4.5 decision tree classification. They used some simple tech-
nical indicators such as short and long term moving averages and
long and short term price filters. The authors did not focus only
on accuracy of predictions but also on annualized returns and pos-
itive returns of a simulated set of investments following the pre-
dictions. They reported over 60% in positive returns and over 40%
in annualized returns over a trading period of four years for the
Genetic Programming model and over 40% for the C4.5 decision
tree. In both cases, the results represent an outstanding financial
return even without taking into account trading costs, which sug-
gest that technical indicators might generate profitable rule-based
models to predict complex financial time series.
Barbosa and Belo presented several reports using single agents
to execute algorithmic trading in the FOREX Market ( Barbosa &
Belo, 2008b ), a micro-society managing a hedge fund ( Barbosa &
Belo, 2010 ) and a multi-agent system for multiple markets trad-
ing ( Barbosa & Belo, 2008a ), focusing on profitability and maxi-
mum drawdown as performance metrics. The proposed architec-
ture is divided into three modules in charge of (a) predicting the
immediate next trend by means of an ensemble of binary classi-
fiers, (b) a risk management module to decide how much to invest
剩余14页未读,继续阅读
资源评论
敲玉余韵
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功