Taking a big step in machine learning: Profitable historical results across multiple Forex pairs

In the past I have been able to use machine learning to create profitable trading systems successfully, this includes my Neural Network implementations (which generated the Sunqu, Tapuy and Paqarin strategies, later building the AsirikuyBrain) as well as my attempts at linear classification and other types of algorithms. However, one of the things that all of these developments have in common is that they have traded on EUR/USD daily data and have failed to generate decent results across other pairs and/or time frames. This means that although I have tackled this particular pair/timeframe successfully (several of these systems have been traded live with profitable outcomes) I still hadn’t been able to develop anything for other instruments. On today’s post I am going to talk about one of my latest developments (in big part due to an Asirikuy member I will be mentioning later on) which has allowed me to achieve profitable machine learning results across other pairs besides the EUR/USD. Note that all back-testing results showed are non-compound (so that they can be easily judged by linearity).


2014-03-21_7-55-52

The fact that machine learning techniques seem to be so “easy” to develop on the EUR/USD daily, yet so hard to develop on other pairs on the same timeframe has always bugged me. Why is the EUR/USD daily so special, that previous data seems to easily predict future daily bar outcomes while in other pairs this simply does not work? The answer seems to be this exact same point of view — what I am trying to predict. Fabio – a member of our community – pointed to me that it would be interesting to attempt to classify whether a certain trade outcome would be successful, rather than trying to classify simply whether the next bar would be “bullish or bearish”. Predicting whether a certain trade entry would be successful is an interesting route, because you’re trying to predict whether your actual trade within some exit boundaries will reach a profit or loss, rather than whether the overall directionality will be for or against you.

When implementing the above idea in F4, I saw that not all trade outcome predictions were equally successful, while predicting big edges didn’t work at all (for example attempting to predict where a 1:2 risk to reward trade would be successful), predicting smaller edges worked much better. Different algorithms also gave markedly different results, while linear classifiers were extremely dependent on the feed data (changed significantly between my two FX data sets), Support Vector Machines (SVM) gave me the best overall results with reduced feed dependency and improved profit to drawdown characteristics. Simple mean keltner clustering techniques also gave interesting results, although the profitability was reduced compared with the SVM. As in all my machine learning implementations, training is done on each new daily bar using the past X bars and therefore the machine learning technique constantly retrains through the whole back-testing period.

2014-03-21_7-55-07


Interestingly this technique achieves profitable results (25 year back-tests) across all 4 Forex majors (same settings), with particularly good results on the EUR/USD and GBP/USD and worse but still profitable results on the USD/CHF and the USD/JPY. The ability to predict outcomes seems to be lost most significantly on the USD/JPY, where there is a significantly long period (about 10 years) where the strategy is unable to achieve any significant level of success. I would also like to point out that the current machine learning test uses just a single machine learning instance and I haven’t attempted to increase profitability by building committees or such other “tricks” that might help improve and smooth results when using machine learning techniques. In this case trying different trade range predictions within a committee or even only putting SVM and mean Keltner techniques to work together might significantly improve the results.

For me the fact that this technique has finally “broken the multi-pair barrier” has been quite significant as it reveals something fundamental about using machine learning which, up until now, I seem to have missed. This also reinforces the fact that output selections are absolutely critical when developing machine learning strategies as attempting to predict the wrong outputs can easily lead to unprofitable techniques (as it happened to me when attempting to create ML strategies on other symbols). Choosing outputs that are meaningful for trading but still predictable within a good accuracy, leads to the development of more successful machine learning strategies. In this case in particular, changing the focus to a prediction that had direct implications in trade profitability had a good impact.

2014-03-21_7-52-11


Although the results up until now are quantitatively nothing to “party about”, the fact that there is now a road open towards developing profitable ML strategies that might work across the board (not just only on one pair) gives me confidence in the fact that I am walking the correct path (thanks to Fabio for his suggestions). After reaching this milestone my goal now is to polish and study this machine learning implementations to find better predictors and improve the results on non-EURUSD pairs, my end-goal would be to have a machine learning strategy that can deliver highly linear historical results (alike the AsirikuyBrain) across at least the 4 majors (hopefully even more pairs) so that I can have a source of diversification that is constantly being adapted to new market conditions.

If you would like to learn more about machine learning strategies and how you too can easily build linear classifiers, random forests, keltner mean clustering, neural network and SVM strategies in F4  please consider joining Asirikuy.com, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading in general . I hope you enjoyed this article ! :o)

Print Friendly, PDF & Email
You can leave a response, or trackback from your own site.

7 Responses to “Taking a big step in machine learning: Profitable historical results across multiple Forex pairs”

  1. Bob says:

    “The fact that machine learning techniques seem to be so “easy” to develop on the EUR/USD daily, yet so hard to develop on other pairs on the same timeframe has always bugged me.”

    Have you paid exceptional attention to that pair maybe? If this si the cases, the ease is due to DMB (in the general sense of the term, i.e. constantly trying along the same lines).

    • admin says:

      Hi Bob,

      Thanks for commenting :o) I doubt it. If anything I have paid much more attention to machine learning on the other pairs (particularly the USDJPY) after developing the first machine learning techniques that worked on the EURUSD, however I haven’t been able to get anything nearly as profitable on the USDJPY. Furthermore, trying randomly chosen predictors with several types of machine learning algorithm has much more success on the EURUSD than on the other pairs (where almost nothing works). Right now I think that the issue relates more to the type of outputs being used, as I discussed in this article. However, it’s definitely not because I have paid more attention to the EURUSD in machine learning (it may only seem this way because I have only been successful on this pair using ML). Thanks again for writing,

      Best Regards,

      Daniel

  2. Fabio says:

    Hallo Daniel,

    thank you for the acknowledgment. I follow with interest your developments from within the asirikuy community.
    As you know I conceived the idea in a quite different context than machine learning, and I have in mind to exploit it in very different ways, but seeing that it was a promising concept also in your line of research is an encouraging sign overall.

    All the best

    Fabio

  3. Bob says:

    ” doubt it. If anything I have paid much more attention to machine learning on the other pairs (particularly the USDJPY) after developing the first machine learning techniques that worked on the EURUSD, ”

    hmm… You say “after …EURUSD”. Maybe if you started with USDJPY first that would be more easier. have you considered the possibility of a your data-mining techniques are better suited to EURUSD and you developed them with that pair in mind?

    I am puzzled by some of your statements from time to time and now came this one about systems being hard to develop on other pairs. For example, my best systems are in USDCHF and USDJPY. I never paid too much attention to EURUSD.

  4. Alex says:

    Hello Daniel,

    may I ask you to clarify a little bit on “Predicting whether a certain trade entry would be successful”. Do you do something like the following steps?
    – every day you collect past X bars and use them as predictors
    – for N exit strategies you train SVM based on last T periods
    – if the current day has a probability of successful trade greater then P you go long/short dependent on a given exit strategy
    – if more than one high probability successful trades are found choose one with highest probability
    is it like this? Do you intervene to the open trades in case of trading outcome contradiction or let them exit based on the initial plan?

    Kind regards,
    Alex

    • admin says:

      Hi Alex,

      Thanks for writing :o) I prefer to keep a detailed explanation about this machine learning technique within Asirikuy. If you’re a member feel free to ask within the forum there. Thanks again for writing,

      Best Regards,

      Daniel

  5. […] frames (below the daily). Although I have made some progress related to multi-currency systems (see this post), the creation of lower time frame systems has always been difficult due to both the added […]

Leave a Reply

WordPress › Error

There has been a critical error on this website.

Learn more about troubleshooting WordPress.