A few days ago I started my “Neural Netorks in Trading” series where I intend to explain concepts related to neural networks as well as reveal practical applications to my faithful readers. On the first post of this series I talked about some of the basics of neural networks, what they are and what they may be useful for. Today I am going to tackle a much more practical issue about neural networks, focusing on the way in which they can be properly used in trading as stand-alone systems (I’ll cover later uses, such as system enhancement, later on). Within the following paragraphs you will learn why neural networks are not very good at prediction exact future price values but why this is not needed to create profitable trading strategies based entirely on this technique.
A neural network – as we discussed before – is simply an array of function or “neurons” which can attempt to generate predictive models for non-linear systems. If you train a neural network on a given set of data the network will adjust its function weights to accurately predict the training set data and later on this information can be used on out-of-sample data in order to get some valuable information about the market. Many people think that neural networks can therefore predict exact price values (such as the close, high, low, etc of future hours, days or weeks) but the truth is that neural networks fail miserably when they are applied in this way.
Why do neural networks fail when you attempt to predict price values in this way ? The problem here is that a neural network can come up with a model which predicts future values “close” to the real ones but often the error in the prediction is so high that it becomes useless. Another problem is that neural networks are not said to be “stable models” in the sense that repeating training can generate an entirely different set of future predictions (differing slightly from the previous ones) and therefore you often need to create comity of networks to come up with any meaningful prediction. The result is often that the predicted close/high/low value for the future will have a level of uncertainty which will make it hard to profit from the exact prediction (attempting to reach this exact level). Trying to make a network more accurate to predict these values usually makes it lose generalization capabilities, making it obsolete on future data.
Does this mean that creating a system from a neural network is impossible ? No, it just means that you need to approach things from a different perspective. When using a neural network it is usually much better not to search for an exact prediction about a future price value but to search for a prediction which is useful from a trading perspective but vague in its sense of definition. For example instead of predicting next week’s close we might want to predict whether next week’s close will be higher or lower than the current week’s close. Such a prediction is easier to do for the network with success since it only relies on a binary answer.
During the past few months I have done significant progress in my development of strategies based on neural networks, achieving some profitable outcomes based on this type of “vague” predictions. Although such results are not in anyway “spectacular”, with accuracies and profit rates similar to those of my other developed technical systems and those derived from simple genetic programming frameworks (such as Coatl) they do show that you can indeed develop profitable models based merely on a vague prediction about future conditions because such predictions are usually biased to work when they are bound to make more profit. For example when predicting the next week’s close direction, the neural network succeeds only about 52% of the time but a trading strategy using this information is very profitable because the network usually succeeds in its predictions when large breakouts and trend continuations happen while it rarely falls into a reversal which causes it to lose large amounts of money.
Overall it is very possible to create successful strategies based solely on neural networks based solely on the outcomes of lose predictions. However it is always important to consider that the neural network is in nature a “black box” model and therefore testing needs to be much more robust than for traditional technically derived strategies (this will be the topic of another post). There are many ways in which this was done but in the case of the above systems I employed a 5 year training period followed by a 5 year out of sample testing period to test whether the network was able to achieve successful outcomes.
Another important step of development with neural networks is also to tie down these lose predictions into comities of networks and groups of networks in order to increase chances of success. For example you can use 5 networks trained to predict next week’s close direction coupled with 5 networks that predict the monthly close direction and 5 networks which predict the 2 week close direction entering trades only when all networks say that price is going the same way. The creation of comities and the alignment of predictions from different but similar models is bound to increase the chances of success of a neural network based approach to trading.
Right now I have already developed a good knowledge basis in the area of neural networks and have already created the DLLs which we are bound to use to exploit this techniques on MQL4/5 however I still need to gather a lot of additional experience and do a ton of additional robustness tests on my neural network models but certainly we are only a few months away (perhaps even less?) from the first Asirikuy trading systems based exclusively on neural network models.
If you would like to learn more about my work in automated trading and how you too can build and design your own automated trading systems based on sound trading tactics and understanding 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)