Building “the switch” using machine learning

If you have been around algorithmic trading for a while you have probably heard some version of the “switch” concept. This is one of the holy grails of systematic trading, describing an ability to be able to change the way one acts in the market according to market conditions. Today I want to talk about our quest at Asirikuy to build a practical, adaptable and ever-learning switch, a dream that seems each day closer thanks to advances in machine learning and the large amounts of data we have been able to gather from our price-action based system mining projects using GPU technology. On this post I will talk about what we want to build, how we have been building it and some of the things we have achieved up until now.

In the early days of trading systems – back in the 1960’s and 70’s – some people started to notice that specific groups of trading systems generated most of their returns under some specific sets of market conditions. Most notably trend following strategies generated most of their returns when the market had strong momentum while they suffered and entered drawdown periods when the market was caught between ranges. This is when the idea of “the switch” first came up. Traders imagined they could trade much more profitably if they could “flip a switch” at the right point in time and change from a trend-following system to a trend-fading – or range-trading – strategy.

The problems with this started to become obvious from the start. The main issue is that if a financial time series has trended in the past it does not mean it will trend in the future or vice versa. Since what you’re trying to do is predict what will be best to trade in the future – not in the past – analyzing past conditions is of very limited utility. More often than not people found out that they “lagged” the market significantly, meaning that when they chose their trend follower the financial instrument then started ranging and when they chose their range trader the instrument started trending. This happened with enough randomness that most traders decided it was best to compromise and trade portfolios of trend and range strategies that could survive the bad periods instead of trying to predict what was going to happen more precisely. This worked for a while but eventually just the alpha decay of strategies implied that some sort of switch was indeed necessary.

Things are not that simple however. Strategies are no longer so simple as to always be classified as “trend followers” or “trend faders” and therefore much more complex analysis needs to be used to group systems and decide when a system needs to be traded or not. In essence the idea of “the switch” is simply to make successful predictions about whether a system will or will not be profitable along some future period given some set of inputs (which can be past system results, financial time series properties, etc). The level of inference required to create a switch is now so dynamic and complex that it’s above the level of inference that can be easily carried out by a human brain.

At Asirikuy we have tackled the above problem using machine learning. Our idea is to create machine learning models that can use information from our price action based system repository to decide when a system needs to be traded or not. The first image in this blog post shows the current work-flow we are using (last step using individual system models is currently being implemented). As you can see we seek to build a mechanism that allows us to trade with some sort of quantitatively derived forward expectation since just creating systems that are profitable under historical data is not going to be enough (as this is a trivial problem almost anyone can solve). Although historical profitability does increase the probability of success in the future it is not enough, nowadays you cannot just trade blindly without knowing if you can reasonably expect to be profitable.

Another great advantage of these models is that they become better with time, as more data comes in (see here). Since what you are doing with machine learning is basically inference, your inference becomes more and more powerful as the amount of data you have grows. Not only that but you can also decide to go for more complex models as you gather more data since a larger data set means you can add more degrees of freedom without increasing your curve-fitting (compared to a simpler model using less data). This means you have access to deeper and deeper insights that are simply not accessible from a human-level perspective (because of all the complexities involved within the data).

So although the days of looking for a simple trend/range switch are over we can now look for much more powerful switches that allow us to make predictions of out-of-sample trading profitability for a wide range of strategies with an almost endless arrays of characteristics. If you would like to learn more about our machine learning models and how you can trade using their selections 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
You can leave a response, or trackback from your own site.

Leave a Reply

Subscribe to RSS Feed Follow me on Twitter!
Show Buttons
Hide Buttons