SlideShare a Scribd company logo
1 of 12
Generating Directional Change Based
Trading Strategies with Genetic
Programming
Jeremie Gypteau
Fernando Otero
Michael Kampouridis
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
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
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)
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
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
Sample GP tree
Nor
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
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
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
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
Questions?
• Please email Michael Kampouridis at:
 M.Kampouridis ([at] kent [dot] ac [dot] uk)

More Related Content

Similar to EvoFIN2015

Prediction the stock market with genetic programming
Prediction the stock market with genetic programmingPrediction the stock market with genetic programming
Prediction the stock market with genetic programmingDavid Moskowitz, Ph.D.
 
Big Data Day LA 2016/ Data Science Track - Decision Making and Lambda Archite...
Big Data Day LA 2016/ Data Science Track - Decision Making and Lambda Archite...Big Data Day LA 2016/ Data Science Track - Decision Making and Lambda Archite...
Big Data Day LA 2016/ Data Science Track - Decision Making and Lambda Archite...Data Con LA
 
Relative Value Volatility & Dynamic Hedging
Relative Value Volatility & Dynamic HedgingRelative Value Volatility & Dynamic Hedging
Relative Value Volatility & Dynamic HedgingDavid Hamilton
 
RMIT Vietnam - Risk Management - Options
RMIT Vietnam - Risk Management - OptionsRMIT Vietnam - Risk Management - Options
RMIT Vietnam - Risk Management - OptionsTai Tran
 
Churn Modeling-For-Mobile-Telecommunications
Churn Modeling-For-Mobile-Telecommunications Churn Modeling-For-Mobile-Telecommunications
Churn Modeling-For-Mobile-Telecommunications Salford Systems
 
Capacity planning ppt @ bec doms
Capacity planning ppt @ bec domsCapacity planning ppt @ bec doms
Capacity planning ppt @ bec domsBabasab Patil
 
Stock-market-prediction.pptx
Stock-market-prediction.pptxStock-market-prediction.pptx
Stock-market-prediction.pptxrikritiKoirala1
 
Python and the Holy Grail of Causal Inference - Dennis Ramondt, Huib Keemink
Python and the Holy Grail of Causal Inference - Dennis Ramondt, Huib KeeminkPython and the Holy Grail of Causal Inference - Dennis Ramondt, Huib Keemink
Python and the Holy Grail of Causal Inference - Dennis Ramondt, Huib KeeminkPyData
 
Philip Genetic Programming In Statistical Arbitrage
Philip Genetic Programming In Statistical ArbitragePhilip Genetic Programming In Statistical Arbitrage
Philip Genetic Programming In Statistical ArbitrageaiQUANT
 
2. Module II (1) FRM.pdf
2. Module II (1) FRM.pdf2. Module II (1) FRM.pdf
2. Module II (1) FRM.pdfItzGA
 
Churn Modeling For Mobile Telecommunications
Churn Modeling For Mobile TelecommunicationsChurn Modeling For Mobile Telecommunications
Churn Modeling For Mobile TelecommunicationsSalford Systems
 
Predicting Stock Market Price Using Support Vector Regression
Predicting Stock Market Price Using Support Vector RegressionPredicting Stock Market Price Using Support Vector Regression
Predicting Stock Market Price Using Support Vector RegressionChittagong Independent University
 
Data science neural network project life cycle
Data science neural network project life cycleData science neural network project life cycle
Data science neural network project life cycleVincent Pommier
 
Informs presentation new ppt
Informs presentation new pptInforms presentation new ppt
Informs presentation new pptSalford Systems
 
Variational AutoEncoders for Dimensionality Reduction in Finance
Variational AutoEncoders for Dimensionality Reduction in FinanceVariational AutoEncoders for Dimensionality Reduction in Finance
Variational AutoEncoders for Dimensionality Reduction in FinanceHumberto Ribeiro de Souza
 

Similar to EvoFIN2015 (20)

Prediction the stock market with genetic programming
Prediction the stock market with genetic programmingPrediction the stock market with genetic programming
Prediction the stock market with genetic programming
 
Big Data Day LA 2016/ Data Science Track - Decision Making and Lambda Archite...
Big Data Day LA 2016/ Data Science Track - Decision Making and Lambda Archite...Big Data Day LA 2016/ Data Science Track - Decision Making and Lambda Archite...
Big Data Day LA 2016/ Data Science Track - Decision Making and Lambda Archite...
 
Relative Value Volatility & Dynamic Hedging
Relative Value Volatility & Dynamic HedgingRelative Value Volatility & Dynamic Hedging
Relative Value Volatility & Dynamic Hedging
 
presentation
presentationpresentation
presentation
 
RMIT Vietnam - Risk Management - Options
RMIT Vietnam - Risk Management - OptionsRMIT Vietnam - Risk Management - Options
RMIT Vietnam - Risk Management - Options
 
Churn Modeling-For-Mobile-Telecommunications
Churn Modeling-For-Mobile-Telecommunications Churn Modeling-For-Mobile-Telecommunications
Churn Modeling-For-Mobile-Telecommunications
 
Case study of s&p 500
Case study of s&p 500Case study of s&p 500
Case study of s&p 500
 
Capacity planning ppt @ bec doms
Capacity planning ppt @ bec domsCapacity planning ppt @ bec doms
Capacity planning ppt @ bec doms
 
Cmt learning objective 36 case study of s&p 500
Cmt learning objective 36   case study of s&p 500Cmt learning objective 36   case study of s&p 500
Cmt learning objective 36 case study of s&p 500
 
Stock-market-prediction.pptx
Stock-market-prediction.pptxStock-market-prediction.pptx
Stock-market-prediction.pptx
 
Python and the Holy Grail of Causal Inference - Dennis Ramondt, Huib Keemink
Python and the Holy Grail of Causal Inference - Dennis Ramondt, Huib KeeminkPython and the Holy Grail of Causal Inference - Dennis Ramondt, Huib Keemink
Python and the Holy Grail of Causal Inference - Dennis Ramondt, Huib Keemink
 
Philip Genetic Programming In Statistical Arbitrage
Philip Genetic Programming In Statistical ArbitragePhilip Genetic Programming In Statistical Arbitrage
Philip Genetic Programming In Statistical Arbitrage
 
2. Module II (1) FRM.pdf
2. Module II (1) FRM.pdf2. Module II (1) FRM.pdf
2. Module II (1) FRM.pdf
 
Churn Modeling For Mobile Telecommunications
Churn Modeling For Mobile TelecommunicationsChurn Modeling For Mobile Telecommunications
Churn Modeling For Mobile Telecommunications
 
Predicting Stock Market Price Using Support Vector Regression
Predicting Stock Market Price Using Support Vector RegressionPredicting Stock Market Price Using Support Vector Regression
Predicting Stock Market Price Using Support Vector Regression
 
Data science neural network project life cycle
Data science neural network project life cycleData science neural network project life cycle
Data science neural network project life cycle
 
Informs presentation new ppt
Informs presentation new pptInforms presentation new ppt
Informs presentation new ppt
 
Training Optimal Models
Training Optimal ModelsTraining Optimal Models
Training Optimal Models
 
Coverage dallas june20-2006
Coverage dallas june20-2006Coverage dallas june20-2006
Coverage dallas june20-2006
 
Variational AutoEncoders for Dimensionality Reduction in Finance
Variational AutoEncoders for Dimensionality Reduction in FinanceVariational AutoEncoders for Dimensionality Reduction in Finance
Variational AutoEncoders for Dimensionality Reduction in Finance
 

Recently uploaded

Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfSumit Kumar yadav
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCEPRINCE C P
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsSérgio Sacani
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)Areesha Ahmad
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfSumit Kumar yadav
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPirithiRaju
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxgindu3009
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsAArockiyaNisha
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)Areesha Ahmad
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhousejana861314
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bSérgio Sacani
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...Sérgio Sacani
 
Broad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptxBroad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptxjana861314
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksSérgio Sacani
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)PraveenaKalaiselvan1
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSarthak Sekhar Mondal
 

Recently uploaded (20)

Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdf
 
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCESTERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
STERILITY TESTING OF PHARMACEUTICALS ppt by DR.C.P.PRINCE
 
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroidsHubble Asteroid Hunter III. Physical properties of newly found asteroids
Hubble Asteroid Hunter III. Physical properties of newly found asteroids
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdf
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdfPests of cotton_Sucking_Pests_Dr.UPR.pdf
Pests of cotton_Sucking_Pests_Dr.UPR.pdf
 
Presentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptxPresentation Vikram Lander by Vedansh Gupta.pptx
Presentation Vikram Lander by Vedansh Gupta.pptx
 
Natural Polymer Based Nanomaterials
Natural Polymer Based NanomaterialsNatural Polymer Based Nanomaterials
Natural Polymer Based Nanomaterials
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)
 
Orientation, design and principles of polyhouse
Orientation, design and principles of polyhouseOrientation, design and principles of polyhouse
Orientation, design and principles of polyhouse
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
Broad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptxBroad bean, Lima Bean, Jack bean, Ullucus.pptx
Broad bean, Lima Bean, Jack bean, Ullucus.pptx
 
Formation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disksFormation of low mass protostars and their circumstellar disks
Formation of low mass protostars and their circumstellar disks
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 
Spermiogenesis or Spermateleosis or metamorphosis of spermatid
Spermiogenesis or Spermateleosis or metamorphosis of spermatidSpermiogenesis or Spermateleosis or metamorphosis of spermatid
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
  • 12. Questions? • Please email Michael Kampouridis at:  M.Kampouridis ([at] kent [dot] ac [dot] uk)