Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Ensemble Trend Classification in the Foreign Exchange Market Using Class Variable Fitting

12th International Conference, HAIS 2017, La Rioja, Spain, Proceedings (Springer)

  • Als Erste(r) kommentieren

Ensemble Trend Classification in the Foreign Exchange Market Using Class Variable Fitting

  1. 1. Ensemble Trend Classification in the Foreign Exchange Market Using Class Variable Fitting Andrew Kreimer, Dr. Maya Herman Department of Mathematics and Computer Science
  2. 2. Agenda ● Motivation ● Rational ● Methodology ● Implementation ● Use Case ● Conclusions ● Future Research
  3. 3. Motivation ● Multiple applications available ○ Trend Classification ○ Price Prediction ○ Market Efficiency (arbitrage, market making etc.) ● Usually lack of trading simulation (back-test is not enough) ● Usually single classifiers, no ensembles ● Single period forecasts, no dynamic range
  4. 4. Whether the asset is going up or down? Let’s apply Data Mining and find optimal periods of ups and downs
  5. 5. Rational ● Trading is complex ○ Too much data to handle ● Use Data Mining ○ Historical Data ○ Technical Analysis ○ Class Variable Fitting ○ Ensemble Classifier (classifying trends in the FX market) ● Single timeframe
  6. 6. The Idea We have profitable traders, they are the NP oracles, let’s find them
  7. 7. Methodology ● MVC (Model, View & Controller) ● Offline ○ Build models ● Online ○ Use models for trading
  8. 8. Offline ● Batch Offline Process (Daily/Weekly) ○ Spark job (Java) ○ Data Mining (WEKA) ○ Persisting the classifier (S3)
  9. 9. Online ● Online Trading Engine ○ Broker API compliance ○ Uses stored classifiers for execution
  10. 10. Data Mining Flow ● New assets introduced ● Data Mining ● Class Variable Fitting ● Best models are exposed ● Best trading strategies are exposed ● Algorithmic Trading
  11. 11. Implementation Closed source Algorithmic Trading platform (Java /MQL) The stack ● AWS based ● EMR for the Spark jobs ● Java for execution and runtime ● Python for visualization and stats
  12. 12. Data & Features ● OHLC raw data ● Technical Indicators ○ MA, CCI, RSI, etc. ● Feature Engineering ○ MA Cross ○ RSI Levels (30, 70) etc. ● One Hot Encoding
  13. 13. Data Sources ● MetaTrader 4 / 5 ● Yahoo Finance ● Quandl ● Flat files ○ Up to 1GB each
  14. 14. Class Variable Fitting Usually we have a deterministic target: Spam {Y, N}, Rain {Y, N}, Pass {Y, N}, Click {Y, N} etc. It’s not just Trend {Y, N}, it’s Trend for the next N Days {Y, N}, so we have N binary classes.
  15. 15. ZigZag Indicator Tracks price movements within specified thresholds The Rational ● Trend Following ● Multiple Thresholds ● Lagging Indicator
  16. 16. Target Variable ● Multiple periods of ZigZag indicator ○ Like saying will it rain tomorrow ○ Or will it rain within the next N days ● Instead of using concrete target, let’s find it ● Grid Search ● Heuristics Applied
  17. 17. Data Mining Ensemble of Classifiers The Rational ● Diversification ● Leveraging Weak Classifiers ● Powerful Generalization
  18. 18. Data Mining ● Ensemble of Classifiers ○ LR, RF, SGD ○ Bayes Nets, Best Parents ● Min AUC, Precision & Recall (at least 0.9, 0.95 is preferred) ● K-Fold validation, data is time-series, must be ordered!
  19. 19. Use Case ● Simulated trading for 3 months ○ MetaTrader 4 ○ Weekly batches ● Local maximum found ● Well generalized classifiers EURUSD H4, H1 (various train-test splits)
  20. 20. Results ● 985 trades ● ROI of 30% based on 35K pips profit ● Maximum drawdown of 15% ● 65% profitable shorts ● 62% profitable longs ● Average loss of 132 pips ● Average profit of 131 pips ● Profit Factor of 1.67 ● Sharpe ratio of 0.22
  21. 21. Risk Assessment ● Binomial Distribution ○ The number of losing trades in N open positions ● The law of large numbers ● High recall requires a lot of trades (instances)
  22. 22. Conclusion ● Complete Algorithmic Trading platform ● Ensemble Classification of trends ○ Finds profitable strategies (oracles) ● Many trades provide higher recall ● Trading simulation ○ Stronger than back-testing ● This method can be extrapolated to wider spectrum of time-series problems
  23. 23. We can find NP oracles for FX market trend classification!
  24. 24. Future Research ● Feature Engineering ● Wider ensemble of classifiers ● More assets (already initiated) ○ Stocks ○ ETFs ○ Cryptocurrencies ● More evaluation metrics ○ Alpha, Beta etc.
  25. 25. Thank You! Andrew Kreimer, Dr. Maya Herman ● kreimer.andrew@gmail.com ● maya@openu.ac.il

×