Predicting trading system out-of-sample success using chaos properties of financial time series

During the past year I have been focused on predicting out-of-sample trading system returns. This is because while creating trading systems with historically good performance is trivial – just a brute-forcing problem at its core – the creation of systems that can succeed under new and unknown market conditions is a much harder problem. Since the core of profitable trading is in fact the prediction of future – not past in anyway – returns it is therefore fundamental to generate mechanisms that can help us predict whether systems will work or not going forward, regardless of their back-testing performance. On today’s post I want to share with you some of my latest work attempting to do this using our price-action based repository at Asirikuy and chaos related variables.

Chaos properties are intriguing. These are all properties of a time series that can be used as proxies to determine how closely a financial time series behaves compared with a random walk. Properties like the fractal dimension, hurst exponent and sample entropy of a series will be very different if the series behaves in a manner that is somewhat predictable – some sort of relationship of the future with the past – or completely random. In the past I have explored how these chaos variables work in Forex pairs across many different blog posts (see here for an example).

If these chaos properties are related with how predictable a time series is then it is not crazy to imagine that there could be some relationship between the future performance of a trading system and how the chaos properties of a series have behaved in the recent past. It might be that a particular system requires a series that has a low fractal dimension before its profitable periods while another requires the Hurst exponent to be large. It is of course very difficult to know how these relationships might look beforehand but we can conjecture that such relationships exist, are meaningful and can be exploited for successful OOS predictions.

Thanks to the nolds python library I was able to create machine learning systems for the prediction of 4800 different trading strategies. For each trading system I created a single random forest algorithm that used the DFA (an analogue of the Hurst exponent for non-stationary series) and the correlation dimension value of the EURUSD, USDJPY and GBPUSD 1H data for the past 30 days in order to predict whether a strategy would be profitable or not profitable within the following week. Notice that I used a very small forward horizon as the systems have at most 3 years of out-of-sample data and the amount of examples is therefore in most cases very limited (just 150-170 for the oldest systems).

The first image in this post shows you the variable importance for the variables generated in the random forest for a system. For most systems – as you would expect – the most important variables are the ones related with their own trading symbol. This means that a EURUSD system will usually have the EURUSD variables as the most important. In cases where this wasn’t possible – say a GBPJPY system – the most important variables always contained at least one of the currencies involved in the pair’s strategy. I kept the last 20% of the data as a training set for each system to see how well they would do and I found that 39% of the strategies saw increases in performance compared to making no predictions while 37% saw a decline. The remaining 24% simply didn’t make any predictions that were positive during the testing phase so no comparisons could be made.

It is difficult to interpret these results. It may be that some strategies’ OOS results can be predicted using chaos variables while others can’t, or it may well be that the strategies that had positive changes were merely the result of chance and they will tend to mean revert. I will continue these experiments as our repository grows in order to see what might be the culprit. If you would like to learn more about our work with machine learning and how you too can trade using algorithms that attempt to predict system success please consider joining, a website filled with educational videos, trading systems, development and a sound, honest and transparent approach towards automated trading.strategies

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

Leave a Reply

internal_server_error <![CDATA[WordPress &rsaquo; Error]]> 500