## Neural Networks in Trading: It’s Not About Making Extremely Accurate Predictions

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.

### 3 Responses to “Neural Networks in Trading: It’s Not About Making Extremely Accurate Predictions”

1. Daniel-

Great series on Neural Networks and very interested to see what you come up with in terms of a system which is as good or better than your other rule-based systems.

I’ve noticed that some Neural Net based systems (at least from the product literature) seem to focus on pairs trading. One popular one (with amazing results – and being sold as signal service only) is Leotrader. I have a Meta-Trader setup with read-only access to one of their accounts that turned a $500 deposit in August into over$2500 now. Impressive results by any measure and it keeps cranking out the winners.

Anyway, since NN’s really only make “Yes or No” decisions, the might be useful for ferreting out relationships between 2 pairs – in the case of Leotrader, GBP/USD and EUR/USD. Think about it because it seems there’s something there that others have found and are exploiting successfully.

Take care and keep up the great work,

Chris

Hello Chris,

Thank you very much for your comment :o) I am glad you like this series and its potential. The advantage of this is the fact that the neural network formation procedure and its exact input/output criteria will be transparent and there will never be any execution or such other problems (as when trade copiers are used). Bear in mind that I would never plan to capture very small market movements (which I lack the data to simulate accurately as you know) but I would aim to predict weekly closes, long term pair movements, etc.

A very important aspect of trading neural networks is to have absolute control over the network so that you know exactly what is being done. I would seriously doubt about any such “extremely profitable systems” as they are disguised by hidden risk to reward ratios and the overall technique behind them is – in reality – unknown. There could be a neural network or a monkey taking entries with a dartboard behind the curtains of any commercial signal provider and – as you know – short term results are misleading and pointless, we have seen many times even higher profits in short term periods get wiped out in the longer term :o). Whenever I see a trading tactic with enormous short term profits and no long term simulations with proper out of sample validation running on “black box” mode, one thing comes to mind — run away !

What I seek to provide is a whole education around neural networks and true tools which can help Asirikuy members build entire systems out of networks and even build networks to improve current rule based strategies. This is just another very powerful programming tool which I seek to make an important part of Asirikuy (as I have attempted to do with genetics). Thank you very much again for your comment Chris,

Best Regards,

Daniel

2. valtinho says:

If you can reliably say that your experience has led a to successful prediction rate of direction of 52%, then neural network results are pretty much random (the extra 2% could be normal variation). I think I could flip a coin and say heads = market will end up next week, and achieve similar results.

Having said that, I do think there are practical uses for NNs, because using a state-of-the-art black boxes with artificial intelligence to generate the predictions is more mentally acceptable than flipping a penny. In addition, “random” is a hell of a lot better than most technical indicators out there, which correctly predict direction much less than 40% of the time (more like 30%!). If people really knew the odds of their indicators, they probably wouldn’t trade them!

Based on your experience, do more inputs for the NN training lead to better prediction odds, or are the results random no matter how many inputs were used? Also, how many predictions did you consider to get your 52%? I would really appreciate if you could answer these questions. I think a lot of people could benefit from the answers as well.

Thanks Daniel!