Spermiogenesis or Spermateleosis or metamorphosis of spermatid
EvoFIN2015
1. Generating Directional Change Based
Trading Strategies with Genetic
Programming
Jeremie Gypteau
Fernando Otero
Michael Kampouridis
2. Background & motivation
• Majority of financial forecasting tools use a physical
time scale for studying price fluctuations
Use snapshots of the market, taken at fixed intervals (e.g.
daily closing prices)
This lacks realism
Lose some significant activities
• Use intrinsic time scale
Event-based approach
Directional changes to model intrinsic time
Genetic Programming to combine different directional
change strategies
3. Directional changes (DC)
• A DC event is identified by a change in the price of a
given stock
Change is defined by a threshold value, decided by the
trader
Upturn or downturn event
• After the confirmation of a DC event, an overshoot
(OS) event follows
OS event finishes once an opposite DC event takes place
4. Directional changes
Source: Glattfelder, J., Dupuis, A., Olsen, R.: Patterns in high-frequency FX data: Discovery of 12 empirical
scaling laws. Quantitative Finance 11 (4), pp. 599-614 (2011)
5. Generating DC-based trading strategies
• A DC event is identified by a change in the price by
a given threshold value
• Different DC thresholds provide a different view of
data
Smaller thresholds allow detection of more events and
hence actions can be taken promptly
Larger thresholds detect fewer events, but provide the
opportunity of taking actions when bigger price variations
are observed
• Genetic Programming to combine the use of
different thresholds
Automatically generate expressions that produce outputs
based on multiple threshold values
6. Genetic Programming configuration
Configuration Value
Individual structure tree
Function set Boolean functions {AND, OR, NOR,
XOR, NOT}
Terminal set Randomly generated boolean
terminals representing different DC
threshold values
Tree initialisation Ramped half-and-half
Genetic operators Subtree mutation, one-point
crossover, and reproduction
Selection Tournament selection
Termination criteria Maximum number of generations
8. GP Parameters
• Fitness = cash + (stockBalance * lastPrice)
Parameter Value
Max tree depth 8
Generations 300
Population 300
Reproduction 0.01
Crossover 0.97
Mutation 0.01
Elitism 0.01
Max DC threshold 10
Min DC threshold 0
9. Experiments
• 4 datasets
2 stocks from FTSE 100 (Barclays, Marks&Spencer)
2 international indices (NASDAQ, NYSE)
• Training: 1000 days, Testing: 500 days
• Aim
Demonstrate that the paradigm of DC returns profitable
strategies
Provide evidence that the strategies generated by the GP
are more profitable than using a fixed threshold
• Fixed thresholds: 0.02, 0.05, 0.10, 0.20, 0.50, 1.0, 1.50,
2.00, 2.50, 3.00, 4.00, 4.50, 5.00
10. Test results
Dataset GP Fixed DC
Barclays +4.67% -14.07%
Marks & Spencer +0.55% -0.33%
NASDAQ +4.93% +1.78%
NYSE +7.31% +4.80
11. Summary
• Intrinsic vs physical time
• DC as an alternative
• Positive results
Positive returns in all 4 stocks tested
Not always the case for Fixed DC results
Overall returns for GP+DC >> Fixed DC
• Future research directions
Explore different parameters settings, e.g. optimise the
trading amount
Move to FX datasets, where several scaling laws have
been observed, and could thus increase the profit margin