Neural Networks in Trading: Reproducible NN Money Management with Statistically Relevant Results, a Great Step Forward

Many months ago I started my work on the use of Neural Networks as a way to improve the money management of a trading strategy. These posts – dealing mainly with some tests using Ruphay – showed that NN modifications to money management could be profitable but many problems, especially those dealing with reproducibility, stood heavily in my way towards a good and reliable way to improve money management based on this computational technique. Today – after many months of work – I am glad to tell you that the above has been achieved (at least for a few Asirikuy systems) and that the way towards a very robust methodology to improve money management is now ready to be walked :o). Within the following few paragraphs you will read a little bit more about these developments and you will get some additional understanding about why this is such an important step forward (in my opinion, that is).

First let us remember what I wanted to do almost 8 months ago when I started my developments in Neural Network Money Management techniques. My initial idea was quite simple and involved the use of trade history in order to predict future trade outcomes. I thought that if I gave a neural network a given sequence of past trades then the neural network could easily tell me whether a future trade will be a winner or a loser and I can therefore increase or decrease my lot size according to the prediction and gain an additional edge for my system. I would have an edge due to logic (coming from mathematical expectancy or alpha as some like to call it) and I would have another edge coming from the predicting the actual sequence of returns. I would have created an edge that is independent of the entry logic (which I think is neat).

The reason why I wanted to do this through neural networks is also something worth discussing since many of you might be thinking that such a feat may be achieved with much “simpler” methods. For example many Asirikuy members have advised me to use the moving average of the balance curve, the Bollinger bands of the balance curve, etc. In essence what these members have suggested is to apply notions derived from classic technical analysis to “trade” the balance curve and gain an additional edge for my system. However, after spending a ton of time on this, I have to say that none of these approaches seem to work since when they appear to work they seem to be derived from simple curve fitting (meaning that they work for a single system under very specific circumstances on a very particular equity curve) or they seem to simply give me the exact same results – or very similar ones – as an unmodified approach. The huge danger of these approaches is that they almost always expose the account to either making much less profit (they make it ultra-conservative) or they tremendously increase risk.

My opinion here is that I needed something which changing rules. I need something which is dynamic, able to give me an additional edge without me making any assumptions about the shape of the balance curve. I don’t want to make ANY assumptions about sequences of profits or losses but I want the money management system to LEARN these rules as the market evolves through time. This is the reason why I wanted to use Neural Networks, because I wanted a set of ever-evolving rules that could alter the money management of my strategy in ways which could deliver an additional edge. However I do not want curve fitting, I do not want the dangers associated with any assumptions about equity curve shape. For example if I increase risk every time I deep below the 50 trade moving average of a strategy most systems will end up making more money until a deep draw down period arises where the assumption that recovery will happen quickly is no longer valid; I do not want something like this (I want full adaptability = no dangerous assumptions).

My first attempts at doing NN money management were deceiving and although I managed to obtain very high increases in returns for Ruphay, it quickly became clear that such increases were merely an illusion as the results were not reproducible (as sometimes I got better and sometimes worse results) and in the end this led to no practical or statistically relevant application. What I got were merely increases in profits due to the increases in risk and I could always get the same or even better results simply by cranking up the lot size traded by the system (not to mention those times were the NN results made the system tank). After this I had some very interesting ideas to attempt to improve money management and finally I realized that the objective is to make the trading system “smarter” and the efficiency of money management is measured more precisely through the “risk to reward” ratio type statistics. In essence I am not interested if a type of money management that makes more money (as making more money is just a matter of risking more), but I am interested in its ability to give us a better compounded yearly profit to maximum draw down ratio for the same risk level.

Then I also found out something quite interesting – which will be the subject of a few videos within Asirikuy and probably a few posts here – which is how to reach reproducible results when using neural networks without having to use a gazillion committees. In the case of money management networks this involved special considerations about neural input and topology along with the “trick” of building a parallel “phantom” trading record which could be used as a reference and which would therefore be unaffected by the modifications done by the neural network on trades which were actually taken live.

Up until now I have only modified a few Asirikuy systems but the good news is that I have been able to improve their statistical characteristics by using this money management method. It works on many systems, on all the pairs they trade and it always brings an improvement with the same neural network topology and inputs showing that there is in fact a neural network derived money management solution which can be self-adaptive; improving systems greatly simply by analyzing how past profit/loss sequences have happened. The image above shows you a small sample of how it works, there you can see two Sapaq instances (one with NN (blue) and one without (green)) where both instances have reached almost the exact same profit (although NN is slightly more profitable) but the crucial difference is that I am getting an improvement in the compounded yearly profit to maximum drawdown ratio from about 0.4 to more than 0.9, simply because the NN money management is able to reduce losses during drawdown periods (due to lot size scaling). See how blue has “shallower” drawdown periods.

How do I know that this actually works and that it is not simply a consequence of chance? First, it works for all instances of at least two different systems (which includes about 12 different back-tests) with the exact same topology and second, if I record the number of trades (profit or losses) were I am right or wrong I get an indisputable amount of “hits” which implies that this technique has forecasting power. In the above example the system gets whether the next trade will be a winner or a loser with a 70% probability, way above the 50% hit rate which would be expected if the neural network money management didn’t have an edge. You can also run 20 back-tests, you will always get the exact same edge for the NN money management. Add to this the fact that some instances even have 80%+ edges in next trade outcome prediction and you start to get the feeling of what this new money management might do.

The next step for me is to test this across a broader range of Asirikuy systems and to implement it in Sunqu and other NN based strategies to see if I can build an extremely powerful strategy based entirely on the idea of neural networks (both logic and money management). As you can see, neural networks seem to be much more powerful than what I initially thought and as we find more about the “tricks” to use them successfully in trading we will be able to use more powerful and adaptive systems. Clearly if you would like to learn more about neural network and especially if you want to learn more about trading through an understanding and evidence based approach  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.

5 Responses to “Neural Networks in Trading: Reproducible NN Money Management with Statistically Relevant Results, a Great Step Forward”

  1. Chris says:

    Hi Daniel-

    Great post and a very impressive achievement!

    Since some of these systems (for example Sapaq) have losing trades a high percentage of the time, forecasting the losing trades at 70% accuracy doesn’t seem so impressive. But if you can also forecast the winners and structure the lot sizes such that no profitability is lost, and draw down is reduced, that clearly improves the edge. Getting an edge is not easy, believe me, I’ve tried.

    Looking forward to the details. All the best,

    Chris

    • admin says:

      Hi Chris,

      Thank you for your post :o) Bear in mind that 70% is the overall hit accuracy which means that the NNMM has forecasted losers AND winners correctly. It doesn’t matter what the actual distribution of returns is for the system as the probability to forecast without an edge is 50% regardless of which is the precise winning percentage. Bear in mind that the NNMM increases lot size when it thinks it will win and it reduces it when it thinks it will lose so overall it affects BOTH types of trades. Thanks again for posting! :o)

      Best Regards,

      Daniel

  2. Franco says:

    I am impressed! As I have experienced myself neural networks are very hard to successfully implement (I got so frustrated I decided to spend my time on other projects for now).

    This will definitely be an awesome addition to our current trading systems.

  3. Rodney says:

    Daniel

    This is a really exciting innovation you have developed. The most obvious advantage for me is that it makes trading a system much easier from a mental perspective. On the graph above where the 12% draw down level gets reduced to 6% is a significant improvement. Even if the draw down lengths are the same, a reduction of the depth is a real bonus. I’m sure the Pain and Ulcer indexes show improvement too.

    Kind Regards
    Rodney

  4. Gigabrainy says:

    Daniel, you’re a great mind!
    I admire you because I think that being tenacious always leads to great results.
    You’re a legend for all of us members of Asirikuy.
    THANK YOU.

Leave a Reply

WordPress › Error

There has been a critical error on this website.

Learn more about troubleshooting WordPress.