Neural Networks in Trading: Are Trade Results Correlated? Towards a Universal NN Money Management Solution. Part 3

Last week I wrote two posts about the issue of trade correlation and how I believe Neural Networks (NN) can both answer this question and help us improve our systems through intelligent contributions to a strategy’s money management. After many hours of computer testing and many more of network topology studies I have finally come up with what we could call a universal NN for money management which increases the profitability of every single system it has been tested on. On Today’s post I want to discuss this very interesting new tool, how I achieved this result and how I will continue to improve it before implementing it across Asirikuy systems. I will discuss some of the advantages of this approach and the important implications it has regarding our fundamental understanding of how trading works. Note that on all the images shown both systems have the EXACT same average risk per trade.

Let us first remember what the whole idea behind the money management NN was. My idea was simply to train a network using the past X trade outcomes of a given system to see if the network could – with any statistical significance – predict the outcome of the next trade. Once we have a network which can predict whether the next outcome will be positive or negative we simply multiply the lot size by a certain amount, increasing it whenever we have positive predictions and decreasing it when predictions are negative. The whole idea here would be to reduce lot sizes when we have draw down periods and increase them when we’re bound to see profitable outcomes. If the Neural Network has any statistically meaningful predictive capacity the net result should be an overall improvement in any system’s equity curve.

The idea – as you can see – was very nice. However my first results were a little disappointing as I found no statistically significant ability of my first neural network attempts to yield meaningful predictions across genetically generated systems. This implies that my solution did not work but certainly I was starting to learn about how the neural networks here function and how I could potentially improve their predictive power. Hereafter I implemented several important modifications such as the generation of a neural network committee (several networks to make decisions) and the introduction of a “moving window” which used a fixed number of trade outcomes in the past relative to the last trade to train the network and obtain results. This last modification was especially important as it allowed the neural network to react to how recent profit and draw down cycles had behaved.

After these modifications (and a few other little secrets I’m keeping for Asirikuy members) I achieved a neural network which appears to be a universal money management solution which is able to always increase the profit of any strategy to add it to. For example I tested the network on 5 different genetically generated strategies on 3 pairs, yielding higher profits on two of them and almost no change over the second one (only slightly positive). However the real challenge for the NN was to tackle real Asirikuy systems and improve them without any further modifications. As a matter of fact the NN managed to improve the results of Teyacanani, Watukushay No.2 and Watukushay FE (haven’t tried it on other systems yet) showing that it is indeed a universal solution for trade improvement.

Perhaps a very interesting thing to wonder here deals with the fundamental implications of the fact that this NN money management approach actually works, it means that there is some sort of non-linear correlation between trade outcomes which implies that past trade information is relevant for future predictions, therefore it partly demonstrates that there is some correlation between past performance and future results meaning that the past outcomes of a strategy (at least amongst Asirikuy strategies) serve as a meaningful predictor for future values. However the prediction quality is not great but the important thing is that losses are more adequately predicted than profits (therefore we generally avoid having “strong losses” due to the NN being wrong) and also we have a general mismatch of committee outlooks whenever the situation looks uncertain (the group of neural networks effectively allows us to filter bad decisions by ignoring predictions when there is a lot of indecision).

Still there is a long road to walk ahead and I am looking forward to expanding my research, especially around the use of different topologies, epoch amount choices, error thresholds and committee sizes. Neural network topology is a very complex area of research and finding a better topology might make the difference between the current implementation and another which yields much more meaningful and profitable outcomes. Certainly my results up until now put us a step closer to a universal NN for money management and possibly within the next several months this mechanism will be implemented within those Asirikuy systems which made enough trades during the past 11 years of backtesting as to conclusively show that the NN does yield profitable outcomes. Also you might find interesting to know that the NN committees always produce positive results on consecutive runs, demonstrating that this is not just a matter of the NN getting “lucky” but a true sign of predictive power.

Of course if you would like to learn more about the world of automated trading and how you too can learn to increase your chances of success in algorithmic trading through knowledge 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)

Print Friendly, PDF & Email
You can leave a response, or trackback from your own site.

6 Responses to “Neural Networks in Trading: Are Trade Results Correlated? Towards a Universal NN Money Management Solution. Part 3”

  1. McDuck says:

    What worries me about this it’s the inherent lack of overall robustness that generate all these thousands of lines of code. An black swan event will be orders magnitude more likely with this money management method than following old school.

    I read somewhere that GS survived the financial meltdown because when they realized there algorithms were not working they just decided to unplug the machines. I’ve not idea whether it’s true or not, but in such a situation that would be a wise decision.

    In the second figure the NN increases the maximum DD period quite a lot; in real life trading that would be difficult to digest; and our brain, absent of NN capabilities and decreased confidence by the overall complexity of the strategy, would have a tough time deciding whether to continue, to switch off the MM system, or stop trading.

    Best.

    • admin says:

      Hi McDuck,

      Thank you for your post :o) Certainly these are just preliminary observations and it will require a ton of additional testing before we ever use this on a live account. However you need to take into account that the Neural Network here is not altering mathematical expectancy or making trading decisions in anyway it simply shifts the amount of lots traded a little bit. Overall the NN would never “crash” an account by itself since it doesn’t cause the strategy to fail (remember that the NN has nothing to do with the actual trading strategy). On the contrary if a strategy was heading steadily into draw down the NN would instead be protective (as it would predict losses and reduce capital traded). However as I have said before the effect of the NN here is small relative to the huge role of the trading tactic in itself so it doesn’t increase the likehood of a black swan or imply a tremendously higher danger if such an event happens.

      As I said before these results are preliminary and certainly we will need to develop a much deeper understanding before we consider trading this live as – as you say – we need to understand the implications of using this technology regarding our worst case statistical targets in order to make sure that its use does not increase psychological issues due to an inherent lack of understanding. Of course, a lot of analysis and developments to do but overall the technology is very promising and will certainly allow for profit improvements in the future, especially subtle corrections that may help eliminate or compensate broker dependency. Thanks again for posting!

      Best Regards,

      Daniel

  2. McDuck says:

    Daniel,

    what about this benchmark to test the IQ of your NN?.

    A simple measure to gauge the ability of the MM network would be the following. Evaluate the percentage of winners W of last 100 trades, si W > 66% take risk 2 on the following trade, si 33% < W < 66% take risk 1, and if W < 33% take risk 0.5.

    A smart NN should improve this. At the very least this benchmark can be used to get some experience with stochastics to evaluate in the future an EA based in Markov chains, which would diversify even more the current arsenal.

    • admin says:

      Hi McDuck,

      Thank you for posting :o) However I do not understand your proposition very well, could you please email me a more detailed explanation so that I can carry out the test you suggest ?

      Best Regards,

      Daniel

  3. Al says:

    Hi Daniel,

    I have an idea for an added-value tool which your NN Money-Management (NNMM?) development can help with. This tool will get as a parameter a system/portfolio and will tell you when is the best time to add funds to it. I will be more than happy to ‘miss’ a series of negative result trades when I fund a new account or add money to an existing one :-)

    Thanks!

    • admin says:

      Hi Al,

      Thanks a lot for your comment :o) Yes, this is also something I had in mind but this has to be done through a different network (forecasting total profits 10-15 trades into the future) as the current implementation can merely “predict” the very immediate future (next trade outcome). In order to determine a better point for account startup you might need to predict longer net outcomes which I still haven’t tested (no idea if it can indeed be done successfully). Thanks a lot for posting!

      Best Regards,

      Daniel

Leave a Reply

WordPress › Error

There has been a critical error on this website.

Learn more about troubleshooting WordPress.