Learn Python, R And Machine Learning For Algorithmic Trading

The age of algorithms is about to start. This is the century of algorithms. Race is on to write better and better algorithms. As retail traders we are pitted against big banks, hedge funds and big investors who have the resources to hire Phds in mathematics and finance. These people are known as Quants. Their job is to model the market and make predictions. Watch the video below.

In the past few posts we  have been talking exclusively about R and how to connect MT4 with R. The problem with MT4 and its programming language MQL4 is that it cannot implement any of the machine learning algorithms. MQL4 is a very basic language that can be considered a subset of C++. MQL4 has some inherent limitations when it comes to doing data analysis. It is simply not suitable for statistical analysis. No one has tried to develop the statistical data analysis libraries that can be used on it. On the other hand, R is also an open source software that is maintained by the top class academics across the world. Over the years these research people have developed more than 2000 packages that can implement almost any machine learning and artificial algorithms on it. This makes R very powerful for data analysis and prediction. If we could connect R and MT4 we will be solving our major problems in doing data analysis and predictions. R and MT4 has been successfully connected. Did you read the post on how to connect R with MT4? In this post we provide with you the files that you can install on MT4 and connect R with MT4.

Did you download the Autoregression R indicator? Now to tell you the truth this is not a good indicator. Autoregression is not a good algorithm when it comes to predicting financial time series like the GBPUSD, EURUSD price time series. The idea of giving you this indicator was to make you familiar with connecting R and MT4. We are working on developing a few machine learning artificial intelligence indicators using R. The algorithms that are most useful for us as traders are neural networks, support vector machines, wavelets, genetic algorithm, Kalman filter, particle filter, decision trees and fuzzy logic. Deep learning is another emerging subject that looks promising. We have almost succeeded in developing our first machine learning indicators. Now this is what we plan to do. We want to test this indicator thoroughly in the next few weeks. Once we have tested it in live trading and we believe we have developed a good indicator, we will develop an expert advisor also popularly known as a forex robot based on this indicator. You can read the post on how to develop an artificial intelligence machine learning third generation indicator.

We cannot tell you the exact details of the indicator. What we can tell you is how this indicator is working right now. We download the csv file from MT4. Then we read the csv file into R and run the R script that makes predictions about the high, low and close price for the different timeframes. We are more focused on weekly and the daily. The same algorithm can be used on lower timeframes like M5, M15, M30, H1 and H4. We plan to develop a binary options indicator using this machine learning algorithm. So learning R will help you implement the machine learning algorithms that can find predictive patterns in the data.

Now Python is another scripting language that is quickly becoming a powerful machine learning and data analysis language. Lot of libraries are also available in Python that can implement most of the machine learning and data science algorithms. Again when you develop machine learning indicators using Python, you will have to develop a dll file that connects Python interpreter with MT4. If you are using higher timeframes like the daily and weekly for doing the data analysis, you can skip this problem by simply downloading the csv files from MT4 and then using Pandas in Python to read that csv and doing the data analysis.

We believe the days of traditional technical analysis are almost over. Have you ever tried to trade solely based on MACD, RSI or that matter Stochastic? What was the winrate? In most cases winrate is not higher than 50%. Most of the signals generated by these indicators are false. This means more losing trades. What you need is an edge that filters out the false signals using machine learning algorithms. The idea is to combine manual trading with algorithmic trading to develop an edge.

Now if you have never learned these languages you might be wondering what’s the need. We were manual traders who had never learned any language. We learned it. It is not difficult. Of course you will need to work. But let us assure you that in a few months you will start understanding a lot of algorithms and how to code them. You will not ask a very important question: Where you can learn Python, R and Machine Learning? Coursera offer FREE Online Course from Top Universities in the world. There are a number of courses on Python, R as well as Machine Learning that are being offered FREE. You can take these courses and get started.