Home Markets Prediction in FX markets using Machine Learning

Prediction in FX markets using Machine Learning

Prediction in FX markets using Machine Learning
by admin

Machine Learning is a magic word that has invaded to our lives and it seems that most people consider it as a magic solution that will resolve all the issues of the humanity.

Same happens with the trading community: a large number of scientific papers have been released recently regarding the ability of machine learning to predict the markets. Before we give our opinion about machine learning and financial markets, let’s present some basics and fundamentals of machine learning.


Machine learning has nothing to do with engines, pistons and steam. Machine learning is an application of Artificial Intelligence where a system can learn and improve the knowledge and the experience of the past without being programmed explicitly. All of us gather information and experiences from the growing and living environment and we use it to distinguish patterns and behaviours so we can act better. Nobody has to tell us that we should not walk in the rain because if we have experienced it some times and we got the flu, we know that we should avoid it. Same way, most of us met a new word in our vocabulary that we don’t understand but we can comprehend it from the whole meaning of a sentence. Machine learning algorithms, more or less, work at the same way: they make better future decisions based on the knowledge and the patterns of the past.

Machine learning algorithms are divided in many categories, we will present the two main categories according to the output:

  1. Regression – numerical prediction of a quantity. If this quantity is time based we call it a timeseries prediction (for example, daily temperature prediction based on temperature measures of the past)
  2. Classification – prediction of a class or a category of an underlying example (for example, face recognition)

If we want to apply all the above to the financial markets industry, the questions are very strict: can we predict the markets? If yes, can we apply the regression machine learning algorithms or the classification ones? Well there’s no safe answer. We don’t know what will happen in the future if the technology and mathematics provide us new tools and potentials. There’s something more important though: Humanity feeds the world web with data with an exponential rate. Billions of new data appear every day and the scientific community tends to believe that the quantity and the quality of data is more preferable than complex algorithms. We agree with this opinion…if we want to learn a foreign language, the best method is to receive the basic knowledge and the to expose ourselves to speak with native speakers. It will produce better learning results than the method of studying everything about the language and then trying to talk with native speakers. At least, there are people that have learnt a foreign language by living in another country without ever opening a book.

Let’s get back to the machine learning and financial markets. Our opinion is that we cannot predict the markets numerically. There’s a huge amount of noise and millions of factors that define and influence the price of an asset. With classification machine learning algorithms, things are better. We can create two classes UP/DOWN, LONG/SHORT, BULL/BEAR…whatever you prefer and we can apply classification algorithms. In other words, if we cannot predict the price of an asset we can try to predict its trend. Since we know the trend with a certain and quantified probability, there are experienced and mature traders that can take advantage of it making a lot of profit. Even better, we can use automated strategies that will remove all the discretionary disadvantages of manual trading. The problem then is translated to the simple sentence: since we know the market direction, what is the optimum entry and exit point.

Machine learning has also another serious aspect which is called features selection. It means that we should feed a machine learning algorithm with the correct features in order to achieve better results. For example. If we want to learn a foreign language we should use vocabulary, grammar, spelling and idioms but if we want to learn a programming language it’s obvious that these features are wrong. So, the architects and the developers of a machine learning system for the financial markets must have deep knowledge of the trading industry in order to select the correct and efficient features.

Of course, tones of other issues should be resolved like overfitting but this article has no intention to provide a machine learning tutorial.

Leave a Reply