A few weeks ago I wrote a post about Sunqu, my first prototype for a Neural Network EA for Asirikuy. On this post I described some of the general aspects of this first EA and some of its initial achievements. Today I am going to talk a little bit more about how the EA works and what we can find out about it through the way in which it is trading. During the following few paragraphs I am going to describe how Sunqu seems to be trading and what important information this generates about how the “brain” of an NN implementation tackles the problem of Forex trading. I will also highlight some of the things I have done to improve Sunqu and how this has led to a more than doubling of the system’s performance.
Sunqu is my first attempt at building a NN system which completely adapts to changing market conditions. An EA which – by definition – requires no optimization as its entry and exit logic algorithms are continuously built against a moving window of market data. Sunqu currently works on the past 150 days of data and uses them to build trading logic which will be used during the next 5 days. This means that the EA has a totally new set of logic every week and therefore maintains a “fresh” perspective on how market conditions are evolving.
After getting some profitable results with Sunqu I thought it was interesting to take a look into how it was trading to attempt to derive some fresh pointers on how the system was attempting to tackle the market. Although we cannot know exactly how this is done – as NN systems are black boxes by definition – we can get an idea of what the system is reacting to and how it decides on trade direction based on how it trades. Sunqu takes a new trade on every day of the week (except on Wednesdays) and exits trades whenever there is a signal towards the opposite side. Sunqu also uses a conglomerate of 10 neural networks with trades only being triggered if all of them agree on trade direction (trades are exit if there is disagreement as well). Sunqu therefore looks for entries 4 days of the week and enters only if it is “very sure” that this will be the outcome. This behavior closely mimics what a discretionary trader would do.
The most interesting thing is to look at how Sunqu takes those trades and what happens when it decides to leave trades open as there is strong continued agreement about price future direction between its networks (images shown are on the 4 hour time frame for more clarity). When you watch the way in which Sunqu trades it quickly becomes evident that it is NOT attempting to follow any trends as it routinely trades against what appears to be the main developing trending movement. Sunqu seems to give a lot of importance to support and resistance with the EA routinely selling on support and buying on resistance. However when breakouts happen after the EA has positioned itself in favor of the trend from the opposing level (for example if there is breakout of resistance and the EA bought on support) the trade is kept and a lot of money is made from the breakout move.
The Neural Network also seems to react to some price patterns like flags, pennants, bats and butterflies although there is absolutely no explicit coding of this within the inputs or outputs of the networks. Interestingly the EA somewhat achieves information about price action which is relevant for both the description of support/resistance levels and patterns from this although this was never the explicit objective of the system. It is also quite interesting to note that the EA doesn’t appear to give a lot of weight to the way in which candles look (what we could call candlestick patterns) with no apparent sign that the EA is selling or buying at any particular simple candlestick setup. From my analysis it seems that Sunqu is a support/resistance and pattern counter-trend following system which achieves its success through the adequate prediction of bounces from these important levels.
Another very interesting fact I came across when analyzing Sunqu’s success rates was that through the 11 years of testing Wednesdays had a much lower predictive power than the other days of the week. For some reason when trades are entered on Wednesday the success rate is lower than 20% while for other days of the week it is usually above 65%. This piece of information led me to “cut” any Wednesday trading from the system in order to greatly improve its trading results. Definitely it is worth exploring why predicting the direction of Wednesday candles seems to be much harder for Sunqu and what modifications or input additions to the neural network might help to remove this issue.
Another interesting question – which we will leave for another post – is how Sunqu behaves on other pairs. Is it the same kind of system on say, the GBP/USD? Or does the logic of the system change as we move to other instruments in order to explore different types of inefficiencies? Certainly there are a lot of issues to explore with Sunqu and also a lot of additional ways in which we could use neural networks. For example right now I am working on a system which will use Libor rates, central bank rates and closing prices to make trading decisions for pairs which are generally regarded as carry trade currencies. Will this lead to an “intelligent” carry trade? It will be cool to find out!
Sunqu is still under development but should be released within a month or two in the Asirikuy community. If you would like to learn more about my work in automated trading and how you too can develop your own systems 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)