Over the last decade, computing has revolutionized the way business is handled within the financial
domain demonstrating significant change; with the removal of human emotion from the trading process,
drastically faster access to exchanges and greater consistency in returns, electronic trading has remained
true to many of its initial promises (Aldridge, 2013). Financial transactions can now be stored in greater
quantities with far greater detail due to technological enhancement in data storage and processing power
(Dacorogna, 2001). With the increasing availability of high-frequency ‘tick’ financial data and with
more than 50,000 data points per day in spot FX markets (Glattfelder, Dupuis and Olsen, 2011), we can
identify a clear increase in electronic trading activities. This makes the study of effective financial
forecasting methods certainly more tractable and statistically more substantial.
Accurate forecasting methods have long been sought after and developed in the aim of providing valid
and meaningful estimations into the future pricing movement in the financial markets. Numerous
machine learning approaches have been utilised for such a purpose; models based on Genetic
Programming (LeBaron, 2012), Hidden Markov Model (Hassan and Nath, 2005) and Artificial Neural
Networks (Turban and Trippi, 1994) are few of many examples of such application. Many traditional
methods utilise an interval-based summary to observe price fluctuations in the financial time series.
This is usually observed in the form of a snapshot of the market i.e. daily closing price or minute-tominute
fixed-interval summaries. However, the use of fixed intervals is problematic as key intra-day
events are only captured at the end of the fixed interval i.e. at the end of the trading day; in which case,
important price movements may be missed due to the usage of such artificial price summaries (Tsang,
2016). This can be demonstrated by reviewing the May 2010 flash crash whereby at 2:32 p.m. EDT the
United States trillion-dollar stock market crash began and lasted approximately 36 minutes. If for
example during this time, we were utilising daily closing price summaries for financial predictions, the
above events would have not been identified thus placing the company at serious risk of loss or
rendering a profitable opportunity unseen (Wells and Chemi, 2017).
Consider Figure 1 which demonstrates a comparison of high frequency ‘tick’ data against daily closing
price data. The daily series data contains 31 data points whilst the tick series contains a staggering
837,917 data points. This abstraction when using the daily series data, although closely following the
movement of the high frequency tick data, demonstrates how there are numerous unseen profitable
opportunities which could be utilised in developing a more useful financial forecasting solution, thus
resulting in a potentially larger return from investment (Voice, 2012). In addition, utilising the volatile
tick data will give earlier indication to any sudden significant critical events which could pose a threat
to the company’s stocks i.e. the 2010 flash crash.
7 Saajan Sonny Singh Sangha (ssss3@kent.ac.uk)
Figure 1: GBP-USD tick-by-tick data and daily price data ranging from 1st August to 31st August 2008 (Voice,
2012)
Directional Changes (DC) is an alternative approach based on an event-based system capable of
capturing significant points in price movements which traditional physical time methods were incapable
of. In this way, DC observes the market in respect to key events i.e. as declared by a stock price change
greater than a pre-defined threshold percentage. The data is then summarised amongst these events,
shifting towards an event-based retrospect from a traditional physical-time view. Under this framework,
a threshold θ is defined, typically expressed as the percentage change required in the stock price for an
upward/downward trend to be triggered. The fragmentation of the market will be dependent upon the
pre-defined threshold percentage value as each different threshold will produce different price
summaries. Therefore, the DC paradigm is concerned with the size of price change, with time now as a
variable factor whereas traditionally in a physical-time paradigm, time was a fixed variable i.e. daily
closing prices. This provides traders with a more useful intrinsic perspective in regards to price
movements in the market; thus, allowing them to observe high frequency volatile tick data and take
action only when ‘significant events’ have been identified, removing excess data which can more
confidently be considered as noise in comparison with traditional methods.
Previous research has shown that the current most beneficial method of forecasting in terms of
producing profitable trading strategies is via the use of a genetic algorithm; a heuristic bio-inspired
optimization algorithm developed to optimise the threshold values of DC trading strategies with the aim
of maximising profit outcome. This has been shown to be significantly effective in outperforming
traditional forecasting methods, particularly when using DC trading strategies with multiple-threshold
values, each threshold capable of producing a unique event-based series of the data provided. This has
proven to be the most effective approach identified yet with each trading decision at each data point
being made as a combination of recommendations to buy/sell/hold from each of the different eventbased
series produced; it is the weight at which each threshold’s recommendation is taken into
8 Saajan Sonny Singh Sangha (ssss3@kent.ac.uk)
consideration that is optimized by the genetic algorithm, allowing it to search for strategies which lead
to a higher profit production.
This thesis will be organised as follows: Section 2 introduces key background information such as
directional changes, multi-threshold DC trading strategies and genetic algorithms by utilising previous
literature presented in chronological order. Subsequently, Section 3 presents each of the three primary
aims of the thesis, introducing how this project involves experimentation via an existing genetic
algorithm and then developing upon said algorithm with the aim of increasing its performance in respect
to execution time and its ability to produce more profitable DC trading strategies. Section 4 describes
the methodology of the thesis, including the test data to be used, the computational resources involved
in experimentation and the experimental setup and implementation of said proposed experiments.
Section 5 presents and discusses the experiment outcomes and how this provided motivation in
developing the proposed concurrent solution; further results and benchmark’s comparing the developed
concurrent solution against the original existing genetic algorithm are then presented and analysed.
Section 6 discusses the outcome of the thesis and what conclusions can be reached with evidence to
support said claims. Finally, Section 7 concludes the thesis and presents and discusses potential
opportunities for future work.
Background & Literature Review
Directional Changes (DC)
Directional Changes was first introduced as a concept by Guillaume et al., (1997) as an alternative way
to sample & summarise data. The first applied usage of the concept of directional changes discovered
12 new empirical scaling laws with respect to the foreign exchange data series (Glattfelder, Dupuis and
Olsen, 2011). These laws established mathematical relationships amongst factors such as different
pricing movements, frequency and duration within the series; opening a space of theoretical
explanations to the market mechanisms.
This research was furthered as Dupuis and Olsen (2012) combined such scaling laws with the concept
of directional changes to produce new trading models; however, said models were utilised only to derive
statistics from potential trading opportunities and not harnessed for financial forecasting itself. Dupuis
and Olsen (2012) although successful in producing trading models based on the DC concept, did not
take advantage of the combined knowledge which can exist when utilising multiple thresholds to
produce different event-based series.
9 Saajan Sonny Singh Sangha (ssss3@kent.ac.uk)
This was followed by Aloud et al., (2012) whom were successful in utilising directional changes to
capture periodic market activities by using intrinsic time which adopts an event-based system in
contrast to physical time using a point-based system; which fails to capture significant price
movements as it maps a variety of periodic patterns with different magnitudes, thus making the flow
of physical time discontinuous (Aloud et al., 2012). The intrinsic time framework observes the time
series with regards to market events where the direction of the trend is capable of alternating; such
events are known as DC events, they can either be upturn or downturn events identified as a change in
price which exceeds a pre-defined threshold value. As seen in Figure 2 during the downward run
portion of the graph, a downturn directional change event is confirmed once a 3% threshold change in
price has been identified, this then resembles a directional change confirmation point, signifying the
start of a downward overshoot event. An upturn event is likewise identified in the same approach if a
3% threshold change is observed in the opposite direction; in this way, different threshold values will
lead to different intrinsic time summaries with one directional change event leading to a ‘tick’ one
unit forward in intrinsic time. This is beneficial as it allows the DC concept to be applied to nonhomogenous
time series without requiring any excess data transformations, whilst also allowing
multiple DC thresholds to be applied at the same time for the same tick-by-tick data.
Developing from prior research, Gypteau, Otero and Kampouridis, (2015) presented an approach which
proposed combining DC with a genetic programming algorithm named EDDIE in the aim of producing
effective trading strategies; however, were limited in their findings due to testing their approach only
across 4 datasets. The paper supported the usage of an intrinsic time scale to forecast market activity
Figure 2: Directional Changes in EUR/USD with a 3% threshold (Tsang et
al., 2016)
10 Saajan Sonny Singh Sangha (ssss3@kent.ac.uk)
and thus generate appropriate trading decisions at favourable points in the data. Gypteau, Otero and
Kampouridis, (2015) concluded the paper stating that further manipulation of the algorithm’s
parameters could result in increased profit production via production of more effective trading
strategies. In addition, as presented in Figure 3, Otero and Kampouridis identified that a clear
opportunity for improvement was to further exploit DC overshoot events as scaling laws identified by
Glattfelder, Dupuis and Olsen, (2011) demonstrate that a ‘DC event takes on average t amount of
physical time to complete, followed by an OS event that takes on average 2t’ (Gypteau, Otero and
Kampouridis, 2015).
Figure 3: The scaling law presented by Glattfelder, Dupuis and Olsen, (2011) which illustrates that a DC event
of threshold θ is followed by a OS event of threshold θ which is likely to last twice the duration of the original
DC event (Illustration courtesy of: Kampouridis and Otero, 2017)
Furthermore, to aid the interpretation of DC events, Tsang et al., (2016) introduced new trading
indicators which assist in constructing DC profiles of markets, thus allowing new ways to extract
information when recording DC events. Much research up until this point focused on the theoretical
aspects related to directional changes such as developing new indicators to extract more useful
information and establishing mathematical scaling laws to assist in future predictions.
Multi-threshold DC trading strategy
As mentioned previously Dupuis and Olsen (2012) did not take advantage of the combined knowledge
which exists when exploiting multiple DC thresholds. Previous research has demonstrated the benefits
of utilising multiple thresholds over a single threshold as smaller thresholds allow the detection of more
events and, thus, actions can be taken promptly whereas larger thresholds detect fewer events, but
provide the opportunity of taking actions when bigger price variations are observed (Kampouridis &
Otero, 2017).
In this way, Kampouridis & Otero, (2017) found that it was possible to benefit from the different
characteristics and observations of smaller and larger thresholds when combining information from
multiple thresholds into a more informed and complex trading strategy known as a ‘Multi-threshold DC
trading strategy’. By using multiple threshold values; each threshold can summarise the ‘tick’ data in
11 Saajan Sonny Singh Sangha (ssss3@kent.ac.uk)
unique ways, generating different event-based series accordingly. At each data point, it is possible for
a threshold to recommend an appropriate action to buy/hold/sell per the way the data has been
summarised; the recommendations from each threshold are then weighted against one another with the
favoured trading action being selected and executed; this process is repeated for all data points thus
producing a DC trading strategy which is evaluated based on its profit in return.
Genetic Algorithm
Kampouridis and Otero, (2017) utilised this knowledge alongside prior research in developing a genetic
algorithm referred to as ‘DC+GA’; a bio-inspired heuristic optimization algorithm that can generate
multi-threshold DC trading strategies and then optimise said strategies over many ‘generations’ in the
search for more profitable DC trading strategies. Further detailed implementation information regarding
the algorithm itself and the evolution process carried out by the genetic algorithm can be found in
‘Evolving Trading Strategies Using Directional Changes’ (Kampouridis & Otero, 2017).
The authors conducted rigorous experimentation across 255 datasets from six different currency pairs
consisting of intra-day data from the foreign exchange spot market; they identified that the proposed
approach can generate profitable trading strategies which significantly outperform traditional forms of
trading strategies such as technical analysis, buy and hold and also previous attempts of utilising DC
with genetic programming algorithms such as EDDIE (Gypteau, Otero and Kampouridis, 2015).