During the past few months I have started a series of posts called “Neural Networks in Trading” in which I have talked about the different aspects of practical neural network development for automated trading strategies. After describing some of the generalities of neural networks and the proper evaluation of systems developed with them, it is now time to start talking about practical examples and their applications in algorithmic Forex trading. On today’s post I will share with you some of my advances in this regard which have been collected within an EA I have decided to call Sunku – meaning door in Quechua – as it is the “door” to a whole new world of development dealing with NN based systems.
The road in the development of likely long term profitable systems using neural networks is not an easy or short one. It has been evident during the past few months of development that neural networks are not very accurate predictors of actual future market values (with the best predictions of daily closes having an average standard deviation of +/- 50 pips) and even when prediction are accurate it becomes difficult to derive strategies from them since you must not only take into account how frequently you’re wrong or right but “how right” and “how wrong” you are in average.
The building of a system that yields a ten year profitable back-test using Neural Networks is not at all trivial. There are several problems which need to be overcome which start mainly with the fact that neural networks simply yield some predictors which must be molded into some type of system with a positive mathematical expectancy. Carrying out several ME analysis of the predictors within a neural network it becomes evident that they carry a certain edge which can be exploited successfully if adequate exit and money management strategies are used. Nonetheless – and I will leave this for a full future post – it becomes evident that certain currency pairs are more inefficient towards neural networks (more easily modeled) than others.
Another important milestone in the creation of an MT4 NN strategy was the implementation of an NN dll which allowed me to perform network training and running while running backtests. This has allowed me to properly evaluate my NN strategies since I can simply make the EA retrain the network and rerun it every X number of bars, right during the backtest. My first successful attempts have used information derived from the past 100 bars, retraining every 5 bars. This means that Sunku is able to automatically adapt to changes in market conditions as it “rewires” itself every new week. This is – as a matter of fact – the first EA we will have which will have an absolutely automatic self-adaptive mechanism to “learn” from the market, the first machine learning experiment within Asirikuy.
The next significant hurdle in the way appeared when I considered the reproducibility of the back-tests carried out with Sunku. As the EA trains its neural network based on random weights, every new backtest -although profitable – was very different from the backtests executed just before it. This is because every training process gives new results which are similar – but different – from the results generated before. In this regard it became clear that any live test was going to be different and problems due to this matter would arise, having random worst case scenarios is -after all – something we do NOT want.
In order to solve this problem I resorted to the idea of neural network committees. Sunku now uses 5 different neural networks and only executes trades if they all agree in what is going to happen. The EA therefore has 5 instead of 1 “brain” which are retrained every week in a separate fashion. Since results that are “good” tend to converge between networks not only was the EA able to have much more reproducible back-tests but the profitability within the tests was increased by nearly 50%. In the end Sunku became a very cool strategy with self-adaptive capabilities and 11 year profitable backtests. Surprisingly — although this will also cover another post – on the pairs where it works Sunky can succeed on 4H and 1H time frames, showing that predictability of certain pairs also falls onto these lower time frames.
Now it is important to understand that Sunku is NO holy grail. The EA achieves modest average compounded yearly profit to maximum draw down ratios at the moment and has long and deep draw down periods just as ANY other likely long term profitable trading system. However Sunku has the advantage of being inherently more robust since it is able to have a level of plasticity other systems are simply not able to achieve due to the fact that its entry logic (the mechanism used to make a decision to Buy/Sell) adapts every week towards what has happened within the past 100 days. Sometimes this is very successful and sometimes it is not but the EA is continuously “learning” and evolving to capture what the market has to offer.
Certainly a few months will pass before this EA is released into Asirikuy as I have yet to test many new ideas and to refine current ones. However this is in fact a demonstration that likely long term profitable self-adaptive systems are possible and that such an implementation can be made on the MT4 platform. In the not so distant future Asirikuy members will have a very powerful system with the ability to adapt to what happens on the market with the capability to morph every week as new challenges appear. Through the next few days, weeks and months I will share with you more about my experience with Sunku and what it has been able to achieve.
If you would like to learn more about automated trading and how you too can learn to develop trading strategies with robust and sound trading principles 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)