There are many options to build the logic of a trading strategy, in Asirikuy we have used everything from traditional manually derived logic sets to sophisticated trading algorithms derived from genetics and neural networks (NN systems still to be released). One of the things I have always wanted to do ever since I started trading is to build a strategy which could imitate the way in which a human trader “weights” different aspects of the market. I wanted to program a strategy which could use a little bit of the MACD cross and a little bit of the RSI to take its decisions, a strategy which could take into account 20 or 30 different aspects of the market and use them successfully to achieve long term profitability. Such a strategy would not only allow us to see what different contributing factors are more important on different pairs but it would certainly reveal to us a lot of information regarding what variables are highly correlated and which one is not. On today’s post I am going to talk to you about how I built such a strategy and why it will be a very important addition to the Asirikuy community.
The truth is that there are many different factors that may hold predictive power within a trading instrument and getting a combined perception from all of them seems to be a very efficient way to trade successfully. For example when you see a profitable manual trader taking decisions there is usually a weighing-in process – even if it’s a subconscious one – where the trade gauges different contributing factors in order to make a decision. The trader may consider that the instrument is near support, within an uptrend and on a low RSI to make a choice regarding if, how and when to trade. The question I decided to ask myself was, can I make a computer do something even slightly similar?
In order to make a computer “weight” different factors at the time of making trading decisions the easiest implementation is to consider a “score tactic”. I gave the program 20 different conditions which could be assigned a +1, 0 or -1 value depending on a given threshold reached within them. For example a criterion I gave the program was a MACD histogram line. If the MACD is above zero it is given a score of +1, below zero a score of -1 and if it is zero it receives no score. Now the key to make the computer able to calculate weights is to give each one of these scores a “weighting factor” which it is able to change in order to make one factor more contributing than the other. On each bar all the score values are added (multiplied by their respective weights) and if a certain positive or negative threshold is reached a long or a short is entered.
In the end what we have is a strategy which can take into account many different market factors in different ways according to the weight factors you give it. In its simplest form – in which you manually enter the weight factors as external variables – the system achieves quite good results on almost all currency pairs, something which makes it a very powerful strategy. By doing appropriate optimization procedures and maintaining a decent out-of-sample window you can in fact obtain very good results – from a statistical perspective – on many pairs. An added advantage is that you can also use various time frames and obtain good results on them as well. The criteria used by the program also belong to different time frames and trading characteristics (directionality, momentum, volatility, etc) allowing it to weight different aspects of market conditions and therefore follow short, medium and long term trends accurately depending on the time frame. Although the program is much simpler than Coatl (our Asirikuy genetic framework) it achieves results which are almost as flexible.
Now you may think that this is very good on its own (and it is in fact good!) but the best thing about this strategy type is that it gives us the perfect set of variables to use a neural network. My idea going forward is to implement a neural network framework within the strategy so that it can take decisions based on a given set of training results. The framework may start with weights obtained from an optimization of a “one month” window and then from there the neural network will iteratively retrain itself (every month or two) and assign new weights every month according to the obtained results. The idea is that the strategy acts like what the NN “sees” and using the obtained trading results the neural network can then attempt to predict which variable weights might have the best outcomes going forward. This imitates the functionality of a manual human trader very well, the NN considers different variables and according to previous experience chooses new ones that may be better. It is what I would call a powerful and almost ideal trading strategy where the logic is transparent (you know exactly what is behind it) but parameters are controlled by experience. Will this approach be successful ? Well stay tuned to find out!
If you would like to learn more about automated trading and how you too can increase your chances of success through real education and knowledge 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)