Machine Learning in FX: Going after a large scale implementation to imitate a trader’s brain

There are many ways to build successful machine learning algorithms to trade the Forex market. In the past I  have used neural networks, linear maps, linear regressions, support vector machines and random forests to obtain profitable results for different FX symbols but the main thing that all my approaches have had in common is the fact that they are mostly independent and limited in scope to improving and changing as time goes by. The way in which I have been building machine learning algorithms makes their input structure mostly “fixed in place” and algorithm parameters constant as a function of time, therefore preventing the evolution of the algorithms outside of their initial modeling scope and forcing me to adapt a stance at machine learning systems that is very similar to the one I take for data-mined systems (measure mining bias, discard according to worst case scenarios, etc).

 

brain1

 

This way of looking at machine learning is common to many traders I work with and can be used successfully (for example you can read a thread where a fellow trader – AlgoTraderJo – has been posting his research on the subject at ForexFactory using tools from our community) but I believe that a different and potentially better approach can be made. Today I want to share with you some of my thoughts around machine learning and how I have fully reevaluated the way in which I approach the subject. We will talk about how this potentially improves the quest for a better ML approach in order to to reach a state similar to what a “profitable trader’s brain” would optimally do. I will go through the main aspects of the architecture I propose and how this structure leads to a decision making process that can be compared to that of a human trader.

I believe that to build a truly amazing machine learning approach to trading we must first answer a few basic questions. What abilities make human brain decisions different than those made by a computer system in trading? What characteristics does a computer system need to have in order to be able to rival the ability a successful human has to trade? How does a human adapt to changes in trading? What can we do to achieve these abilities? What can we do to be even better at them?

Selection_086

As I see it the human brain’s main power is the ability to achieve a large degree of adaptability to changes in information. The ability to learn from mistakes and successes and make changes to improve the decision making process according to a desired outcome. A human brain can consider many different decisions at the same time and reach a conclusion that accounts for previous experience and currently available data. In that way a human also learns from any new inputs and considers that as well when making the next decision. Through this analysis any machine learning approach that seeks to rival the pinnacle of human ability in trading must be able to achieve two main things: learn from experience and consider multiple decision pathways.

Such a machine learning approach must also learn in a manner similar to how a human learns, it must learn from its own experience and make changes as new experiences are added. If it did something that did not work in the past then it must be less likely to do it in the future in the same way that if it did something successfully the probability to repeat it should increase. But how do we achieve all these desired characteristics?

I think this can be done in practice by using a combination of machine learning models focused on predicting maximum excursion values at different time horizons and models focused on interpreting this information. When a new bar comes in our machine learning models draw predictions for the maximum long and short excursions at different time horizons. This information is then used by a “trade profile builder” which has its own set of models that use trade profit/loss predictions to also gauge what the best approaches for trade construction might be (what SL/TP targets to use, what lot sizing, etc). After a trade finishes all trade constructor models are updated with all real trade profile information (what SL and TP values would have given what profit with those excursion predictions, etc) and all real predictor values for that bar are also updated. Using the real and predicted values for excursions we can also build model scores that can be used to evaluate model quality. In this way models below a certain score can also be discarded, as we deem their predictions to no longer be within the desired level of accuracy.

Selection_087

In analogy since we have a database containing all bar inputs and excursion values we can in parallel also construct an assortment of new models using random combinations of inputs, ML algorithms and model parameters to see if they are worth adding to the database in the construction of new predictions. Models would be evaluated in the same manner as models within the database are. This means that  models are constantly retrained before testing for each new prediction within the DB instead of training over the whole set and then evaluating prediction accuracy (which opens up the way to much worse data mining bias). If a model score in the end is high enough then it is considered viable and added to the trading system so that the profiling models can use this information for trading. In analogy we can do the same thing for the construction of trade profiling models.

Selection_089

 

In this way you have a trading system that behaves in a very complex manner. You have a constant testing and addition of new models based on historical data, you have a constant evaluation of new models that come into play and you have a trade profile construction module that is subject to the same process. In essence I believe that this has the potential to behave in a manner similar to how a successful trader’s brain optimally would behave like. The overall system is able to change the models it uses for price prediction and trade construction as new data becomes available. What you have here is a set of models that function as non-lagging indicators for future price action “the trading models” and another set of models that essentially function as trading systems, telling us where to trade and what information to use for actual trading, “the profile building models”.

The above implementation requires an approach from zero using extensive databases and new approaches for machine learning, so it is not an easy task. Could such an approach be successful? We’ll find out when I finish the above implementation :o)

If you would like to learn more about the construction of algorithmic systems and how we have developed machine learning strategies at Asirikuy please consider joining Asirikuy.com, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading.

Print Friendly
You can 1 Comment on Machine Learning in FX: Going after a large scale implementation to imitate a trader’s brain, or trackback from your own site.
Subscribe to RSS Feed Follow me on Twitter!